1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <sal/config.h>
24 #include <config_options.h>
26 #include <sal/types.h>
28 #include <vcl/dllapi.h>
30 namespace vcl::printer
32 enum class TransparencyMode
38 enum class GradientMode
51 class UNLESS_MERGELIBS(VCL_DLLPUBLIC
) Options
54 bool mbReduceTransparency
= false;
55 TransparencyMode meReducedTransparencyMode
= TransparencyMode::Auto
;
56 bool mbReduceGradients
= false;
57 GradientMode meReducedGradientsMode
= GradientMode::Stripes
;
58 sal_uInt16 mnReducedGradientStepCount
= 64;
59 bool mbReduceBitmaps
= false;
60 BitmapMode meReducedBitmapMode
= BitmapMode::Normal
;
61 sal_uInt16 mnReducedBitmapResolution
= 200;
62 bool mbReducedBitmapsIncludeTransparency
= true;
63 bool mbConvertToGreyscales
= false;
64 bool mbPDFAsStandardPrintJobFormat
= false;
69 bool IsReduceTransparency() const { return mbReduceTransparency
; }
70 void SetReduceTransparency(bool bSet
) { mbReduceTransparency
= bSet
; }
72 TransparencyMode
GetReducedTransparencyMode() const { return meReducedTransparencyMode
; }
73 void SetReducedTransparencyMode(TransparencyMode eMode
) { meReducedTransparencyMode
= eMode
; }
75 bool IsReduceGradients() const { return mbReduceGradients
; }
76 void SetReduceGradients(bool bSet
) { mbReduceGradients
= bSet
; }
78 GradientMode
GetReducedGradientMode() const { return meReducedGradientsMode
; }
79 void SetReducedGradientMode(GradientMode eMode
) { meReducedGradientsMode
= eMode
; }
81 sal_uInt16
GetReducedGradientStepCount() const { return mnReducedGradientStepCount
; }
82 void SetReducedGradientStepCount(sal_uInt16 nStepCount
)
84 mnReducedGradientStepCount
= nStepCount
;
87 bool IsReduceBitmaps() const { return mbReduceBitmaps
; }
88 void SetReduceBitmaps(bool bSet
) { mbReduceBitmaps
= bSet
; }
90 BitmapMode
GetReducedBitmapMode() const { return meReducedBitmapMode
; }
91 void SetReducedBitmapMode(BitmapMode eMode
) { meReducedBitmapMode
= eMode
; }
93 sal_uInt16
GetReducedBitmapResolution() const { return mnReducedBitmapResolution
; }
94 void SetReducedBitmapResolution(sal_uInt16 nResolution
)
96 mnReducedBitmapResolution
= nResolution
;
99 bool IsReducedBitmapIncludesTransparency() const { return mbReducedBitmapsIncludeTransparency
; }
100 void SetReducedBitmapIncludesTransparency(bool bSet
)
102 mbReducedBitmapsIncludeTransparency
= bSet
;
105 bool IsConvertToGreyscales() const { return mbConvertToGreyscales
; }
106 void SetConvertToGreyscales(bool bSet
) { mbConvertToGreyscales
= bSet
; }
108 bool IsPDFAsStandardPrintJobFormat() const { return mbPDFAsStandardPrintJobFormat
; }
109 void SetPDFAsStandardPrintJobFormat(bool bSet
) { mbPDFAsStandardPrintJobFormat
= bSet
; }
111 /** Read printer options from configuration
113 parameter decides whether the set for
114 print "to printer" or "to file" should be read.
116 void ReadFromConfig(bool bFile
);
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */