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