LibreOffice Module canvas (master) 1
|
surfaces denote occupied areas within pages. More...
#include <surface.hxx>
Public Member Functions | |
Surface (PageManagerSharedPtr xPageManager, std::shared_ptr< IColorBuffer > xColorBuffer, const ::basegfx::B2IPoint &rPos, const ::basegfx::B2ISize &rSize) | |
~Surface () | |
void | setColorBufferDirty () |
bool | draw (double fAlpha, const ::basegfx::B2DPoint &rPos, const ::basegfx::B2DHomMatrix &rTransform) |
Render the surface content to screen. More... | |
bool | drawRectangularArea (double fAlpha, const ::basegfx::B2DPoint &rPos, const ::basegfx::B2DRectangle &rArea, const ::basegfx::B2DHomMatrix &rTransform) |
Render the surface content to screen. More... | |
bool | drawWithClip (double fAlpha, const ::basegfx::B2DPoint &rPos, const ::basegfx::B2DPolygon &rClipPoly, const ::basegfx::B2DHomMatrix &rTransform) |
Render the surface content to screen. More... | |
Private Member Functions | |
void | prepareRendering () |
basegfx::B2DRectangle | getUVCoords () const |
basegfx::B2DRectangle | getUVCoords (const ::basegfx::B2IPoint &rPos, const ::basegfx::B2ISize &rSize) const |
Private Attributes | |
std::shared_ptr< IColorBuffer > | mpColorBuffer |
PageManagerSharedPtr | mpPageManager |
FragmentSharedPtr | mpFragment |
::basegfx::B2IPoint | maSourceOffset |
::basegfx::B2ISize | maSize |
bool | mbIsDirty |
surfaces denote occupied areas within pages.
pages encapsulate the hardware buffers that contain image data which can be used for texturing. surfaces are areas within those pages.
Definition at line 40 of file surface.hxx.
canvas::Surface::Surface | ( | PageManagerSharedPtr | xPageManager, |
std::shared_ptr< IColorBuffer > | xColorBuffer, | ||
const ::basegfx::B2IPoint & | rPos, | ||
const ::basegfx::B2ISize & | rSize | ||
) |
Definition at line 31 of file surface.cxx.
canvas::Surface::~Surface | ( | ) |
Definition at line 43 of file surface.cxx.
References mpFragment, and mpPageManager.
bool canvas::Surface::draw | ( | double | fAlpha, |
const ::basegfx::B2DPoint & | rPos, | ||
const ::basegfx::B2DHomMatrix & | rTransform | ||
) |
Render the surface content to screen.
fAlpha | Overall alpha for content |
rPos | Output position |
rTransform | Output transformation (does not affect output position) |
Definition at line 92 of file surface.cxx.
References canvas::Vertex::a, canvas::Vertex::b, basegfx::utils::createTranslateB2DHomMatrix(), canvas::Vertex::g, basegfx::Size2D< typename TYPE >::getHeight(), getUVCoords(), basegfx::Size2D< typename TYPE >::getWidth(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), maSize, maSourceOffset, mpPageManager, prepareRendering(), canvas::IRenderModule::Quad, canvas::Vertex::r, basegfx::B2DHomMatrix::translate(), canvas::Vertex::u, canvas::Vertex::v, canvas::Vertex::x, canvas::Vertex::y, and canvas::Vertex::z.
bool canvas::Surface::drawRectangularArea | ( | double | fAlpha, |
const ::basegfx::B2DPoint & | rPos, | ||
const ::basegfx::B2DRectangle & | rArea, | ||
const ::basegfx::B2DHomMatrix & | rTransform | ||
) |
Render the surface content to screen.
fAlpha | Overall alpha for content |
rPos | Output position |
rArea | Subset of the surface to render. Coordinate system are surface area pixel, given area will be clipped to the surface bounds. |
rTransform | Output transformation (does not affect output position) |
Definition at line 184 of file surface.cxx.
bool canvas::Surface::drawWithClip | ( | double | fAlpha, |
const ::basegfx::B2DPoint & | rPos, | ||
const ::basegfx::B2DPolygon & | rClipPoly, | ||
const ::basegfx::B2DHomMatrix & | rTransform | ||
) |
Render the surface content to screen.
fAlpha | Overall alpha for content |
rPos | Output position |
rClipPoly | Clip polygon for the surface. The clip polygon is also subject to the output transformation. |
rTransform | Output transformation (does not affect output position) |
Definition at line 302 of file surface.cxx.
|
private |
Definition at line 54 of file surface.cxx.
References basegfx::Size2D< typename TYPE >::getHeight(), basegfx::Size2D< typename TYPE >::getWidth(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), maSize, mpFragment, and mpPageManager.
Referenced by draw().
|
private |
Definition at line 74 of file surface.cxx.
References basegfx::Size2D< typename TYPE >::getHeight(), basegfx::Size2D< typename TYPE >::getWidth(), and mpPageManager.
|
private |
Definition at line 395 of file surface.cxx.
Referenced by draw().
void canvas::Surface::setColorBufferDirty | ( | ) |
Definition at line 49 of file surface.cxx.
References mbIsDirty.
|
private |
Definition at line 128 of file surface.hxx.
Referenced by draw(), and getUVCoords().
|
private |
Definition at line 122 of file surface.hxx.
Referenced by draw().
|
private |
Definition at line 130 of file surface.hxx.
Referenced by setColorBufferDirty().
|
private |
Definition at line 110 of file surface.hxx.
|
private |
Definition at line 116 of file surface.hxx.
Referenced by getUVCoords(), and ~Surface().
|
private |
Definition at line 114 of file surface.hxx.
Referenced by draw(), getUVCoords(), and ~Surface().