diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/drawinglayer/processor2d/cairopixelprocessor2d.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx b/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx index 1a211806713b..2e9c2ad2ce45 100644 --- a/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx +++ b/include/drawinglayer/processor2d/cairopixelprocessor2d.hxx @@ -13,6 +13,7 @@ #include <basegfx/color/bcolormodifier.hxx> #include <tools/long.hxx> #include <sal/config.h> +#include <com/sun/star/awt/XGraphics.hpp> // cairo-specific #include <cairo.h> @@ -89,6 +90,9 @@ class UNLESS_MERGELIBS(DRAWINGLAYER_DLLPUBLIC) CairoPixelProcessor2D final : pub // calculated result of if we are in outsideCairoCoordinateLimits mode bool mbCairoCoordinateLimitWorkaroundActive; + // the XGraphics which may be set using setXGraphics() + com::sun::star::uno::Reference<com::sun::star::awt::XGraphics> maXGraphics; + // helpers for direct paints void paintPolyPolygonRGBA(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rColor, double fTransparency = 0.0); @@ -188,10 +192,21 @@ class UNLESS_MERGELIBS(DRAWINGLAYER_DLLPUBLIC) CairoPixelProcessor2D final : pub protected: bool hasError() const { return cairo_status(mpRT) != CAIRO_STATUS_SUCCESS; } bool hasRenderTarget() const { return nullptr != mpRT; } + const com::sun::star::uno::Reference<com::sun::star::awt::XGraphics>& getXGraphics() const + { + return maXGraphics; + } public: bool valid() const { return hasRenderTarget() && !hasError(); } + // set a XGraphics for this CairoPixelProcessor2D when it is available + void + setXGraphics(const com::sun::star::uno::Reference<com::sun::star::awt::XGraphics>& rXGraphics) + { + maXGraphics = rXGraphics; + } + // read access to CairoCoordinateLimitWorkaround mechanism bool isCairoCoordinateLimitWorkaroundActive() const { |