[email protected] | da00dc1 | 2011-10-06 21:39:26 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef PRINTING_PDF_RENDER_SETTINGS_H_ |
| 6 | #define PRINTING_PDF_RENDER_SETTINGS_H_ |
| 7 | |
rbpotter | c9251407 | 2017-01-26 23:06:36 | [diff] [blame] | 8 | #include <stdint.h> |
| 9 | |
| 10 | #include "ipc/ipc_message_macros.h" |
tzik | 904f1945 | 2015-11-18 20:34:55 | [diff] [blame] | 11 | #include "ipc/ipc_message_utils.h" |
[email protected] | da00dc1 | 2011-10-06 21:39:26 | [diff] [blame] | 12 | #include "ipc/ipc_param_traits.h" |
| 13 | #include "printing/printing_export.h" |
rbpotter | 58bc882e | 2017-02-01 03:44:24 | [diff] [blame^] | 14 | #include "ui/gfx/geometry/point.h" |
tfarina | 3b0452d | 2014-12-31 15:20:09 | [diff] [blame] | 15 | #include "ui/gfx/geometry/rect.h" |
fsamuel | 6b98cf9 | 2016-04-28 05:42:24 | [diff] [blame] | 16 | #include "ui/gfx/ipc/geometry/gfx_param_traits.h" |
markdittmer | 99d77bf | 2016-03-31 19:03:24 | [diff] [blame] | 17 | #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" |
[email protected] | da00dc1 | 2011-10-06 21:39:26 | [diff] [blame] | 18 | |
| 19 | namespace printing { |
| 20 | |
tzik | 904f1945 | 2015-11-18 20:34:55 | [diff] [blame] | 21 | // Defining PDF rendering settings. |
thestig | 65bd2bc | 2016-11-16 22:38:48 | [diff] [blame] | 22 | struct PdfRenderSettings { |
rbpotter | c9251407 | 2017-01-26 23:06:36 | [diff] [blame] | 23 | enum Mode { |
| 24 | NORMAL = 0, |
| 25 | #if defined(OS_WIN) |
| 26 | GDI_TEXT, |
rbpotter | 58bc882e | 2017-02-01 03:44:24 | [diff] [blame^] | 27 | POSTSCRIPT_LEVEL2, |
| 28 | POSTSCRIPT_LEVEL3, |
| 29 | LAST = POSTSCRIPT_LEVEL3, |
rbpotter | c9251407 | 2017-01-26 23:06:36 | [diff] [blame] | 30 | #else |
| 31 | LAST = NORMAL, |
| 32 | #endif |
| 33 | }; |
| 34 | |
| 35 | PdfRenderSettings() : dpi(0), autorotate(false), mode(Mode::NORMAL) {} |
rbpotter | 58bc882e | 2017-02-01 03:44:24 | [diff] [blame^] | 36 | PdfRenderSettings(gfx::Rect area, |
| 37 | gfx::Point offsets, |
| 38 | int dpi, |
| 39 | bool autorotate, |
| 40 | Mode mode) |
| 41 | : area(area), |
| 42 | offsets(offsets), |
| 43 | dpi(dpi), |
| 44 | autorotate(autorotate), |
| 45 | mode(mode) {} |
[email protected] | da00dc1 | 2011-10-06 21:39:26 | [diff] [blame] | 46 | ~PdfRenderSettings() {} |
| 47 | |
thestig | 65bd2bc | 2016-11-16 22:38:48 | [diff] [blame] | 48 | gfx::Rect area; |
rbpotter | 58bc882e | 2017-02-01 03:44:24 | [diff] [blame^] | 49 | gfx::Point offsets; |
thestig | 65bd2bc | 2016-11-16 22:38:48 | [diff] [blame] | 50 | int dpi; |
| 51 | bool autorotate; |
rbpotter | c9251407 | 2017-01-26 23:06:36 | [diff] [blame] | 52 | Mode mode; |
[email protected] | da00dc1 | 2011-10-06 21:39:26 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | } // namespace printing |
| 56 | |
[email protected] | da00dc1 | 2011-10-06 21:39:26 | [diff] [blame] | 57 | #endif // PRINTING_PDF_RENDER_SETTINGS_H_ |