23 #include <config_features.h>
32 #include <com/sun/star/drawing/LineCap.hpp>
41 #include <unordered_map>
48 #if defined(ANDROID) && !HAVE_FEATURE_ANDROID_LOK
49 #define SVP_24BIT_FORMAT (ScanlineFormat::N24BitTcRgb | ScanlineFormat::TopDown)
50 #define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcRgba | ScanlineFormat::TopDown)
51 #define SVP_CAIRO_BLUE 1
52 #define SVP_CAIRO_GREEN 2
53 #define SVP_CAIRO_RED 0
54 #define SVP_CAIRO_ALPHA 3
55 #elif defined OSL_BIGENDIAN
56 #define SVP_24BIT_FORMAT (ScanlineFormat::N24BitTcRgb | ScanlineFormat::TopDown)
57 #define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcArgb | ScanlineFormat::TopDown)
58 #define SVP_CAIRO_BLUE 3
59 #define SVP_CAIRO_GREEN 2
60 #define SVP_CAIRO_RED 1
61 #define SVP_CAIRO_ALPHA 0
63 #define SVP_24BIT_FORMAT (ScanlineFormat::N24BitTcBgr | ScanlineFormat::TopDown)
64 #define SVP_CAIRO_FORMAT (ScanlineFormat::N32BitTcBgra | ScanlineFormat::TopDown)
65 #define SVP_CAIRO_BLUE 0
66 #define SVP_CAIRO_GREEN 1
67 #define SVP_CAIRO_RED 2
68 #define SVP_CAIRO_ALPHA 3
100 size_t nSizeMeasure,
cairo_t* cr,
bool bNoJoin,
bool bAntiAlias,
101 const std::vector<double>* pStroke);
115 bool bPixelSnapHairline);
139 sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight);
158 : m_pSurface(nullptr)
159 , m_aLineColor(
Color(0x00, 0x00, 0x00))
160 , m_aFillColor(
Color(0xFF, 0xFF, 0XFF))
170 cairo_t* getCairoContext(
bool bXorModeAllowed,
bool bAntiAlias)
const;
171 void releaseCairoContext(
cairo_t* cr,
bool bXorModeAllowed,
173 cairo_t* createTmpCompatibleCairoContext()
const;
175 void applyColor(
cairo_t* cr,
Color rColor,
double fTransparency = 0.0);
185 double fLineWidth,
const std::vector<double>* pStroke,
187 double fMiterMinimumAngle,
bool bPixelSnapHairline);
214 unsigned long nTargetHeight);
227 unsigned long nTargetHeight = 0)
const;
cairo_surface_t * getSurface() const
void implSetSurface(cairo_surface_t *pNew)
VCL_DLLPUBLIC basegfx::B2DPoint impPixelSnap(const basegfx::B2DPolygon &rPolygon, const basegfx::B2DHomMatrix &rObjectToDevice, basegfx::B2DHomMatrix &rObjectToDeviceInv, sal_uInt32 nIndex)
basegfx::B2IVector m_aFrameSize
VCL_DLLPUBLIC cairo_format_t getCairoFormat(const BitmapBuffer &rBuffer)
cairo_surface_t * getSurface(unsigned long nTargetWidth=0, unsigned long nTargetHeight=0) const
vcl::Region m_aClipRegion
cairo_path_t * getCairoPath()
cairo_surface_t * pSurface
cairo_path_t * mpCairoPath
std::unordered_map< sal_uInt64, cairo_surface_t * > maDownscaled
cairo_surface_t * implGetSurface() const
VCL_DLLPUBLIC basegfx::B2DRange getClipBox(cairo_t *cr)
cairo_surface_t * m_pSurface
const std::vector< double > & getStroke() const
void(* damageHandler)(void *handle, sal_Int32 nExtentsX, sal_Int32 nExtentsY, sal_Int32 nExtentsWidth, sal_Int32 nExtentsHeight)
VCL_DLLPUBLIC basegfx::B2DRange getClippedStrokeDamage(cairo_t *cr)
std::vector< double > maStroke
virtual sal_Int64 estimateUsageInBytes() const override
bool getAntiAlias() const
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)
VCL_DLLPUBLIC void Toggle1BitTransparency(const BitmapBuffer &rBuf)
SystemDependentData_CairoPath(basegfx::SystemDependentDataManager &rSystemDependentDataManager, size_t nSizeMeasure, cairo_t *cr, bool bNoJoin, bool bAntiAlias, const std::vector< double > *pStroke)
VCL_DLLPUBLIC std::unique_ptr< BitmapBuffer > FastConvert24BitRgbTo32BitCairo(const BitmapBuffer *pSrc)
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)
struct _cairo_user_data_key cairo_user_data_key_t
VCL_DLLPUBLIC basegfx::B2DRange getClippedFillDamage(cairo_t *cr)
struct _cairo_surface cairo_surface_t
VCL_DLLPUBLIC basegfx::B2DRange getFillDamage(cairo_t *cr)
VCL_DLLPUBLIC void dl_cairo_surface_set_device_scale(cairo_surface_t *surface, double x_scale, double y_scale)
SurfaceHelper & operator=(const SurfaceHelper &)=delete
cairo_surface_t * implCreateOrReuseDownscale(unsigned long nTargetWidth, unsigned long nTargetHeight)
virtual ~SystemDependentData_CairoPath() override