22#include <com/sun/star/geometry/IntegerPoint2D.hpp>
23#include <com/sun/star/geometry/IntegerRectangle2D.hpp>
24#include <com/sun/star/rendering/IntegerBitmapLayout.hpp>
25#include <com/sun/star/rendering/XCanvas.hpp>
78 void init( const ::basegfx::B2ISize& rSizePixel,
79 SurfaceProvider& rSurfaceProvider,
80 css::rendering::XGraphicDevice* pDevice );
82 void setSize( const ::basegfx::B2ISize& rSize );
83 void setSurface( const ::cairo::SurfaceSharedPtr& pSurface,
bool bHasAlpha );
91 void drawLine(
const css::rendering::XCanvas* pCanvas,
92 const css::geometry::RealPoint2D& aStartPoint,
93 const css::geometry::RealPoint2D& aEndPoint,
94 const css::rendering::ViewState& viewState,
95 const css::rendering::RenderState& renderState );
97 const css::geometry::RealBezierSegment2D& aBezierSegment,
98 const css::geometry::RealPoint2D& aEndPoint,
99 const css::rendering::ViewState& viewState,
100 const css::rendering::RenderState& renderState );
101 css::uno::Reference< css::rendering::XCachedPrimitive >
103 const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
104 const css::rendering::ViewState& viewState,
105 const css::rendering::RenderState& renderState );
106 css::uno::Reference< css::rendering::XCachedPrimitive >
108 const css::uno::Reference<
109 css::rendering::XPolyPolygon2D >& xPolyPolygon,
110 const css::rendering::ViewState& viewState,
111 const css::rendering::RenderState& renderState,
112 const css::rendering::StrokeAttributes& strokeAttributes );
113 css::uno::Reference< css::rendering::XCachedPrimitive >
115 const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
116 const css::rendering::ViewState& viewState,
117 const css::rendering::RenderState& renderState,
118 const css::uno::Sequence< css::rendering::Texture >& textures,
119 const css::rendering::StrokeAttributes& strokeAttributes );
120 css::uno::Reference< css::rendering::XCachedPrimitive >
122 const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
123 const css::rendering::ViewState& viewState,
124 const css::rendering::RenderState& renderState,
125 const css::uno::Sequence< css::rendering::Texture >& textures,
126 const css::uno::Reference< css::geometry::XMapping2D >& xMapping,
127 const css::rendering::StrokeAttributes& strokeAttributes );
128 css::uno::Reference< css::rendering::XPolyPolygon2D >
130 const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
131 const css::rendering::ViewState& viewState,
132 const css::rendering::RenderState& renderState,
133 const css::rendering::StrokeAttributes& strokeAttributes );
134 css::uno::Reference< css::rendering::XCachedPrimitive >
136 const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
137 const css::rendering::ViewState& viewState,
138 const css::rendering::RenderState& renderState );
139 css::uno::Reference< css::rendering::XCachedPrimitive >
141 const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
142 const css::rendering::ViewState& viewState,
143 const css::rendering::RenderState& renderState,
144 const css::uno::Sequence< css::rendering::Texture >& textures );
145 css::uno::Reference< css::rendering::XCachedPrimitive >
147 const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
148 const css::rendering::ViewState& viewState,
149 const css::rendering::RenderState& renderState,
150 const css::uno::Sequence< css::rendering::Texture >& textures,
151 const css::uno::Reference< css::geometry::XMapping2D >& xMapping );
153 css::uno::Reference< css::rendering::XCanvasFont >
155 const css::rendering::FontRequest& fontRequest,
156 const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties,
157 const css::geometry::Matrix2D& fontMatrix );
159 css::uno::Sequence< css::rendering::FontInfo >
161 const css::rendering::FontInfo& aFilter,
162 const css::uno::Sequence< css::beans::PropertyValue >& aFontProperties );
164 css::uno::Reference< css::rendering::XCachedPrimitive >
166 const css::rendering::StringContext& text,
167 const css::uno::Reference< css::rendering::XCanvasFont >& xFont,
168 const css::rendering::ViewState& viewState,
169 const css::rendering::RenderState& renderState,
172 css::uno::Reference< css::rendering::XCachedPrimitive >
174 const css::uno::Reference< css::rendering::XTextLayout >& laidOutText,
175 const css::rendering::ViewState& viewState,
176 const css::rendering::RenderState& renderState );
178 css::uno::Reference< css::rendering::XCachedPrimitive >
180 const css::uno::Reference< css::rendering::XBitmap >& xBitmap,
181 const css::rendering::ViewState& viewState,
182 const css::rendering::RenderState& renderState );
183 css::uno::Reference< css::rendering::XCachedPrimitive >
185 const css::uno::Reference< css::rendering::XBitmap >& xBitmap,
186 const css::rendering::ViewState& viewState,
187 const css::rendering::RenderState& renderState );
188 css::uno::Reference< css::rendering::XGraphicDevice >
194 css::geometry::IntegerSize2D
getSize()
const;
196 css::uno::Reference< css::rendering::XBitmap >
200 css::uno::Sequence< sal_Int8 >
201 getData( css::rendering::IntegerBitmapLayout& bitmapLayout,
202 const css::geometry::IntegerRectangle2D& rect );
204 css::uno::Sequence< sal_Int8 >
205 getPixel( css::rendering::IntegerBitmapLayout& bitmapLayout,
206 const css::geometry::IntegerPoint2D& pos );
210 void doPolyPolygonPath(
const css::uno::Reference< css::rendering::XPolyPolygon2D >& xPolyPolygon,
212 bool bNoLineJoin =
false,
213 const css::uno::Sequence< css::rendering::Texture >* pTextures=
nullptr )
const;
216 const css::rendering::XCanvas* pCanvas,
217 const ::cairo::SurfaceSharedPtr& pSurface,
218 const css::rendering::ViewState& viewState,
219 const css::rendering::RenderState& renderState,
220 const css::geometry::IntegerSize2D& rSize,
221 bool bModulateColors,
224 bool repaint( const ::cairo::SurfaceSharedPtr& pSurface,
225 const css::rendering::ViewState& viewState,
226 const css::rendering::RenderState& renderState );
248 void useStates(
const css::rendering::ViewState& viewState,
249 const css::rendering::RenderState& renderState,
252 css::rendering::IntegerBitmapLayout
impl_getMemoryLayout( sal_Int32 nWidth, sal_Int32 nHeight );
266 const css::uno::Sequence< css::rendering::Texture >* pTextures,
268 css::rendering::FillRule eFillrule );
const CanvasHelper & operator=(const CanvasHelper &)=delete
css::uno::Reference< css::rendering::XCachedPrimitive > strokeTextureMappedPolyPolygon(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::uno::Sequence< css::rendering::Texture > &textures, const css::uno::Reference< css::geometry::XMapping2D > &xMapping, const css::rendering::StrokeAttributes &strokeAttributes)
void disposing()
Release all references.
void doPolyPolygonPath(const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, Operation aOperation, bool bNoLineJoin=false, const css::uno::Sequence< css::rendering::Texture > *pTextures=nullptr) const
::cairo::CairoSharedPtr mpCairo
::cairo::SurfaceSharedPtr mpSurface
void drawLine(const css::rendering::XCanvas *pCanvas, const css::geometry::RealPoint2D &aStartPoint, const css::geometry::RealPoint2D &aEndPoint, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
css::rendering::IntegerBitmapLayout impl_getMemoryLayout(sal_Int32 nWidth, sal_Int32 nHeight)
void useStates(const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, bool setColor)
css::uno::Reference< css::rendering::XCachedPrimitive > fillTexturedPolyPolygon(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::uno::Sequence< css::rendering::Texture > &textures)
css::uno::Reference< css::rendering::XBitmap > getScaledBitmap(const css::geometry::RealSize2D &newSize, bool beFast)
css::uno::Reference< css::rendering::XCachedPrimitive > fillPolyPolygon(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
css::uno::Reference< css::rendering::XCachedPrimitive > implDrawBitmapSurface(const css::rendering::XCanvas *pCanvas, const ::cairo::SurfaceSharedPtr &pSurface, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::geometry::IntegerSize2D &rSize, bool bModulateColors, bool bHasAlpha)
void init(const ::basegfx::B2ISize &rSizePixel, SurfaceProvider &rSurfaceProvider, css::rendering::XGraphicDevice *pDevice)
Initialize canvas helper.
css::uno::Reference< css::rendering::XGraphicDevice > getDevice()
bool repaint(const ::cairo::SurfaceSharedPtr &pSurface, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
css::geometry::IntegerSize2D getSize() const
SurfaceProvider * mpSurfaceProvider
Surface provider.
css::uno::Reference< css::rendering::XCachedPrimitive > drawPolyPolygon(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
CanvasHelper(const CanvasHelper &)=delete
make noncopyable
::basegfx::B2ISize maSize
css::rendering::XGraphicDevice * mpDevice
Phyical output device.
css::uno::Reference< css::rendering::XCachedPrimitive > drawBitmapModulated(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XBitmap > &xBitmap, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
void drawBezier(const css::rendering::XCanvas *pCanvas, const css::geometry::RealBezierSegment2D &aBezierSegment, const css::geometry::RealPoint2D &aEndPoint, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
css::uno::Sequence< sal_Int8 > getData(css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerRectangle2D &rect)
css::uno::Sequence< sal_Int8 > getPixel(css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerPoint2D &pos)
VclPtr< VirtualDevice > mpVirtualDevice
css::uno::Reference< css::rendering::XCachedPrimitive > strokeTexturedPolyPolygon(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::uno::Sequence< css::rendering::Texture > &textures, const css::rendering::StrokeAttributes &strokeAttributes)
bool mbHaveAlpha
When true, content is able to represent alpha.
css::uno::Sequence< css::rendering::FontInfo > queryAvailableFonts(const css::rendering::XCanvas *pCanvas, const css::rendering::FontInfo &aFilter, const css::uno::Sequence< css::beans::PropertyValue > &aFontProperties)
css::uno::Reference< css::rendering::XCachedPrimitive > drawText(const css::rendering::XCanvas *pCanvas, const css::rendering::StringContext &text, const css::uno::Reference< css::rendering::XCanvasFont > &xFont, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, sal_Int8 textDirection)
css::uno::Reference< css::rendering::XCanvasFont > createFont(const css::rendering::XCanvas *pCanvas, const css::rendering::FontRequest &fontRequest, const css::uno::Sequence< css::beans::PropertyValue > &extraFontProperties, const css::geometry::Matrix2D &fontMatrix)
css::uno::Reference< css::rendering::XCachedPrimitive > drawBitmap(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XBitmap > &xBitmap, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
css::uno::Reference< css::rendering::XCachedPrimitive > fillTextureMappedPolyPolygon(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::uno::Sequence< css::rendering::Texture > &textures, const css::uno::Reference< css::geometry::XMapping2D > &xMapping)
css::uno::Reference< css::rendering::XCachedPrimitive > drawTextLayout(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XTextLayout > &laidOutText, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
void setSize(const ::basegfx::B2ISize &rSize)
css::uno::Reference< css::rendering::XPolyPolygon2D > queryStrokeShapes(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::rendering::StrokeAttributes &strokeAttributes)
css::rendering::IntegerBitmapLayout getMemoryLayout()
css::uno::Reference< css::rendering::XCachedPrimitive > strokePolyPolygon(const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::rendering::StrokeAttributes &strokeAttributes)
void setSurface(const ::cairo::SurfaceSharedPtr &pSurface, bool bHasAlpha)
std::shared_ptr< Surface > SurfaceSharedPtr
std::shared_ptr< cairo_t > CairoSharedPtr
void doPolyPolygonImplementation(const ::basegfx::B2DPolyPolygon &aPolyPolygon, Operation aOperation, cairo_t *pCairo, const uno::Sequence< rendering::Texture > *pTextures, const SurfaceProviderRef &pDevice, rendering::FillRule eFillrule)
static void setColor(cairo_t *pCairo, const uno::Sequence< double > &rColor)
class SAL_LOPLUGIN_ANNOTATE("crosscast") SurfaceProvider typedef ::rtl::Reference< SurfaceProvider > SurfaceProviderRef
Target interface for XCachedPrimitive implementations.