LibreOffice Module canvas (master) 1
|
Helper class for basic canvas functionality. More...
#include <dx_bitmapcanvashelper.hxx>
Public Member Functions | |
BitmapCanvasHelper () | |
void | disposing () |
Release all references. More... | |
void | setTarget (const IBitmapSharedPtr &rTarget) |
Set the target for rendering operations. More... | |
void | setTarget (const IBitmapSharedPtr &rTarget, const ::basegfx::B2ISize &rOutputOffset) |
Set the target for rendering operations. More... | |
void | clear () |
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 | copyRect (const css::rendering::XCanvas *pCanvas, const css::uno::Reference< css::rendering::XBitmapCanvas > &sourceCanvas, const css::geometry::RealRectangle2D &sourceRect, const css::rendering::ViewState &sourceViewState, const css::rendering::RenderState &sourceRenderState, const css::geometry::RealRectangle2D &destRect, const css::rendering::ViewState &destViewState, const css::rendering::RenderState &destRenderState) |
css::geometry::IntegerSize2D | getSize () |
css::uno::Reference< css::rendering::XBitmap > | getScaledBitmap (const css::geometry::RealSize2D &newSize, bool beFast) |
css::uno::Sequence< sal_Int8 > | getData (css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerRectangle2D &rect) |
void | setData (const css::uno::Sequence< sal_Int8 > &data, const css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerRectangle2D &rect) |
void | setPixel (const css::uno::Sequence< sal_Int8 > &color, const css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerPoint2D &pos) |
css::uno::Sequence< sal_Int8 > | getPixel (css::rendering::IntegerBitmapLayout &bitmapLayout, const css::geometry::IntegerPoint2D &pos) |
css::uno::Reference< css::rendering::XBitmapPalette > | getPalette () |
css::rendering::IntegerBitmapLayout | getMemoryLayout () |
bool | hasAlpha () const |
Public Member Functions inherited from dxcanvas::CanvasHelper | |
CanvasHelper () | |
CanvasHelper (const CanvasHelper &)=delete | |
make noncopyable More... | |
const CanvasHelper & | operator= (const CanvasHelper &)=delete |
void | disposing () |
Release all references. More... | |
void | setDevice (css::rendering::XGraphicDevice &rDevice) |
Initialize canvas helper. More... | |
void | setTarget (const GraphicsProviderSharedPtr &rTarget) |
Set the target for rendering operations. More... | |
void | setTarget (const GraphicsProviderSharedPtr &rTarget, const ::basegfx::B2ISize &rOutputOffset) |
Set the target for rendering operations. More... | |
void | clear () |
void | drawPoint (const css::rendering::XCanvas *pCanvas, const css::geometry::RealPoint2D &aPoint, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState) |
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) |
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::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) |
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) |
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) |
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) |
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::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 > | 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::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::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::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::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) |
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 > | drawBitmapModulated (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::XGraphicDevice > | getDevice () |
void | flush () const |
void | modifying () |
Called from XCanvas base classes, to notify that content is about to change. More... | |
Protected Attributes | |
IBitmapSharedPtr | mpTarget |
Render target. More... | |
Protected Attributes inherited from dxcanvas::CanvasHelper | |
GDIPlusUserSharedPtr | mpGdiPlusUser |
Refcounted global GDI+ state container. More... | |
css::rendering::XGraphicDevice * | mpDevice |
Phyical output device. More... | |
GraphicsProviderSharedPtr | mpGraphicsProvider |
Provides the Gdiplus::Graphics to render into. More... | |
::basegfx::B2ISize | maOutputOffset |
Current (transformation-independent) output buffer offset. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from dxcanvas::CanvasHelper | |
bool | needOutput () const |
void | setupGraphicsState (GraphicsSharedPtr const &rGraphics, const css::rendering::ViewState &viewState, const css::rendering::RenderState &renderState) |
Gdiplus::CompositingMode | calcCompositingMode (sal_Int8 nMode) |
Helper class for basic canvas functionality.
Also offers optional backbuffer painting, when providing it with a second HDC to render into.
Definition at line 41 of file dx_bitmapcanvashelper.hxx.
dxcanvas::BitmapCanvasHelper::BitmapCanvasHelper | ( | ) |
Definition at line 49 of file dx_bitmapcanvashelper.cxx.
void dxcanvas::BitmapCanvasHelper::clear | ( | ) |
Definition at line 82 of file dx_bitmapcanvashelper.cxx.
References ENSURE_OR_THROW, hasAlpha(), mpTarget, and dxcanvas::CanvasHelper::needOutput().
void dxcanvas::BitmapCanvasHelper::copyRect | ( | const css::rendering::XCanvas * | pCanvas, |
const css::uno::Reference< css::rendering::XBitmapCanvas > & | sourceCanvas, | ||
const css::geometry::RealRectangle2D & | sourceRect, | ||
const css::rendering::ViewState & | sourceViewState, | ||
const css::rendering::RenderState & | sourceRenderState, | ||
const css::geometry::RealRectangle2D & | destRect, | ||
const css::rendering::ViewState & | destViewState, | ||
const css::rendering::RenderState & | destRenderState | ||
) |
Definition at line 128 of file dx_bitmapcanvashelper.cxx.
void dxcanvas::BitmapCanvasHelper::disposing | ( | ) |
Release all references.
Definition at line 53 of file dx_bitmapcanvashelper.cxx.
References dxcanvas::CanvasHelper::disposing(), and mpTarget.
uno::Reference< rendering::XCachedPrimitive > dxcanvas::BitmapCanvasHelper::drawTextLayout | ( | const css::rendering::XCanvas * | pCanvas, |
const css::uno::Reference< css::rendering::XTextLayout > & | laidOutText, | ||
const css::rendering::ViewState & | viewState, | ||
const css::rendering::RenderState & | renderState | ||
) |
Definition at line 101 of file dx_bitmapcanvashelper.cxx.
References dxcanvas::TextLayout::draw(), ENSURE_OR_THROW, dxcanvas::CanvasHelper::maOutputOffset, dxcanvas::CanvasHelper::mpDevice, mpTarget, and dxcanvas::CanvasHelper::needOutput().
css::uno::Sequence< sal_Int8 > dxcanvas::BitmapCanvasHelper::getData | ( | css::rendering::IntegerBitmapLayout & | bitmapLayout, |
const css::geometry::IntegerRectangle2D & | rect | ||
) |
rendering::IntegerBitmapLayout dxcanvas::BitmapCanvasHelper::getMemoryLayout | ( | ) |
Definition at line 208 of file dx_bitmapcanvashelper.cxx.
References getSize(), canvas::tools::getStdMemoryLayout(), and mpTarget.
uno::Reference< rendering::XBitmapPalette > dxcanvas::BitmapCanvasHelper::getPalette | ( | ) |
Definition at line 202 of file dx_bitmapcanvashelper.cxx.
css::uno::Sequence< sal_Int8 > dxcanvas::BitmapCanvasHelper::getPixel | ( | css::rendering::IntegerBitmapLayout & | bitmapLayout, |
const css::geometry::IntegerPoint2D & | pos | ||
) |
css::uno::Reference< css::rendering::XBitmap > dxcanvas::BitmapCanvasHelper::getScaledBitmap | ( | const css::geometry::RealSize2D & | newSize, |
bool | beFast | ||
) |
geometry::IntegerSize2D dxcanvas::BitmapCanvasHelper::getSize | ( | ) |
Definition at line 140 of file dx_bitmapcanvashelper.cxx.
References basegfx::unotools::integerSize2DFromB2ISize(), and mpTarget.
Referenced by getMemoryLayout().
bool dxcanvas::BitmapCanvasHelper::hasAlpha | ( | ) | const |
Definition at line 215 of file dx_bitmapcanvashelper.cxx.
References mpTarget.
Referenced by clear().
void dxcanvas::BitmapCanvasHelper::setData | ( | const css::uno::Sequence< sal_Int8 > & | data, |
const css::rendering::IntegerBitmapLayout & | bitmapLayout, | ||
const css::geometry::IntegerRectangle2D & | rect | ||
) |
Definition at line 166 of file dx_bitmapcanvashelper.cxx.
References ENSURE_OR_THROW, mpTarget, and SAL_INFO.
void dxcanvas::BitmapCanvasHelper::setPixel | ( | const css::uno::Sequence< sal_Int8 > & | color, |
const css::rendering::IntegerBitmapLayout & | bitmapLayout, | ||
const css::geometry::IntegerPoint2D & | pos | ||
) |
Definition at line 178 of file dx_bitmapcanvashelper.cxx.
References ENSURE_OR_THROW, mpTarget, pos, and SAL_INFO.
void dxcanvas::BitmapCanvasHelper::setTarget | ( | const IBitmapSharedPtr & | rTarget | ) |
Set the target for rendering operations.
rTarget | Render target |
Definition at line 59 of file dx_bitmapcanvashelper.cxx.
References ENSURE_OR_THROW, mpTarget, rTarget, and dxcanvas::CanvasHelper::setTarget().
Referenced by dxcanvas::SpriteCanvasHelper::init().
void dxcanvas::BitmapCanvasHelper::setTarget | ( | const IBitmapSharedPtr & | rTarget, |
const ::basegfx::B2ISize & | rOutputOffset | ||
) |
Set the target for rendering operations.
rTarget | Render target |
rOutputOffset | Output offset in pixel |
Definition at line 70 of file dx_bitmapcanvashelper.cxx.
References ENSURE_OR_THROW, mpTarget, rTarget, and dxcanvas::CanvasHelper::setTarget().
|
protected |
Render target.
Definition at line 122 of file dx_bitmapcanvashelper.hxx.
Referenced by clear(), disposing(), drawTextLayout(), getMemoryLayout(), getSize(), hasAlpha(), setData(), setPixel(), and setTarget().