LibreOffice Module canvas (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
canvas::Surface Class Reference

surfaces denote occupied areas within pages. More...

#include <surface.hxx>

Collaboration diagram for canvas::Surface:
[legend]

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< IColorBuffermpColorBuffer
 
PageManagerSharedPtr mpPageManager
 
FragmentSharedPtr mpFragment
 
::basegfx::B2IPoint maSourceOffset
 
::basegfx::B2ISize maSize
 
bool mbIsDirty
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Surface()

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.

◆ ~Surface()

canvas::Surface::~Surface ( )

Definition at line 43 of file surface.cxx.

References mpFragment, and mpPageManager.

Member Function Documentation

◆ draw()

bool canvas::Surface::draw ( double  fAlpha,
const ::basegfx::B2DPoint rPos,
const ::basegfx::B2DHomMatrix rTransform 
)

◆ drawRectangularArea()

bool canvas::Surface::drawRectangularArea ( double  fAlpha,
const ::basegfx::B2DPoint rPos,
const ::basegfx::B2DRectangle rArea,
const ::basegfx::B2DHomMatrix rTransform 
)

Render the surface content to screen.

Parameters
fAlphaOverall alpha for content
rPosOutput position
rAreaSubset of the surface to render. Coordinate system are surface area pixel, given area will be clipped to the surface bounds.
rTransformOutput transformation (does not affect output position)

Definition at line 184 of file surface.cxx.

◆ drawWithClip()

bool canvas::Surface::drawWithClip ( double  fAlpha,
const ::basegfx::B2DPoint rPos,
const ::basegfx::B2DPolygon rClipPoly,
const ::basegfx::B2DHomMatrix rTransform 
)

Render the surface content to screen.

Parameters
fAlphaOverall alpha for content
rPosOutput position
rClipPolyClip polygon for the surface. The clip polygon is also subject to the output transformation.
rTransformOutput transformation (does not affect output position)

Definition at line 302 of file surface.cxx.

◆ getUVCoords() [1/2]

basegfx::B2DRectangle canvas::Surface::getUVCoords ( ) const
private

◆ getUVCoords() [2/2]

basegfx::B2DRectangle canvas::Surface::getUVCoords ( const ::basegfx::B2IPoint rPos,
const ::basegfx::B2ISize rSize 
) const
private

◆ prepareRendering()

void canvas::Surface::prepareRendering ( )
private

Definition at line 395 of file surface.cxx.

Referenced by draw().

◆ setColorBufferDirty()

void canvas::Surface::setColorBufferDirty ( )

Definition at line 49 of file surface.cxx.

References mbIsDirty.

Member Data Documentation

◆ maSize

::basegfx::B2ISize canvas::Surface::maSize
private

Definition at line 128 of file surface.hxx.

Referenced by draw(), and getUVCoords().

◆ maSourceOffset

::basegfx::B2IPoint canvas::Surface::maSourceOffset
private

Definition at line 122 of file surface.hxx.

Referenced by draw().

◆ mbIsDirty

bool canvas::Surface::mbIsDirty
private

Definition at line 130 of file surface.hxx.

Referenced by setColorBufferDirty().

◆ mpColorBuffer

std::shared_ptr<IColorBuffer> canvas::Surface::mpColorBuffer
private

Definition at line 110 of file surface.hxx.

◆ mpFragment

FragmentSharedPtr canvas::Surface::mpFragment
private

Definition at line 116 of file surface.hxx.

Referenced by getUVCoords(), and ~Surface().

◆ mpPageManager

PageManagerSharedPtr canvas::Surface::mpPageManager
private

Definition at line 114 of file surface.hxx.

Referenced by draw(), getUVCoords(), and ~Surface().


The documentation for this class was generated from the following files: