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>
77 void init( css::rendering::XGraphicDevice& rDevice,
103 void drawLine(
const css::rendering::XCanvas* rCanvas,
104 const css::geometry::RealPoint2D& aStartPoint,
105 const css::geometry::RealPoint2D& aEndPoint,
106 const css::rendering::ViewState& viewState,
107 const css::rendering::RenderState& renderState );
109 const css::geometry::RealBezierSegment2D& aBezierSegment,
110 const css::geometry::RealPoint2D& aEndPoint,
111 const css::rendering::ViewState& viewState,
112 const css::rendering::RenderState& renderState );
113 css::uno::Reference< css::rendering::XCachedPrimitive >
115 const css::uno::Reference<
116 css::rendering::XPolyPolygon2D >& xPolyPolygon,
117 const css::rendering::ViewState& viewState,
118 const css::rendering::RenderState& renderState );
119 css::uno::Reference< css::rendering::XCachedPrimitive >
121 const css::uno::Reference<
122 css::rendering::XPolyPolygon2D >& xPolyPolygon,
123 const css::rendering::ViewState& viewState,
124 const css::rendering::RenderState& renderState,
125 const css::rendering::StrokeAttributes& strokeAttributes );
126 css::uno::Reference< css::rendering::XCachedPrimitive >
128 const css::uno::Reference<
129 css::rendering::XPolyPolygon2D >& xPolyPolygon,
130 const css::rendering::ViewState& viewState,
131 const css::rendering::RenderState& renderState,
132 const css::uno::Sequence<
133 css::rendering::Texture >& textures,
134 const css::rendering::StrokeAttributes& strokeAttributes );
135 css::uno::Reference< css::rendering::XCachedPrimitive >
137 const css::uno::Reference<
138 css::rendering::XPolyPolygon2D >& xPolyPolygon,
139 const css::rendering::ViewState& viewState,
140 const css::rendering::RenderState& renderState,
141 const css::uno::Sequence<
142 css::rendering::Texture >& textures,
143 const css::uno::Reference<
144 css::geometry::XMapping2D >& xMapping,
145 const css::rendering::StrokeAttributes& strokeAttributes );
146 css::uno::Reference< css::rendering::XPolyPolygon2D >
148 const css::uno::Reference<
149 css::rendering::XPolyPolygon2D >& xPolyPolygon,
150 const css::rendering::ViewState& viewState,
151 const css::rendering::RenderState& renderState,
152 const css::rendering::StrokeAttributes& strokeAttributes );
153 css::uno::Reference< css::rendering::XCachedPrimitive >
155 const css::uno::Reference<
156 css::rendering::XPolyPolygon2D >& xPolyPolygon,
157 const css::rendering::ViewState& viewState,
158 const css::rendering::RenderState& renderState );
159 css::uno::Reference< css::rendering::XCachedPrimitive >
161 const css::uno::Reference<
162 css::rendering::XPolyPolygon2D >& xPolyPolygon,
163 const css::rendering::ViewState& viewState,
164 const css::rendering::RenderState& renderState,
165 const css::uno::Sequence<
166 css::rendering::Texture >& textures );
167 css::uno::Reference< css::rendering::XCachedPrimitive >
169 const css::uno::Reference<
170 css::rendering::XPolyPolygon2D >& xPolyPolygon,
171 const css::rendering::ViewState& viewState,
172 const css::rendering::RenderState& renderState,
173 const css::uno::Sequence<
174 css::rendering::Texture >& textures,
175 const css::uno::Reference<
176 css::geometry::XMapping2D >& xMapping );
178 css::uno::Reference< css::rendering::XCanvasFont >
180 const css::rendering::FontRequest& fontRequest,
181 const css::uno::Sequence<
182 css::beans::PropertyValue >& extraFontProperties,
183 const css::geometry::Matrix2D& fontMatrix );
185 css::uno::Sequence< css::rendering::FontInfo >
187 const css::rendering::FontInfo& aFilter,
188 const css::uno::Sequence<
189 css::beans::PropertyValue >& aFontProperties );
191 css::uno::Reference< css::rendering::XCachedPrimitive >
193 const css::rendering::StringContext& text,
194 const css::uno::Reference<
195 css::rendering::XCanvasFont >& xFont,
196 const css::rendering::ViewState& viewState,
197 const css::rendering::RenderState& renderState,
200 css::uno::Reference< css::rendering::XCachedPrimitive >
202 const css::uno::Reference<
203 css::rendering::XTextLayout >& laidOutText,
204 const css::rendering::ViewState& viewState,
205 const css::rendering::RenderState& renderState );
207 css::uno::Reference< css::rendering::XCachedPrimitive >
209 const css::uno::Reference<
210 css::rendering::XBitmap >& xBitmap,
211 const css::rendering::ViewState& viewState,
212 const css::rendering::RenderState& renderState );
213 css::uno::Reference< css::rendering::XCachedPrimitive >
215 const css::uno::Reference<
216 css::rendering::XBitmap >& xBitmap,
217 const css::rendering::ViewState& viewState,
218 const css::rendering::RenderState& renderState );
221 css::uno::Reference< css::rendering::XGraphicDevice >
228 css::geometry::IntegerSize2D
getSize();
230 css::uno::Reference< css::rendering::XBitmap >
234 css::uno::Sequence< sal_Int8 >
235 getData( css::rendering::IntegerBitmapLayout& bitmapLayout,
236 const css::geometry::IntegerRectangle2D& rect );
238 css::uno::Sequence< sal_Int8 >
239 getPixel( css::rendering::IntegerBitmapLayout& bitmapLayout,
240 const css::geometry::IntegerPoint2D& pos );
246 const css::rendering::ViewState& viewState,
247 const css::rendering::RenderState& renderState,
267 const css::rendering::RenderState& renderState,
293 css::uno::Reference< css::rendering::XCachedPrimitive >
295 const css::uno::Reference<
296 css::rendering::XBitmap >& xBitmap,
297 const css::rendering::ViewState& viewState,
298 const css::rendering::RenderState& renderState,
299 bool bModulateColors );
302 const css::rendering::ViewState& viewState,
303 const css::rendering::RenderState& renderState,
304 const css::uno::Reference< css::rendering::XCanvasFont >& xFont )
const;
Helper class for basic canvas functionality.
css::uno::Reference< css::rendering::XCachedPrimitive > strokeTextureMappedPolyPolygon(const css::rendering::XCanvas *rCanvas, 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)
CanvasHelper()
Create canvas helper.
const CanvasHelper & operator=(const CanvasHelper &)=delete
css::geometry::IntegerSize2D getSize()
css::rendering::XGraphicDevice * mpDevice
Phyical output device.
css::uno::Reference< css::rendering::XCachedPrimitive > drawTextLayout(const css::rendering::XCanvas *rCanvas, const css::uno::Reference< css::rendering::XTextLayout > &laidOutText, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
void flush() const
Flush drawing queue.
OutDevProviderSharedPtr mpProtectedOutDevProvider
Rendering to this outdev preserves its state.
void disposing()
Release all references.
bool repaint(const GraphicObjectSharedPtr &rGrf, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const ::Point &rPt, const ::Size &rSz, const GraphicAttr &rAttr) const
Repaint a cached bitmap.
css::uno::Sequence< css::rendering::FontInfo > queryAvailableFonts(const css::rendering::XCanvas *rCanvas, const css::rendering::FontInfo &aFilter, const css::uno::Sequence< css::beans::PropertyValue > &aFontProperties)
int setupOutDevState(const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, ColorType eColorType) const
css::uno::Reference< css::rendering::XCachedPrimitive > drawPolyPolygon(const css::rendering::XCanvas *rCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
css::uno::Reference< css::rendering::XCachedPrimitive > fillTexturedPolyPolygon(const css::rendering::XCanvas *rCanvas, 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::XCachedPrimitive > strokeTexturedPolyPolygon(const css::rendering::XCanvas *rCanvas, 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)
css::uno::Reference< css::rendering::XPolyPolygon2D > queryStrokeShapes(const css::rendering::XCanvas *rCanvas, 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 > fillTextureMappedPolyPolygon(const css::rendering::XCanvas *rCanvas, 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 > strokePolyPolygon(const css::rendering::XCanvas *rCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::rendering::StrokeAttributes &strokeAttributes)
void setOutDev(const OutDevProviderSharedPtr &rOutDev, bool bProtect)
Set primary output device.
void init(css::rendering::XGraphicDevice &rDevice, const OutDevProviderSharedPtr &rOutDev, bool bProtect, bool bHaveAlpha)
Initialize canvas helper.
css::uno::Reference< css::rendering::XGraphicDevice > getDevice()
css::uno::Reference< css::rendering::XCachedPrimitive > drawBitmap(const css::rendering::XCanvas *rCanvas, const css::uno::Reference< css::rendering::XBitmap > &xBitmap, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
bool setupTextOutput(::Point &o_rOutPos, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, const css::uno::Reference< css::rendering::XCanvasFont > &xFont) const
css::uno::Reference< css::rendering::XCachedPrimitive > implDrawBitmap(const css::rendering::XCanvas *rCanvas, const css::uno::Reference< css::rendering::XBitmap > &xBitmap, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState, bool bModulateColors)
void drawLine(const css::rendering::XCanvas *rCanvas, const css::geometry::RealPoint2D &aStartPoint, const css::geometry::RealPoint2D &aEndPoint, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
css::uno::Sequence< sal_Int8 > getPixel(css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerPoint2D &pos)
css::uno::Reference< css::rendering::XCachedPrimitive > drawBitmapModulated(const css::rendering::XCanvas *rCanvas, const css::uno::Reference< css::rendering::XBitmap > &xBitmap, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
OutDevProviderSharedPtr mpOutDevProvider
Rendering to this outdev does not preserve its state.
OutDevProviderSharedPtr mp2ndOutDevProvider
Rendering to this outdev does not preserve its state.
css::uno::Reference< css::rendering::XCanvasFont > createFont(const css::rendering::XCanvas *rCanvas, const css::rendering::FontRequest &fontRequest, const css::uno::Sequence< css::beans::PropertyValue > &extraFontProperties, const css::geometry::Matrix2D &fontMatrix)
void setBackgroundOutDev(const OutDevProviderSharedPtr &rOutDev)
Set secondary output device.
void drawBezier(const css::rendering::XCanvas *rCanvas, const css::geometry::RealBezierSegment2D &aBezierSegment, const css::geometry::RealPoint2D &aEndPoint, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
CanvasHelper(const CanvasHelper &)=delete
make noncopyable
css::uno::Reference< css::rendering::XCachedPrimitive > drawText(const css::rendering::XCanvas *rCanvas, 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::Sequence< sal_Int8 > getData(css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerRectangle2D &rect)
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 *rCanvas, const css::uno::Reference< css::rendering::XPolyPolygon2D > &xPolyPolygon, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState)
bool mbHaveAlpha
When true, content is able to represent alpha.
std::shared_ptr< OutDevProvider > OutDevProviderSharedPtr
std::shared_ptr< GraphicObject > GraphicObjectSharedPtr