OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PRINTING_PDF_RENDER_SETTINGS_H_ | 5 #ifndef PRINTING_PDF_RENDER_SETTINGS_H_ |
6 #define PRINTING_PDF_RENDER_SETTINGS_H_ | 6 #define PRINTING_PDF_RENDER_SETTINGS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
11 #include "ipc/ipc_message_utils.h" | 11 #include "ipc/ipc_message_utils.h" |
12 #include "ipc/ipc_param_traits.h" | 12 #include "ipc/ipc_param_traits.h" |
13 #include "printing/printing_export.h" | 13 #include "printing/printing_export.h" |
| 14 #include "ui/gfx/geometry/point.h" |
14 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
15 #include "ui/gfx/ipc/geometry/gfx_param_traits.h" | 16 #include "ui/gfx/ipc/geometry/gfx_param_traits.h" |
16 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" | 17 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" |
17 | 18 |
18 namespace printing { | 19 namespace printing { |
19 | 20 |
20 // Defining PDF rendering settings. | 21 // Defining PDF rendering settings. |
21 struct PdfRenderSettings { | 22 struct PdfRenderSettings { |
22 enum Mode { | 23 enum Mode { |
23 NORMAL = 0, | 24 NORMAL = 0, |
24 #if defined(OS_WIN) | 25 #if defined(OS_WIN) |
25 GDI_TEXT, | 26 GDI_TEXT, |
26 LAST = GDI_TEXT, | 27 POSTSCRIPT_LEVEL2, |
| 28 POSTSCRIPT_LEVEL3, |
| 29 LAST = POSTSCRIPT_LEVEL3, |
27 #else | 30 #else |
28 LAST = NORMAL, | 31 LAST = NORMAL, |
29 #endif | 32 #endif |
30 }; | 33 }; |
31 | 34 |
32 PdfRenderSettings() : dpi(0), autorotate(false), mode(Mode::NORMAL) {} | 35 PdfRenderSettings() : dpi(0), autorotate(false), mode(Mode::NORMAL) {} |
33 PdfRenderSettings(gfx::Rect area, int dpi, bool autorotate, Mode mode) | 36 PdfRenderSettings(gfx::Rect area, |
34 : area(area), dpi(dpi), autorotate(autorotate), mode(mode) {} | 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) {} |
35 ~PdfRenderSettings() {} | 46 ~PdfRenderSettings() {} |
36 | 47 |
37 gfx::Rect area; | 48 gfx::Rect area; |
| 49 gfx::Point offsets; |
38 int dpi; | 50 int dpi; |
39 bool autorotate; | 51 bool autorotate; |
40 Mode mode; | 52 Mode mode; |
41 }; | 53 }; |
42 | 54 |
43 } // namespace printing | 55 } // namespace printing |
44 | 56 |
45 #endif // PRINTING_PDF_RENDER_SETTINGS_H_ | 57 #endif // PRINTING_PDF_RENDER_SETTINGS_H_ |
46 | |
OLD | NEW |