20 #ifndef INCLUDED_VCL_INC_HEADLESS_SVPGDI_HXX
21 #define INCLUDED_VCL_INC_HEADLESS_SVPGDI_HXX
24 #error This file is not for iOS
27 #include <config_features.h>
29 #include <osl/endian.h>
31 #include <config_cairo_canvas.h>
45 #if defined(ANDROID) && !HAVE_FEATURE_ANDROID_LOK
46 # define SVP_24BIT_FORMAT (ScanlineFormat::N24BitTcRgb | ScanlineFormat::TopDown)
47 # define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcRgba | ScanlineFormat::TopDown)
48 # define SVP_CAIRO_BLUE 1
49 # define SVP_CAIRO_GREEN 2
50 # define SVP_CAIRO_RED 0
51 # define SVP_CAIRO_ALPHA 3
52 #elif defined OSL_BIGENDIAN
53 # define SVP_24BIT_FORMAT (ScanlineFormat::N24BitTcRgb | ScanlineFormat::TopDown)
54 # define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcArgb | ScanlineFormat::TopDown)
55 # define SVP_CAIRO_BLUE 3
56 # define SVP_CAIRO_GREEN 2
57 # define SVP_CAIRO_RED 1
58 # define SVP_CAIRO_ALPHA 0
60 # define SVP_24BIT_FORMAT (ScanlineFormat::N24BitTcBgr | ScanlineFormat::TopDown)
61 # define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcBgra | ScanlineFormat::TopDown)
62 # define SVP_CAIRO_BLUE 0
63 # define SVP_CAIRO_GREEN 1
64 # define SVP_CAIRO_RED 2
65 # define SVP_CAIRO_ALPHA 3
80 sal_Int32 nExtentsX, sal_Int32 nExtentsY,
81 sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight);
111 const Color& rLineColor,
115 double fTransparency,
117 const std::vector< double >* pStroke,
119 css::drawing::LineCap eLineCap,
120 double fMiterMinimumAngle,
121 bool bPixelSnapHairline);
125 cairo_operator_t eOp = CAIRO_OPERATOR_SOURCE);
129 void applyColor(
cairo_t *cr,
Color rColor,
double fTransparency = 0.0);
140 const SalBitmap& rAlphaBitmap )
override;
148 double fAlpha)
override;
152 cairo_t* createTmpCompatibleCairoContext()
const;
159 virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
override;
171 virtual void SetXORMode(
bool bSet,
bool )
override;
196 std::vector< sal_Int32 >& rWidths,
198 virtual std::unique_ptr<GenericSalLayout>
210 double fTransparency )
override;
215 double fTransparency,
217 const std::vector< double >* pStroke,
219 css::drawing::LineCap,
220 double fMiterMinimumAngle,
221 bool bPixelSnapHairline)
override;
222 virtual void drawPolyLine( sal_uInt32 nPoints,
const Point* pPtAry )
override;
223 virtual void drawPolygon( sal_uInt32 nPoints,
const Point* pPtAry )
override;
225 const sal_uInt32* pPoints,
226 const Point** pPtAry )
override;
234 const sal_uInt32* pPoints,
235 const Point*
const* pPtAry,
236 const PolyFlags*
const* pFlgAry )
override;
248 bool bWindowInvalidate)
override;
255 cairo_operator_t eOp );
258 const SalBitmap& rTransparentBitmap )
override;
261 Color nMaskColor )
override;
265 virtual void invert( sal_uInt32 nPoints,
const Point* pPtAry,
SalInvert nFlags )
override;
273 #if ENABLE_CAIRO_CANVAS
274 virtual bool SupportsCairo()
const override;
279 #endif // ENABLE_CAIRO_CANVAS
281 cairo_t* getCairoContext(
bool bXorModeAllowed)
const;
287 #endif // INCLUDED_VCL_INC_HEADLESS_SVPGDI_HXX
virtual bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap)=0
Render bitmap with alpha channel.
virtual void ClearDevFontCache()=0
virtual std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)=0
virtual void DrawTextLayout(const GenericSalLayout &)=0
basegfx::B2IVector m_aFrameSize
virtual bool blendAlphaBitmap(const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap)=0
Draw the bitmap by blending using the mask and alpha channel.
cairo_surface_t * getSurface() const
virtual bool supportsOperation(OutDevSupportType) const =0
virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const =0
virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2)=0
virtual bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap)=0
Blend the bitmap with the current buffer.
virtual bool CreateFontSubset(const OUString &rToFile, const PhysicalFontFace *pFont, const sal_GlyphId *pGlyphIDs, const sal_uInt8 *pEncoding, sal_Int32 *pWidths, int nGlyphs, FontSubsetInfo &rInfo)=0
virtual std::unique_ptr< GenericSalLayout > GetTextLayout(int nFallbackLevel)=0
virtual OUString getRenderBackendName() const override
virtual const void * GetEmbedFontData(const PhysicalFontFace *pFont, tools::Long *pDataLen)=0
virtual Color getPixel(tools::Long nX, tools::Long nY)=0
virtual FontCharMapRef GetFontCharMap() const =0
virtual bool implDrawGradient(basegfx::B2DPolyPolygon const &, SalGradient const &)
SvpCairoTextRender m_aTextRenderImpl
virtual void drawPixel(tools::Long nX, tools::Long nY)=0
virtual void drawPolygon(sal_uInt32 nPoints, const Point *pPtAry)=0
virtual bool drawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha)=0
draw transformed bitmap (maybe with alpha) where Null, X, Y define the coordinate system ...
virtual void SetROPLineColor(SalROPColor nROPColor)=0
virtual void FreeEmbedFontData(const void *pData, tools::Long nDataLen)=0
virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)=0
void(* damageHandler)(void *handle, sal_Int32 nExtentsX, sal_Int32 nExtentsY, sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight)
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry)=0
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap)=0
abstract base class for physical font faces
std::shared_ptr< Surface > SurfaceSharedPtr
virtual void SetFillColor()=0
virtual bool setClipRegion(const vcl::Region &)=0
virtual void GetResolution(sal_Int32 &rDPIX, sal_Int32 &rDPIY)=0
VCL_DLLPUBLIC void dl_cairo_surface_get_device_scale(cairo_surface_t *surface, double *x_scale, double *y_scale)
virtual void SetLineColor()=0
virtual bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry)=0
virtual void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags)=0
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize)=0
virtual tools::Long GetGraphicsWidth() const =0
struct _cairo_user_data_key cairo_user_data_key_t
virtual bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry)=0
std::shared_ptr< cairo_surface_t > CairoSurfaceSharedPtr
virtual SystemGraphicsData GetGraphicsData() const =0
virtual bool hasFastDrawTransformedBitmap() const =0
Used e.g.
virtual void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics)=0
virtual void GetGlyphWidths(const PhysicalFontFace *pFont, bool bVertical, std::vector< sal_Int32 > &rWidths, Ucs2UIntMap &rUnicodeEnc)=0
virtual void SetXORMode(bool bSet, bool bInvertOnly)=0
virtual sal_uInt16 GetBitCount() const =0
vcl::Region m_aClipRegion
virtual void SetROPFillColor(SalROPColor nROPColor)=0
virtual void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor)=0
virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry)=0
VCL_DLLPUBLIC void dl_cairo_surface_set_device_scale(cairo_surface_t *surface, double x_scale, double y_scale)
virtual SalGraphicsImpl * GetImpl() const override
virtual void GetFontMetric(ImplFontMetricDataRef &, int nFallbackLevel)=0
virtual void drawPolyLine(sal_uInt32 nPoints, const Point *pPtAry)=0
virtual bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency)=0
Render solid rectangle with given transparency.
virtual bool AddTempDevFont(PhysicalFontCollection *, const OUString &rFileURL, const OUString &rFontName)=0
virtual void SetFont(LogicalFontInstance *, int nFallbackLevel)=0
virtual void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate)=0
std::map< sal_Ucs, sal_uInt32 > Ucs2UIntMap
virtual void ResetClipRegion()=0
struct _cairo_surface cairo_surface_t
cairo_surface_t * m_pSurface
virtual void SetTextColor(Color nColor)=0
virtual bool drawGradient(const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient)=0
virtual void GetDevFontList(PhysicalFontCollection *)=0