[go: nahoru, domu]

blob: effb3da6d3f23a2ce69d41c7972f7c18360f6aad [file] [log] [blame]
Avi Drissmandb497b32022-09-15 19:47:281// Copyright 2011 The Chromium Authors
gene@chromium.orgda00dc12011-10-06 21:39:262// 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"
gene@chromium.orgda00dc12011-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,
Xiaohan Wange3d00dd62022-01-08 02:33:2819#if BUILDFLAG(IS_WIN)
rbpotter0437a1712017-07-14 21:23:2420 TEXTONLY,
rbpotter58bc882e2017-02-01 03:44:2421 POSTSCRIPT_LEVEL2,
22 POSTSCRIPT_LEVEL3,
Lei Zhang92eadbb2020-05-13 22:32:3623 EMF_WITH_REDUCED_RASTERIZATION,
Lei Zhang1419cab2021-09-09 17:04:4424 POSTSCRIPT_LEVEL3_WITH_TYPE42_FONTS,
25 LAST = POSTSCRIPT_LEVEL3_WITH_TYPE42_FONTS
rbpotterc92514072017-01-26 23:06:3626#else
Lei Zhang92eadbb2020-05-13 22:32:3627 LAST = NORMAL
rbpotterc92514072017-01-26 23:06:3628#endif
29 };
30
Lei Zhang5c500482018-04-12 07:34:1631 PdfRenderSettings()
32 : autorotate(false), use_color(true), mode(Mode::NORMAL) {}
thestigc8800cb2017-03-30 23:20:1033 PdfRenderSettings(const gfx::Rect& area,
34 const gfx::Point& offsets,
rbpottere33e8e622018-01-25 01:10:3335 const gfx::Size& dpi,
rbpotter58bc882e2017-02-01 03:44:2436 bool autorotate,
Lei Zhang5c500482018-04-12 07:34:1637 bool use_color,
rbpotter58bc882e2017-02-01 03:44:2438 Mode mode)
39 : area(area),
40 offsets(offsets),
41 dpi(dpi),
42 autorotate(autorotate),
Lei Zhang5c500482018-04-12 07:34:1643 use_color(use_color),
rbpotter58bc882e2017-02-01 03:44:2444 mode(mode) {}
gene@chromium.orgda00dc12011-10-06 21:39:2645 ~PdfRenderSettings() {}
46
thestig65bd2bc2016-11-16 22:38:4847 gfx::Rect area;
rbpotter58bc882e2017-02-01 03:44:2448 gfx::Point offsets;
rbpottere33e8e622018-01-25 01:10:3349 gfx::Size dpi;
thestig65bd2bc2016-11-16 22:38:4850 bool autorotate;
Lei Zhang5c500482018-04-12 07:34:1651 bool use_color;
rbpotterc92514072017-01-26 23:06:3652 Mode mode;
gene@chromium.orgda00dc12011-10-06 21:39:2653};
54
55} // namespace printing
56
gene@chromium.orgda00dc12011-10-06 21:39:2657#endif // PRINTING_PDF_RENDER_SETTINGS_H_