LibreOffice Module vcl (master) 1
GenPspGfxBackend.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 */
10
11#pragma once
12
13#include <salgdiimpl.hxx>
14
15namespace psp
16{
17class PrinterGfx;
18}
19
21{
22private:
24
25public:
28
29 void Init() override;
30 void freeResources() override;
31 OUString getRenderBackendName() const override { return "genpsp"; }
32
33 void setClipRegion(vcl::Region const& rRegion) override;
34 void ResetClipRegion() override;
35
36 sal_uInt16 GetBitCount() const override;
37
38 tools::Long GetGraphicsWidth() const override;
39
40 void SetLineColor() override;
41 void SetLineColor(Color nColor) override;
42 void SetFillColor() override;
43 void SetFillColor(Color nColor) override;
44 void SetXORMode(bool bSet, bool bInvertOnly) override;
45 void SetROPLineColor(SalROPColor nROPColor) override;
46 void SetROPFillColor(SalROPColor nROPColor) override;
47
48 void drawPixel(tools::Long nX, tools::Long nY) override;
49 void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override;
50
51 void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override;
52 void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override;
53 void drawPolyLine(sal_uInt32 nPoints, const Point* pPointArray) override;
54 void drawPolygon(sal_uInt32 nPoints, const Point* pPointArray) override;
55 void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32* pPoints,
56 const Point** pPointArray) override;
57
58 bool drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice,
59 const basegfx::B2DPolyPolygon&, double fTransparency) override;
60
61 bool drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice, const basegfx::B2DPolygon&,
62 double fTransparency, double fLineWidth, const std::vector<double>* pStroke,
63 basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle,
64 bool bPixelSnapHairline) override;
65
66 bool drawPolyLineBezier(sal_uInt32 nPoints, const Point* pPointArray,
67 const PolyFlags* pFlagArray) override;
68
69 bool drawPolygonBezier(sal_uInt32 nPoints, const Point* pPointArray,
70 const PolyFlags* pFlagArray) override;
71
72 bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32* pPoints,
73 const Point* const* pPointArray,
74 const PolyFlags* const* pFlagArray) override;
75
76 void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
77 tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override;
78
79 void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
80
81 void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap) override;
82
83 void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
84 const SalBitmap& rMaskBitmap) override;
85
86 void drawMask(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
87 Color nMaskColor) override;
88
89 std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth,
90 tools::Long nHeight) override;
91
93
95 SalInvert nFlags) override;
96
97 void invert(sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags) override;
98
100 void* pPtr, sal_uInt32 nSize) override;
101
102 bool blendBitmap(const SalTwoRect&, const SalBitmap& rBitmap) override;
103
104 bool blendAlphaBitmap(const SalTwoRect&, const SalBitmap& rSrcBitmap,
105 const SalBitmap& rMaskBitmap, const SalBitmap& rAlphaBitmap) override;
106
107 bool drawAlphaBitmap(const SalTwoRect&, const SalBitmap& rSourceBitmap,
108 const SalBitmap& rAlphaBitmap) override;
109
111 const basegfx::B2DPoint& rY, const SalBitmap& rSourceBitmap,
112 const SalBitmap* pAlphaBitmap, double fAlpha) override;
113
114 bool hasFastDrawTransformedBitmap() const override;
115
117 sal_uInt8 nTransparency) override;
118
119 bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) override;
121 SalGradient const& rGradient) override;
122
123 bool supportsOperation(OutDevSupportType eType) const override;
124};
125
126/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
void Init() override
void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override
bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPointArray, const PolyFlags *const *pFlagArray) override
void drawPolyLine(sal_uInt32 nPoints, const Point *pPointArray) override
void SetROPFillColor(SalROPColor nROPColor) override
void SetLineColor(Color nColor) override
psp::PrinterGfx * m_pPrinterGfx
void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const SalBitmap &rMaskBitmap) override
bool blendAlphaBitmap(const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap) override
bool implDrawGradient(basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient) override
void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
bool supportsOperation(OutDevSupportType eType) const override
void SetLineColor() override
bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
bool drawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha) override
void SetXORMode(bool bSet, bool bInvertOnly) override
void drawPolygon(sal_uInt32 nPoints, const Point *pPointArray) override
void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
void SetROPLineColor(SalROPColor nROPColor) override
void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
GenPspGfxBackend(psp::PrinterGfx *pPrinterGfx)
sal_uInt16 GetBitCount() const override
bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency) override
void SetFillColor() override
Color getPixel(tools::Long nX, tools::Long nY) override
void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
bool drawPolyLine(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolygon &, double fTransparency, double fLineWidth, const std::vector< double > *pStroke, basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle, bool bPixelSnapHairline) override
void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
void drawPixel(tools::Long nX, tools::Long nY) override
bool drawGradient(const tools::PolyPolygon &rPolygon, const Gradient &rGradient) override
void invert(sal_uInt32 nPoints, const Point *pPtAry, SalInvert nFlags) override
void setClipRegion(vcl::Region const &rRegion) override
OUString getRenderBackendName() const override
bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) override
bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPointArray, const PolyFlags *pFlagArray) override
void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override
void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPointArray) override
bool drawPolyPolygon(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &, double fTransparency) override
bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap) override
tools::Long GetGraphicsWidth() const override
void ResetClipRegion() override
void freeResources() override
void SetFillColor(Color nColor) override
~GenPspGfxBackend() override
void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
bool hasFastDrawTransformedBitmap() const override
bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPointArray, const PolyFlags *pFlagArray) override
Implementation class for SalGraphics.
Definition: salgdiimpl.hxx:51
long Long
PolyFlags
SalROPColor
Definition: salgtype.hxx:69
SalInvert
Definition: salgtype.hxx:73
unsigned char sal_uInt8
OutDevSupportType
Definition: vclenum.hxx:163