23#include <config_features.h>
33#include <com/sun/star/drawing/LineCap.hpp>
43#include <unordered_map>
78 const std::vector<double>* pStroke);
92 bool bPixelSnapHairline);
120typedef void (*
damageHandler)(
void* handle, sal_Int32 nExtentsX, sal_Int32 nExtentsY,
121 sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight);
140 : m_pSurface(nullptr)
141 , m_oLineColor(
Color(0x00, 0x00, 0x00))
142 , m_oFillColor(
Color(0xFF, 0xFF, 0XFF))
176 void drawRect(
double nX,
double nY,
double nWidth,
double nHeight,
bool bAntiAlias);
191 css::drawing::LineCap eLineCap,
double fMiterMinimumAngle,
192 bool bPixelSnapHairline,
bool bAntiAlias);
195 sal_uInt8 nTransparency,
bool bAntiAlias);
223 const SalBitmap& rAlphaBitmap,
bool bAntiAlias);
227 const SalBitmap* pAlphaBitmap,
double fAlpha,
bool bAntiAlias);
241 void doXorOnRelease(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop, sal_Int32 nExtentsRight,
243 sal_Int32 nWidth)
const;
256 unsigned long nTargetHeight);
269 unsigned long nTargetHeight = 0)
const;
VCL_DLLPUBLIC cairo_format_t getCairoFormat(const BitmapBuffer &rBuffer)
struct _cairo_surface cairo_surface_t
VCL_DLLPUBLIC basegfx::B2DRange getFillDamage(cairo_t *cr)
void(* damageHandler)(void *handle, sal_Int32 nExtentsX, sal_Int32 nExtentsY, sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight)
VCL_DLLPUBLIC basegfx::B2DRange getClipBox(cairo_t *cr)
VCL_DLLPUBLIC basegfx::B2DRange getClippedFillDamage(cairo_t *cr)
VCL_DLLPUBLIC std::unique_ptr< BitmapBuffer > FastConvert24BitRgbTo32BitCairo(const BitmapBuffer *pSrc)
VCL_DLLPUBLIC void dl_cairo_surface_get_device_scale(cairo_surface_t *surface, double *x_scale, double *y_scale)
VCL_DLLPUBLIC size_t AddPolygonToPath(cairo_t *cr, const basegfx::B2DPolygon &rPolygon, const basegfx::B2DHomMatrix &rObjectToDevice, bool bPixelSnap, bool bPixelSnapHairline)
struct _cairo_user_data_key cairo_user_data_key_t
VCL_DLLPUBLIC basegfx::B2DRange getStrokeDamage(cairo_t *cr)
VCL_DLLPUBLIC void add_polygon_path(cairo_t *cr, const basegfx::B2DPolyPolygon &rPolyPolygon, const basegfx::B2DHomMatrix &rObjectToDevice, bool bPixelSnap)
VCL_DLLPUBLIC void dl_cairo_surface_set_device_scale(cairo_surface_t *surface, double x_scale, double y_scale)
VCL_DLLPUBLIC basegfx::B2DRange getClippedStrokeDamage(cairo_t *cr)
basegfx::B2DPoint maCurrPoint
basegfx::B2ITuple maCurrTuple
basegfx::B2DPoint snap(const basegfx::B2DPolygon &rPolygon, const basegfx::B2DHomMatrix &rObjectToDevice, basegfx::B2DHomMatrix &rObjectToDeviceInv, sal_uInt32 nIndex)
cairo_surface_t * implGetSurface() const
cairo_surface_t * getSurface(unsigned long nTargetWidth=0, unsigned long nTargetHeight=0) const
cairo_surface_t * pSurface
SurfaceHelper & operator=(const SurfaceHelper &)=delete
std::unordered_map< sal_uInt64, cairo_surface_t * > maDownscaled
SurfaceHelper(const SurfaceHelper &)=delete
cairo_surface_t * implCreateOrReuseDownscale(unsigned long nTargetWidth, unsigned long nTargetHeight)
void implSetSurface(cairo_surface_t *pNew)
std::vector< double > maStroke
cairo_path_t * getCairoPath()
const std::vector< double > & getStroke() const
SystemDependentData_CairoPath(size_t nSizeMeasure, cairo_t *cr, bool bNoJoin, bool bAntiAlias, const std::vector< double > *pStroke)
virtual ~SystemDependentData_CairoPath() override
cairo_path_t * mpCairoPath
bool getAntiAlias() const
virtual sal_Int64 estimateUsageInBytes() const override
static bool supportsOperation(OutDevSupportType eType)
void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry, bool bAntiAlias)
void clipRegion(cairo_t *cr)
void drawRect(double nX, double nY, double nWidth, double nHeight, bool bAntiAlias)
static void clipRegion(cairo_t *cr, const vcl::Region &rClipRegion)
void copyBitsCairo(const SalTwoRect &rTR, cairo_surface_t *pSourceSurface, bool bAntiAlias)
void doXorOnRelease(sal_Int32 nExtentsLeft, sal_Int32 nExtentsTop, sal_Int32 nExtentsRight, sal_Int32 nExtentsBottom, cairo_surface_t *const surface, sal_Int32 nWidth) const
void drawPolyLine(sal_uInt32 nPoints, const Point *pPtAry, bool bAntiAlias)
std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)
bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency, bool bAntiAlias)
bool drawGradient(const tools::PolyPolygon &rPolyPolygon, const Gradient &rGradient, bool bAntiAlias)
void copyWithOperator(const SalTwoRect &rTR, cairo_surface_t *source, cairo_operator_t eOp, bool bAntiAlias)
static cairo_surface_t * createCairoSurface(const BitmapBuffer *pBuffer)
bool drawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha, bool bAntiAlias)
cairo_surface_t * getSurface() const
vcl::Region m_aClipRegion
void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2, bool bAntiAlias)
static bool hasFastDrawTransformedBitmap()
cairo_t * createTmpCompatibleCairoContext() const
bool drawPolyLine(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolygon &rPolyLine, double fTransparency, double fLineWidth, const std::vector< double > *pStroke, basegfx::B2DLineJoin eLineJoin, css::drawing::LineCap eLineCap, double fMiterMinimumAngle, bool bPixelSnapHairline, bool bAntiAlias)
cairo_t * getCairoContext(bool bXorModeAllowed, bool bAntiAlias) const
bool drawAlphaBitmap(const SalTwoRect &rTR, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap, bool bAntiAlias)
void copySource(const SalTwoRect &rTR, cairo_surface_t *source, bool bAntiAlias)
void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags, bool bAntiAlias)
cairo_surface_t * m_pSurface
void SetROPLineColor(SalROPColor nROPColor)
basegfx::B2IVector m_aFrameSize
void drawMask(const SalTwoRect &rTR, const SalBitmap &rSalBitmap, Color nMaskColor, bool bAntiAlias)
void invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags, bool bAntiAlias)
void invert(sal_uInt32 nPoints, const Point *pPtAry, SalInvert nFlags, bool bAntiAlias)
void releaseCairoContext(cairo_t *cr, bool bXorModeAllowed, const basegfx::B2DRange &rExtents) const
static cairo_user_data_key_t * getDamageKey()
bool drawPolyPolygon(const basegfx::B2DHomMatrix &rObjectToDevice, const basegfx::B2DPolyPolygon &, double fTransparency, bool bAntiAlias)
sal_uInt16 GetBitCount() const
void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, bool bAntiAlias)
void SetXORMode(bool bSet, bool bInvertOnly)
bool implDrawGradient(basegfx::B2DPolyPolygon const &rPolyPolygon, SalGradient const &rGradient, bool bAntiAlias)
std::optional< Color > m_oFillColor
void drawPolygon(sal_uInt32 nPoints, const Point *pPtAry, bool bAntiAlias)
static void applyColor(cairo_t *cr, Color rColor, double fTransparency=0.0)
void SetROPFillColor(SalROPColor nROPColor)
static basegfx::B2DRange renderSource(cairo_t *cr, const SalTwoRect &rTR, cairo_surface_t *source)
std::optional< Color > m_oLineColor
void drawPixel(const std::optional< Color > &rLineColor, tools::Long nX, tools::Long nY, bool bAntiAlias)
static Color getPixel(cairo_surface_t *pSurface, tools::Long nX, tools::Long nY)