LibreOffice Module drawinglayer (master) 1
|
TransformPrimitive2D class. More...
#include <transformprimitive2d.hxx>
Public Member Functions | |
TransformPrimitive2D (basegfx::B2DHomMatrix aTransformation, Primitive2DContainer &&rChildren) | |
constructor More... | |
const basegfx::B2DHomMatrix & | getTransformation () const |
data read access More... | |
virtual bool | operator== (const BasePrimitive2D &rPrimitive) const override |
compare operator More... | |
virtual basegfx::B2DRange | getB2DRange (const geometry::ViewInformation2D &rViewInformation) const override |
get range More... | |
virtual sal_uInt32 | getPrimitive2DID () const override |
provide unique ID More... | |
Public Member Functions inherited from drawinglayer::primitive2d::GroupPrimitive2D | |
GroupPrimitive2D (Primitive2DContainer &&aChildren) | |
constructor More... | |
const Primitive2DContainer & | getChildren () const |
data read access More... | |
void | getChildren (Primitive2DDecompositionVisitor &rVisitor) const |
virtual bool | operator== (const BasePrimitive2D &rPrimitive) const override |
compare operator More... | |
virtual void | get2DDecomposition (Primitive2DDecompositionVisitor &rVisitor, const geometry::ViewInformation2D &rViewInformation) const override |
local decomposition. Implementation will just return children More... | |
virtual sal_uInt32 | getPrimitive2DID () const override |
provide unique ID More... | |
virtual sal_Int64 | estimateUsage () override |
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 Attributes | |
basegfx::B2DHomMatrix | maTransformation |
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 salhelper::SimpleReferenceObject | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
Protected Attributes inherited from salhelper::SimpleReferenceObject | |
oslInterlockedCount | m_nCount |
TransformPrimitive2D class.
This is one of the basic grouping primitives and it provides embedding a sequence of primitives (a geometry) into a transformation. All renderers have to handle this, usually by building a current transformation stack (linear combination) and applying this to all to-be-rendered geometry. If not handling this, the output will be mostly wrong since this primitive is widely used.
It does transform by embedding an existing geometry into a transformation as Child-content. This allows re-usage of the refcounted Uno-Api primitives and their existing, buffered decompositions.
It could e.g. be used to show a single object geometry in 1000 different, transformed states without the need to create those thousand primitive contents.
Definition at line 49 of file transformprimitive2d.hxx.
drawinglayer::primitive2d::TransformPrimitive2D::TransformPrimitive2D | ( | basegfx::B2DHomMatrix | aTransformation, |
Primitive2DContainer && | rChildren | ||
) |
|
overridevirtual |
get range
Reimplemented from drawinglayer::primitive2d::BasePrimitive2D.
Definition at line 50 of file transformprimitive2d.cxx.
References getB2DRange(), drawinglayer::primitive2d::GroupPrimitive2D::getChildren(), getTransformation(), and basegfx::B2DRange::transform().
Referenced by getB2DRange().
|
overridevirtual |
provide unique ID
Reimplemented from drawinglayer::primitive2d::GroupPrimitive2D.
Definition at line 58 of file transformprimitive2d.cxx.
References PRIMITIVE2D_ID_TRANSFORMPRIMITIVE2D.
|
inline |
data read access
Definition at line 62 of file transformprimitive2d.hxx.
References maTransformation.
Referenced by drawinglayer::Primitive2dXmlDump::decomposeAndWrite(), getB2DRange(), operator==(), drawinglayer::processor2d::ContourExtractor2D::processBasePrimitive2D(), drawinglayer::processor2d::HitTestProcessor2D::processBasePrimitive2D(), drawinglayer::processor2d::LineGeometryExtractor2D::processBasePrimitive2D(), drawinglayer::processor2d::TextAsPolygonExtractor2D::processBasePrimitive2D(), drawinglayer::processor2d::CairoPixelProcessor2D::processTransformPrimitive2D(), drawinglayer::processor2d::D2DPixelProcessor2D::processTransformPrimitive2D(), and drawinglayer::processor2d::VclProcessor2D::RenderTransformPrimitive2D().
|
overridevirtual |
compare operator
Reimplemented from drawinglayer::primitive2d::GroupPrimitive2D.
Definition at line 38 of file transformprimitive2d.cxx.
References getTransformation().
|
private |
Definition at line 53 of file transformprimitive2d.hxx.