LibreOffice Module drawinglayer (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
drawinglayer::primitive2d::GridPrimitive2D Class Referencefinal

GridPrimitive2D class. More...

#include <gridprimitive2d.hxx>

Inheritance diagram for drawinglayer::primitive2d::GridPrimitive2D:
[legend]
Collaboration diagram for drawinglayer::primitive2d::GridPrimitive2D:
[legend]

Public Member Functions

 GridPrimitive2D (basegfx::B2DHomMatrix aTransform, double fWidth, double fHeight, double fSmallestViewDistance, double fSmallestSubdivisionViewDistance, sal_uInt32 nSubdivisionsX, sal_uInt32 nSubdivisionsY, const basegfx::BColor &rBColor, const BitmapEx &rCrossMarker)
 constructor More...
 
const basegfx::B2DHomMatrixgetTransform () const
 data read access More...
 
double getWidth () const
 
double getHeight () const
 
double getSmallestViewDistance () const
 
double getSmallestSubdivisionViewDistance () const
 
sal_uInt32 getSubdivisionsX () const
 
sal_uInt32 getSubdivisionsY () const
 
const basegfx::BColorgetBColor () const
 
const BitmapExgetCrossMarker () const
 
virtual bool operator== (const BasePrimitive2D &rPrimitive) const override
 compare operator More...
 
virtual basegfx::B2DRange getB2DRange (const geometry::ViewInformation2D &rViewInformation) const override
 get 2d range More...
 
virtual sal_uInt32 getPrimitive2DID () const override
 provide unique ID More...
 
virtual void get2DDecomposition (Primitive2DDecompositionVisitor &rVisitor, const geometry::ViewInformation2D &rViewInformation) const override
 Override standard getDecomposition to be view-dependent here. More...
 
- Public Member Functions inherited from drawinglayer::primitive2d::BufferedDecompositionPrimitive2D
 BufferedDecompositionPrimitive2D ()
 
virtual void get2DDecomposition (Primitive2DDecompositionVisitor &rVisitor, const geometry::ViewInformation2D &rViewInformation) const override
 The getDecomposition default implementation will on demand use create2DDecomposition() if maBuffered2DDecomposition is empty. More...
 
void setTransparenceForShadow (sal_uInt16 nTransparenceForShadow)
 
sal_uInt16 getTransparenceForShadow () const
 
- Public Member Functions inherited from drawinglayer::primitive2d::BasePrimitive2D
 BasePrimitive2D ()
 
virtual ~BasePrimitive2D () override
 
virtual bool operator== (const BasePrimitive2D &rPrimitive) const
 the ==operator is mainly needed to allow testing newly-created primitives against their last incarnation which buffers/holds the made decompositions. More...
 
bool operator!= (const BasePrimitive2D &rPrimitive) const
 
virtual basegfx::B2DRange getB2DRange (const geometry::ViewInformation2D &rViewInformation) const
 The default implementation will use getDecomposition results to create the range. More...
 
virtual sal_uInt32 getPrimitive2DID () const =0
 provide unique ID for fast identifying of known primitive implementations in renderers. More...
 
virtual void get2DDecomposition (Primitive2DDecompositionVisitor &rVisitor, const geometry::ViewInformation2D &rViewInformation) const
 The default implementation will return an empty sequence. More...
 
Primitive2DContainer getDecomposition (const css::uno::Sequence< css::beans::PropertyValue > &rViewParameters)
 The getDecomposition implementation for UNO API will use getDecomposition from this implementation. More...
 
css::geometry::RealRectangle2D getRange (const css::uno::Sequence< css::beans::PropertyValue > &rViewParameters)
 The getRange implementation for UNO API will use getRange from this implementation. More...
 
virtual sal_Int64 estimateUsage ()
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Private Member Functions

virtual void create2DDecomposition (Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
 create local decomposition More...
 

Private Attributes

basegfx::B2DHomMatrix maTransform
 The geometry definition for the grid area. More...
 
double mfWidth
 grid layout definitions More...
 
double mfHeight
 
double mfSmallestViewDistance
 
double mfSmallestSubdivisionViewDistance
 
sal_uInt32 mnSubdivisionsX
 
sal_uInt32 mnSubdivisionsY
 
basegfx::BColor maBColor
 Grid color for single-pixel grid points. More...
 
BitmapEx maCrossMarker
 The Bitmap (with transparence) for grid cross points. More...
 
basegfx::B2DHomMatrix maLastObjectToViewTransformation
 the last used object to view transformtion and the last Viewport, used from getDecomposition for decide buffering More...
 
basegfx::B2DRange maLastViewport
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Member Functions inherited from drawinglayer::primitive2d::BufferedDecompositionPrimitive2D
const Primitive2DContainergetBuffered2DDecomposition () const
 access methods to maBuffered2DDecomposition. More...
 
void setBuffered2DDecomposition (Primitive2DContainer &&rNew)
 
virtual void create2DDecomposition (Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const =0
 method which is to be used to implement the local decomposition of a 2D primitive. More...
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

GridPrimitive2D class.

This primitive is specialized to Grid visualisation. The graphic definition (Transform) contains the whole grid area, but will of course be combined with the visible area (Viewport) when decomposed. Also a resolution-dependent point reduction is used to not create too much grid visualisation data. This makes this primitive highly view-dependent and it dynamically buffers the last decomposition dependent from the Viewport used.

Definition at line 43 of file gridprimitive2d.hxx.

Constructor & Destructor Documentation

◆ GridPrimitive2D()

drawinglayer::primitive2d::GridPrimitive2D::GridPrimitive2D ( basegfx::B2DHomMatrix  aTransform,
double  fWidth,
double  fHeight,
double  fSmallestViewDistance,
double  fSmallestSubdivisionViewDistance,
sal_uInt32  nSubdivisionsX,
sal_uInt32  nSubdivisionsY,
const basegfx::BColor rBColor,
const BitmapEx rCrossMarker 
)

constructor

Definition at line 253 of file gridprimitive2d.cxx.

Member Function Documentation

◆ create2DDecomposition()

void drawinglayer::primitive2d::GridPrimitive2D::create2DDecomposition ( Primitive2DContainer rContainer,
const geometry::ViewInformation2D rViewInformation 
) const
overrideprivatevirtual

◆ get2DDecomposition()

void drawinglayer::primitive2d::GridPrimitive2D::get2DDecomposition ( Primitive2DDecompositionVisitor rVisitor,
const geometry::ViewInformation2D rViewInformation 
) const
overridevirtual

◆ getB2DRange()

basegfx::B2DRange drawinglayer::primitive2d::GridPrimitive2D::getB2DRange ( const geometry::ViewInformation2D rViewInformation) const
overridevirtual

◆ getBColor()

const basegfx::BColor & drawinglayer::primitive2d::GridPrimitive2D::getBColor ( ) const
inline

Definition at line 93 of file gridprimitive2d.hxx.

Referenced by create2DDecomposition(), and operator==().

◆ getCrossMarker()

const BitmapEx & drawinglayer::primitive2d::GridPrimitive2D::getCrossMarker ( ) const
inline

Definition at line 94 of file gridprimitive2d.hxx.

Referenced by create2DDecomposition(), and operator==().

◆ getHeight()

double drawinglayer::primitive2d::GridPrimitive2D::getHeight ( ) const
inline

Definition at line 88 of file gridprimitive2d.hxx.

Referenced by create2DDecomposition(), and operator==().

◆ getPrimitive2DID()

sal_uInt32 drawinglayer::primitive2d::GridPrimitive2D::getPrimitive2DID ( ) const
overridevirtual

provide unique ID

Implements drawinglayer::primitive2d::BasePrimitive2D.

Definition at line 330 of file gridprimitive2d.cxx.

References PRIMITIVE2D_ID_GRIDPRIMITIVE2D.

◆ getSmallestSubdivisionViewDistance()

double drawinglayer::primitive2d::GridPrimitive2D::getSmallestSubdivisionViewDistance ( ) const
inline

Definition at line 90 of file gridprimitive2d.hxx.

Referenced by create2DDecomposition(), and operator==().

◆ getSmallestViewDistance()

double drawinglayer::primitive2d::GridPrimitive2D::getSmallestViewDistance ( ) const
inline

Definition at line 89 of file gridprimitive2d.hxx.

Referenced by create2DDecomposition(), and operator==().

◆ getSubdivisionsX()

sal_uInt32 drawinglayer::primitive2d::GridPrimitive2D::getSubdivisionsX ( ) const
inline

Definition at line 91 of file gridprimitive2d.hxx.

Referenced by create2DDecomposition(), and operator==().

◆ getSubdivisionsY()

sal_uInt32 drawinglayer::primitive2d::GridPrimitive2D::getSubdivisionsY ( ) const
inline

Definition at line 92 of file gridprimitive2d.hxx.

Referenced by create2DDecomposition(), and operator==().

◆ getTransform()

const basegfx::B2DHomMatrix & drawinglayer::primitive2d::GridPrimitive2D::getTransform ( ) const
inline

data read access

Definition at line 86 of file gridprimitive2d.hxx.

References maTransform.

Referenced by create2DDecomposition(), getB2DRange(), and operator==().

◆ getWidth()

double drawinglayer::primitive2d::GridPrimitive2D::getWidth ( ) const
inline

Definition at line 87 of file gridprimitive2d.hxx.

Referenced by create2DDecomposition(), and operator==().

◆ operator==()

bool drawinglayer::primitive2d::GridPrimitive2D::operator== ( const BasePrimitive2D rPrimitive) const
overridevirtual

Member Data Documentation

◆ maBColor

basegfx::BColor drawinglayer::primitive2d::GridPrimitive2D::maBColor
private

Grid color for single-pixel grid points.

Definition at line 58 of file gridprimitive2d.hxx.

◆ maCrossMarker

BitmapEx drawinglayer::primitive2d::GridPrimitive2D::maCrossMarker
private

The Bitmap (with transparence) for grid cross points.

Definition at line 61 of file gridprimitive2d.hxx.

◆ maLastObjectToViewTransformation

basegfx::B2DHomMatrix drawinglayer::primitive2d::GridPrimitive2D::maLastObjectToViewTransformation
private

the last used object to view transformtion and the last Viewport, used from getDecomposition for decide buffering

Definition at line 66 of file gridprimitive2d.hxx.

Referenced by get2DDecomposition().

◆ maLastViewport

basegfx::B2DRange drawinglayer::primitive2d::GridPrimitive2D::maLastViewport
private

Definition at line 67 of file gridprimitive2d.hxx.

Referenced by get2DDecomposition().

◆ maTransform

basegfx::B2DHomMatrix drawinglayer::primitive2d::GridPrimitive2D::maTransform
private

The geometry definition for the grid area.

Definition at line 47 of file gridprimitive2d.hxx.

◆ mfHeight

double drawinglayer::primitive2d::GridPrimitive2D::mfHeight
private

Definition at line 51 of file gridprimitive2d.hxx.

◆ mfSmallestSubdivisionViewDistance

double drawinglayer::primitive2d::GridPrimitive2D::mfSmallestSubdivisionViewDistance
private

Definition at line 53 of file gridprimitive2d.hxx.

◆ mfSmallestViewDistance

double drawinglayer::primitive2d::GridPrimitive2D::mfSmallestViewDistance
private

Definition at line 52 of file gridprimitive2d.hxx.

◆ mfWidth

double drawinglayer::primitive2d::GridPrimitive2D::mfWidth
private

grid layout definitions

Definition at line 50 of file gridprimitive2d.hxx.

◆ mnSubdivisionsX

sal_uInt32 drawinglayer::primitive2d::GridPrimitive2D::mnSubdivisionsX
private

Definition at line 54 of file gridprimitive2d.hxx.

◆ mnSubdivisionsY

sal_uInt32 drawinglayer::primitive2d::GridPrimitive2D::mnSubdivisionsY
private

Definition at line 55 of file gridprimitive2d.hxx.


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