blob: 244a5f12dda29cd017e40db931cd1ce11fb3a16f [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
tfarina4772a462017-03-25 02:26:188#include "build/build_config.h"
rbpotter58bc882e2017-02-01 03:44:249#include "ui/gfx/geometry/point.h"
tfarina3b0452d2014-12-31 15:20:0910#include "ui/gfx/geometry/rect.h"
rbpottere33e8e622018-01-25 01:10:3311#include "ui/gfx/geometry/size.h"
[email protected]da00dc12011-10-06 21:39:2612
13namespace printing {
14
tzik904f19452015-11-18 20:34:5515// Defining PDF rendering settings.
thestig65bd2bc2016-11-16 22:38:4816struct PdfRenderSettings {
rbpotterc92514072017-01-26 23:06:3617 enum Mode {
18 NORMAL = 0,
19#if defined(OS_WIN)
rbpotter0437a1712017-07-14 21:23:2420 TEXTONLY,
rbpotterc92514072017-01-26 23:06:3621 GDI_TEXT,
rbpotter58bc882e2017-02-01 03:44:2422 POSTSCRIPT_LEVEL2,
23 POSTSCRIPT_LEVEL3,
Lei Zhang92eadbb2020-05-13 22:32:3624 EMF_WITH_REDUCED_RASTERIZATION,
25 EMF_WITH_REDUCED_RASTERIZATION_AND_GDI_TEXT,
26 LAST = EMF_WITH_REDUCED_RASTERIZATION_AND_GDI_TEXT
rbpotterc92514072017-01-26 23:06:3627#else
Lei Zhang92eadbb2020-05-13 22:32:3628 LAST = NORMAL
rbpotterc92514072017-01-26 23:06:3629#endif
30 };
31
Lei Zhang5c500482018-04-12 07:34:1632 PdfRenderSettings()
33 : autorotate(false), use_color(true), mode(Mode::NORMAL) {}
thestigc8800cb2017-03-30 23:20:1034 PdfRenderSettings(const gfx::Rect& area,
35 const gfx::Point& offsets,
rbpottere33e8e622018-01-25 01:10:3336 const gfx::Size& dpi,
rbpotter58bc882e2017-02-01 03:44:2437 bool autorotate,
Lei Zhang5c500482018-04-12 07:34:1638 bool use_color,
rbpotter58bc882e2017-02-01 03:44:2439 Mode mode)
40 : area(area),
41 offsets(offsets),
42 dpi(dpi),
43 autorotate(autorotate),
Lei Zhang5c500482018-04-12 07:34:1644 use_color(use_color),
rbpotter58bc882e2017-02-01 03:44:2445 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;
rbpottere33e8e622018-01-25 01:10:3350 gfx::Size dpi;
thestig65bd2bc2016-11-16 22:38:4851 bool autorotate;
Lei Zhang5c500482018-04-12 07:34:1652 bool use_color;
rbpotterc92514072017-01-26 23:06:3653 Mode mode;
[email protected]da00dc12011-10-06 21:39:2654};
55
56} // namespace printing
57
[email protected]da00dc12011-10-06 21:39:2658#endif // PRINTING_PDF_RENDER_SETTINGS_H_