LibreOffice Module vcl (master) 1
SvpGraphicsBackend.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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <vcl/dllapi.h>
23#include <tools/long.hxx>
24#include <tools/color.hxx>
25#include <salgdiimpl.hxx>
26#include <salgdi.hxx>
27
29
31{
33
34public:
36
37 void Init() override;
38
39 void freeResources() override;
40
41 OUString getRenderBackendName() const override { return "svp"; }
42
43 void setClipRegion(vcl::Region const& rRegion) override;
44 void ResetClipRegion() override;
45
46 sal_uInt16 GetBitCount() const override;
47
48 tools::Long GetGraphicsWidth() const override;
49
50 void SetLineColor() override;
51 void SetLineColor(Color nColor) override;
52 void SetFillColor() override;
53 void SetFillColor(Color nColor) override;
54 void SetXORMode(bool bSet, bool bInvertOnly) override;
55 void SetROPLineColor(SalROPColor nROPColor) override;
56 void SetROPFillColor(SalROPColor nROPColor) override;
57
58 void drawPixel(tools::Long nX, tools::Long nY) override;
59 void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override;
60
61 void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override;
62 void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override;
63 void drawPolyLine(sal_uInt32 nPoints, const Point* pPointArray) override;
64 void drawPolygon(sal_uInt32 nPoints, const Point* pPointArray) override;
65 void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32* pPoints,
66 const Point** pPointArray) override;
67
68 bool drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice,
69 const basegfx::B2DPolyPolygon&, double fTransparency) override;
70
71 bool drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice, const basegfx::B2DPolygon&,
72 double fTransparency, double fLineWidth, const std::vector<double>* pStroke,
73 basegfx::B2DLineJoin, css::drawing::LineCap, double fMiterMinimumAngle,
74 bool bPixelSnapHairline) override;
75
76 bool drawPolyLineBezier(sal_uInt32 nPoints, const Point* pPointArray,
77 const PolyFlags* pFlagArray) override;
78
79 bool drawPolygonBezier(sal_uInt32 nPoints, const Point* pPointArray,
80 const PolyFlags* pFlagArray) override;
81
82 bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32* pPoints,
83 const Point* const* pPointArray,
84 const PolyFlags* const* pFlagArray) override;
85
86 void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY,
87 tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override;
88
89 void copyBits(const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics) override;
90
91 void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap) override;
92
93 void drawBitmap(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
94 const SalBitmap& rMaskBitmap) override;
95
96 void drawMask(const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap,
97 Color nMaskColor) override;
98
99 std::shared_ptr<SalBitmap> getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth,
100 tools::Long nHeight) override;
101
103
105 SalInvert nFlags) override;
106
107 void invert(sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags) override;
108
110 void* pPtr, sal_uInt32 nSize) override;
111
112 bool blendBitmap(const SalTwoRect&, const SalBitmap& rBitmap) override;
113
114 bool blendAlphaBitmap(const SalTwoRect&, const SalBitmap& rSrcBitmap,
115 const SalBitmap& rMaskBitmap, const SalBitmap& rAlphaBitmap) override;
116
117 bool drawAlphaBitmap(const SalTwoRect&, const SalBitmap& rSourceBitmap,
118 const SalBitmap& rAlphaBitmap) override;
119
121 const basegfx::B2DPoint& rY, const SalBitmap& rSourceBitmap,
122 const SalBitmap* pAlphaBitmap, double fAlpha) override;
123
124 bool hasFastDrawTransformedBitmap() const override;
125
127 sal_uInt8 nTransparency) override;
128
129 bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) override;
131 SalGradient const& rGradient) override;
132
133 bool supportsOperation(OutDevSupportType eType) const override;
134
135 void drawBitmapBuffer(const SalTwoRect& rPosAry, const BitmapBuffer* pBuffer,
136 cairo_operator_t eOp);
137};
138
139/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Implementation class for SalGraphics.
Definition: salgdiimpl.hxx:51
Color getPixel(tools::Long nX, tools::Long nY) override
bool drawPolyPolygon(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &, double fTransparency) override
void drawPolyLine(sal_uInt32 nPoints, const Point *pPointArray) 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
bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency) override
void drawPolygon(sal_uInt32 nPoints, const Point *pPointArray) override
void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPointArray) override
SvpGraphicsBackend(CairoCommon &rCairoCommon)
bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize) override
void drawPixel(tools::Long nX, tools::Long nY) override
void Init() override
std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPointArray, const PolyFlags *pFlagArray) override
void SetXORMode(bool bSet, bool bInvertOnly) override
bool implDrawGradient(basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient) override
bool drawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha) override
bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPointArray, const PolyFlags *const *pFlagArray) override
void drawBitmapBuffer(const SalTwoRect &rPosAry, const BitmapBuffer *pBuffer, cairo_operator_t eOp)
void SetFillColor() override
void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap) override
bool drawGradient(const tools::PolyPolygon &rPolygon, const Gradient &rGradient) override
void invert(sal_uInt32 nPoints, const Point *pPtAry, SalInvert nFlags) override
void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight) override
void drawPixel(tools::Long nX, tools::Long nY, Color nColor) override
void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics) override
void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate) override
void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor) override
bool blendAlphaBitmap(const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap) override
void SetLineColor(Color nColor) override
void SetROPFillColor(SalROPColor nROPColor) override
tools::Long GetGraphicsWidth() const override
bool hasFastDrawTransformedBitmap() const override
void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2) override
bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap) override
bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPointArray, const PolyFlags *pFlagArray) override
void SetFillColor(Color nColor) override
void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags) override
void SetLineColor() override
void freeResources() override
void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const SalBitmap &rMaskBitmap) override
OUString getRenderBackendName() const override
bool supportsOperation(OutDevSupportType eType) const override
void ResetClipRegion() override
void setClipRegion(vcl::Region const &rRegion) override
void SetROPLineColor(SalROPColor nROPColor) override
CairoCommon & m_rCairoCommon
bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap) override
sal_uInt16 GetBitCount() const override
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
long Long
PolyFlags
SalROPColor
Definition: salgtype.hxx:69
SalInvert
Definition: salgtype.hxx:73
unsigned char sal_uInt8
OutDevSupportType
Definition: vclenum.hxx:163