blob: 545def02da780bf21da2cbe61cea0dccc45ad0c0 [file] [log] [blame]
[email protected]da00dc12011-10-06 21:39:261// 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
rbpotterc92514072017-01-26 23:06:368#include <stdint.h>
9
10#include "ipc/ipc_message_macros.h"
tzik904f19452015-11-18 20:34:5511#include "ipc/ipc_message_utils.h"
[email protected]da00dc12011-10-06 21:39:2612#include "ipc/ipc_param_traits.h"
13#include "printing/printing_export.h"
rbpotter58bc882e2017-02-01 03:44:2414#include "ui/gfx/geometry/point.h"
tfarina3b0452d2014-12-31 15:20:0915#include "ui/gfx/geometry/rect.h"
fsamuel6b98cf92016-04-28 05:42:2416#include "ui/gfx/ipc/geometry/gfx_param_traits.h"
markdittmer99d77bf2016-03-31 19:03:2417#include "ui/gfx/ipc/skia/gfx_skia_param_traits.h"
[email protected]da00dc12011-10-06 21:39:2618
19namespace printing {
20
tzik904f19452015-11-18 20:34:5521// Defining PDF rendering settings.
thestig65bd2bc2016-11-16 22:38:4822struct PdfRenderSettings {
rbpotterc92514072017-01-26 23:06:3623 enum Mode {
24 NORMAL = 0,
25#if defined(OS_WIN)
26 GDI_TEXT,
rbpotter58bc882e2017-02-01 03:44:2427 POSTSCRIPT_LEVEL2,
28 POSTSCRIPT_LEVEL3,
29 LAST = POSTSCRIPT_LEVEL3,
rbpotterc92514072017-01-26 23:06:3630#else
31 LAST = NORMAL,
32#endif
33 };
34
35 PdfRenderSettings() : dpi(0), autorotate(false), mode(Mode::NORMAL) {}
rbpotter58bc882e2017-02-01 03:44:2436 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]da00dc12011-10-06 21:39:2646 ~PdfRenderSettings() {}
47
thestig65bd2bc2016-11-16 22:38:4848 gfx::Rect area;
rbpotter58bc882e2017-02-01 03:44:2449 gfx::Point offsets;
thestig65bd2bc2016-11-16 22:38:4850 int dpi;
51 bool autorotate;
rbpotterc92514072017-01-26 23:06:3652 Mode mode;
[email protected]da00dc12011-10-06 21:39:2653};
54
55} // namespace printing
56
[email protected]da00dc12011-10-06 21:39:2657#endif // PRINTING_PDF_RENDER_SETTINGS_H_