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 "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "ui/gfx/geometry/point.h" | 9 #include "ui/gfx/geometry/point.h" |
10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
11 | 11 |
12 namespace printing { | 12 namespace printing { |
13 | 13 |
14 // Defining PDF rendering settings. | 14 // Defining PDF rendering settings. |
15 struct PdfRenderSettings { | 15 struct PdfRenderSettings { |
16 enum Mode { | 16 enum Mode { |
17 NORMAL = 0, | 17 NORMAL = 0, |
18 #if defined(OS_WIN) | 18 #if defined(OS_WIN) |
19 GDI_TEXT, | 19 GDI_TEXT, |
20 POSTSCRIPT_LEVEL2, | 20 POSTSCRIPT_LEVEL2, |
21 POSTSCRIPT_LEVEL3, | 21 POSTSCRIPT_LEVEL3, |
22 LAST = POSTSCRIPT_LEVEL3, | 22 LAST = POSTSCRIPT_LEVEL3, |
23 #else | 23 #else |
24 LAST = NORMAL, | 24 LAST = NORMAL, |
25 #endif | 25 #endif |
26 }; | 26 }; |
27 | 27 |
28 PdfRenderSettings() : dpi(0), autorotate(false), mode(Mode::NORMAL) {} | 28 PdfRenderSettings() : dpi(0), autorotate(false), mode(Mode::NORMAL) {} |
29 PdfRenderSettings(gfx::Rect area, | 29 PdfRenderSettings(const gfx::Rect& area, |
30 gfx::Point offsets, | 30 const gfx::Point& offsets, |
31 int dpi, | 31 int dpi, |
32 bool autorotate, | 32 bool autorotate, |
33 Mode mode) | 33 Mode mode) |
34 : area(area), | 34 : area(area), |
35 offsets(offsets), | 35 offsets(offsets), |
36 dpi(dpi), | 36 dpi(dpi), |
37 autorotate(autorotate), | 37 autorotate(autorotate), |
38 mode(mode) {} | 38 mode(mode) {} |
39 ~PdfRenderSettings() {} | 39 ~PdfRenderSettings() {} |
40 | 40 |
41 gfx::Rect area; | 41 gfx::Rect area; |
42 gfx::Point offsets; | 42 gfx::Point offsets; |
43 int dpi; | 43 int dpi; |
44 bool autorotate; | 44 bool autorotate; |
45 Mode mode; | 45 Mode mode; |
46 }; | 46 }; |
47 | 47 |
48 } // namespace printing | 48 } // namespace printing |
49 | 49 |
50 #endif // PRINTING_PDF_RENDER_SETTINGS_H_ | 50 #endif // PRINTING_PDF_RENDER_SETTINGS_H_ |
OLD | NEW |