LibreOffice Module canvas (master) 1
|
#include <dx_spritecanvashelper.hxx>
Public Member Functions | |
SpriteCanvasHelper () | |
void | init (SpriteCanvas &rParent, ::canvas::SpriteRedrawManager &rManager, const IDXRenderModuleSharedPtr &rRenderModule, const std::shared_ptr< canvas::ISurfaceProxyManager > &rSurfaceProxy, const DXSurfaceBitmapSharedPtr &rBackBuffer, const ::basegfx::B2ISize &rOutputOffset) |
void | disposing () |
Dispose all internal references. More... | |
css::uno::Reference< css::rendering::XAnimatedSprite > | createSpriteFromAnimation (const css::uno::Reference< css::rendering::XAnimation > &animation) |
css::uno::Reference< css::rendering::XAnimatedSprite > | createSpriteFromBitmaps (const css::uno::Sequence< css::uno::Reference< css::rendering::XBitmap > > &animationBitmaps, sal_Int8 interpolationMode) |
css::uno::Reference< css::rendering::XCustomSprite > | createCustomSprite (const css::geometry::RealSize2D &spriteSize) |
css::uno::Reference< css::rendering::XSprite > | createClonedSprite (const css::uno::Reference< css::rendering::XSprite > &original) |
bool | updateScreen (const ::basegfx::B2IRectangle &rCurrArea, bool bUpdateAll, bool &io_bSurfaceDirty) |
Actually perform the screen update. More... | |
void | backgroundPaint (const ::basegfx::B2DRange &rUpdateRect) |
Gets called for simple background repaints. More... | |
void | scrollUpdate (const ::basegfx::B2DRange &rMoveStart, const ::basegfx::B2DRange &rMoveEnd, const ::canvas::SpriteRedrawManager::UpdateArea &rUpdateArea) |
Gets called when area can be handled by scrolling. More... | |
void | opaqueUpdate (const ::basegfx::B2DRange &rTotalArea, const std::vector< ::canvas::Sprite::Reference > &rSortedUpdateSprites) |
void | genericUpdate (const ::basegfx::B2DRange &rTotalArea, const std::vector< ::canvas::Sprite::Reference > &rSortedUpdateSprites) |
Public Member Functions inherited from dxcanvas::BitmapCanvasHelper | |
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... | |
Private Attributes | |
SpriteCanvas * | mpSpriteSurface |
For generating sprites. More... | |
::canvas::SpriteRedrawManager * | mpRedrawManager |
Set from the SpriteCanvas: instance coordinating sprite redraw. More... | |
IDXRenderModuleSharedPtr | mpRenderModule |
DX device, handling all low-level rendering. More... | |
std::shared_ptr< canvas::ISurfaceProxyManager > | mpSurfaceProxy |
DXSurfaceBitmapSharedPtr | mpBackBuffer |
Backbuffer, contains the static canvas render output. More... | |
mutable::basegfx::B2IRange | maUpdateRect |
Completely temporary rect storage (used by sprite repaint) More... | |
mutable::basegfx::B2IRange | maScrapRect |
Completely temporary rect storage (used by sprite repaint) More... | |
bool | mbShowSpriteBounds |
When true, show small bound rects around each sprite. 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) |
Protected Attributes inherited from dxcanvas::BitmapCanvasHelper | |
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... | |
Definition at line 40 of file dx_spritecanvashelper.hxx.
dxcanvas::SpriteCanvasHelper::SpriteCanvasHelper | ( | ) |
Definition at line 63 of file dx_spritecanvashelper.cxx.
References mbShowSpriteBounds.
void dxcanvas::SpriteCanvasHelper::backgroundPaint | ( | const ::basegfx::B2DRange & | rUpdateRect | ) |
Gets called for simple background repaints.
Definition at line 219 of file dx_spritecanvashelper.cxx.
References ENSURE_OR_THROW, maScrapRect, mpBackBuffer, and mpRenderModule.
css::uno::Reference< css::rendering::XSprite > dxcanvas::SpriteCanvasHelper::createClonedSprite | ( | const css::uno::Reference< css::rendering::XSprite > & | original | ) |
css::uno::Reference< css::rendering::XCustomSprite > dxcanvas::SpriteCanvasHelper::createCustomSprite | ( | const css::geometry::RealSize2D & | spriteSize | ) |
css::uno::Reference< css::rendering::XAnimatedSprite > dxcanvas::SpriteCanvasHelper::createSpriteFromAnimation | ( | const css::uno::Reference< css::rendering::XAnimation > & | animation | ) |
css::uno::Reference< css::rendering::XAnimatedSprite > dxcanvas::SpriteCanvasHelper::createSpriteFromBitmaps | ( | const css::uno::Sequence< css::uno::Reference< css::rendering::XBitmap > > & | animationBitmaps, |
sal_Int8 | interpolationMode | ||
) |
void dxcanvas::SpriteCanvasHelper::disposing | ( | ) |
Dispose all internal references.
Definition at line 97 of file dx_spritecanvashelper.cxx.
References dxcanvas::CanvasHelper::disposing(), mpBackBuffer, mpRedrawManager, mpRenderModule, and mpSpriteSurface.
void dxcanvas::SpriteCanvasHelper::genericUpdate | ( | const ::basegfx::B2DRange & | rTotalArea, |
const std::vector< ::canvas::Sprite::Reference > & | rSortedUpdateSprites | ||
) |
Definition at line 315 of file dx_spritecanvashelper.cxx.
References ENSURE_OR_THROW, fround(), basegfx::Range2D< typename TYPE, typename TRAITS >::intersect(), maScrapRect, maUpdateRect, mpBackBuffer, and mpRenderModule.
void dxcanvas::SpriteCanvasHelper::init | ( | SpriteCanvas & | rParent, |
::canvas::SpriteRedrawManager & | rManager, | ||
const IDXRenderModuleSharedPtr & | rRenderModule, | ||
const std::shared_ptr< canvas::ISurfaceProxyManager > & | rSurfaceProxy, | ||
const DXSurfaceBitmapSharedPtr & | rBackBuffer, | ||
const ::basegfx::B2ISize & | rOutputOffset | ||
) |
Definition at line 79 of file dx_spritecanvashelper.cxx.
References mpBackBuffer, mpRedrawManager, mpRenderModule, mpSpriteSurface, mpSurfaceProxy, dxcanvas::CanvasHelper::setDevice(), and dxcanvas::BitmapCanvasHelper::setTarget().
void dxcanvas::SpriteCanvasHelper::opaqueUpdate | ( | const ::basegfx::B2DRange & | rTotalArea, |
const std::vector< ::canvas::Sprite::Reference > & | rSortedUpdateSprites | ||
) |
Definition at line 285 of file dx_spritecanvashelper.cxx.
References ENSURE_OR_THROW, fround(), basegfx::Range2D< typename TYPE, typename TRAITS >::intersect(), maScrapRect, maUpdateRect, mpBackBuffer, and mpRenderModule.
void dxcanvas::SpriteCanvasHelper::scrollUpdate | ( | const ::basegfx::B2DRange & | rMoveStart, |
const ::basegfx::B2DRange & | rMoveEnd, | ||
const ::canvas::SpriteRedrawManager::UpdateArea & | rUpdateArea | ||
) |
Gets called when area can be handled by scrolling.
Called method must copy screen content from rMoveStart to rMoveEnd, and restore the background in the uncovered areas.
rMoveStart | Source rect of the scroll |
rMoveEnd | Dest rect of the scroll |
rUpdateArea | All info necessary, should rMoveStart be partially or fully outside the outdev |
Definition at line 230 of file dx_spritecanvashelper.cxx.
References ENSURE_OR_THROW, fround(), basegfx::Range2D< typename TYPE, typename TRAITS >::intersect(), maScrapRect, maUpdateRect, mpBackBuffer, mpRenderModule, and canvas::tools::spritePixelAreaFromB2DRange().
bool dxcanvas::SpriteCanvasHelper::updateScreen | ( | const ::basegfx::B2IRectangle & | rCurrArea, |
bool | bUpdateAll, | ||
bool & | io_bSurfaceDirty | ||
) |
Actually perform the screen update.
rCurrArea | Current window area in absolute screen coordinates |
bUpdateAll | sal_True, if everything must be updated, not only changed sprites |
io_bSurfaceDirty | In/out parameter, whether backbuffer surface is dirty (if yes, we're performing a full update, anyway) |
Definition at line 142 of file dx_spritecanvashelper.cxx.
References canvas::SpriteRedrawManager::clearChangeRecords(), canvas::SpriteRedrawManager::forEachSprite(), canvas::SpriteRedrawManager::forEachSpriteArea(), maScrapRect, maUpdateRect, mpBackBuffer, mpRedrawManager, and mpRenderModule.
|
private |
Completely temporary rect storage (used by sprite repaint)
Definition at line 145 of file dx_spritecanvashelper.hxx.
Referenced by backgroundPaint(), genericUpdate(), opaqueUpdate(), scrollUpdate(), and updateScreen().
|
private |
Completely temporary rect storage (used by sprite repaint)
Definition at line 142 of file dx_spritecanvashelper.hxx.
Referenced by genericUpdate(), opaqueUpdate(), scrollUpdate(), and updateScreen().
|
private |
When true, show small bound rects around each sprite.
Definition at line 148 of file dx_spritecanvashelper.hxx.
Referenced by SpriteCanvasHelper().
|
private |
Backbuffer, contains the static canvas render output.
Definition at line 139 of file dx_spritecanvashelper.hxx.
Referenced by backgroundPaint(), disposing(), genericUpdate(), init(), opaqueUpdate(), scrollUpdate(), and updateScreen().
|
private |
Set from the SpriteCanvas: instance coordinating sprite redraw.
Definition at line 131 of file dx_spritecanvashelper.hxx.
Referenced by disposing(), init(), and updateScreen().
|
private |
DX device, handling all low-level rendering.
Definition at line 134 of file dx_spritecanvashelper.hxx.
Referenced by backgroundPaint(), disposing(), genericUpdate(), init(), opaqueUpdate(), scrollUpdate(), and updateScreen().
|
private |
For generating sprites.
Definition at line 128 of file dx_spritecanvashelper.hxx.
Referenced by disposing(), and init().
|
private |
Definition at line 136 of file dx_spritecanvashelper.hxx.
Referenced by init().