LibreOffice Module drawinglayer (master) 1
|
FillHatchPrimitive2D class. More...
#include <fillhatchprimitive2d.hxx>
Public Member Functions | |
FillHatchPrimitive2D (const basegfx::B2DRange &rOutputRange, const basegfx::BColor &rBColor, attribute::FillHatchAttribute aFillHatch) | |
constructors. The one without definition range will use output range as definition range More... | |
FillHatchPrimitive2D (const basegfx::B2DRange &rOutputRange, const basegfx::B2DRange &rDefinitionRange, const basegfx::BColor &rBColor, attribute::FillHatchAttribute aFillHatch) | |
const basegfx::B2DRange & | getOutputRange () const |
data read access More... | |
const basegfx::B2DRange & | getDefinitionRange () const |
const attribute::FillHatchAttribute & | getFillHatch () const |
const basegfx::BColor & | getBColor () const |
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 void | get2DDecomposition (Primitive2DDecompositionVisitor &rVisitor, const geometry::ViewInformation2D &rViewInformation) const override |
Override standard getDecomposition to be view-dependent here. More... | |
virtual sal_uInt32 | getPrimitive2DID () const override |
provide unique ID More... | |
Public Member Functions inherited from drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D | |
DiscreteMetricDependentPrimitive2D () | |
constructor More... | |
double | getDiscreteUnit () const |
data read access 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 |
local decomposition. More... | |
Private Attributes | |
basegfx::B2DRange | maOutputRange |
the geometrically visible area More... | |
basegfx::B2DRange | maDefinitionRange |
the area the gradient definition is based on in the simplest case identical to OutputRange More... | |
attribute::FillHatchAttribute | maFillHatch |
the hatch definition More... | |
basegfx::BColor | maBColor |
hatch background color (if used) More... | |
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 Primitive2DContainer & | getBuffered2DDecomposition () 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 |
FillHatchPrimitive2D class.
This class defines a hatch filling for a rectangular area. The Range is defined by the Transformation, the hatch by the FillHatchAttribute. If the background is to be filled, a flag in FillHatchAttribute is set and the BColor defines the background color.
#i120230# This primitive is now evtl. metric dependent due to the value MinimalDiscreteDistance in the FillHatchAttribute if the value is not zero. This is used for a more appealing, VCL-like visualisation by not letting the distances get too small between lines.
The decomposition will deliver the hatch lines.
Definition at line 46 of file fillhatchprimitive2d.hxx.
drawinglayer::primitive2d::FillHatchPrimitive2D::FillHatchPrimitive2D | ( | const basegfx::B2DRange & | rOutputRange, |
const basegfx::BColor & | rBColor, | ||
attribute::FillHatchAttribute | aFillHatch | ||
) |
constructors. The one without definition range will use output range as definition range
Definition at line 131 of file fillhatchprimitive2d.cxx.
drawinglayer::primitive2d::FillHatchPrimitive2D::FillHatchPrimitive2D | ( | const basegfx::B2DRange & | rOutputRange, |
const basegfx::B2DRange & | rDefinitionRange, | ||
const basegfx::BColor & | rBColor, | ||
attribute::FillHatchAttribute | aFillHatch | ||
) |
Definition at line 142 of file fillhatchprimitive2d.cxx.
|
overrideprivatevirtual |
local decomposition.
Implements drawinglayer::primitive2d::BufferedDecompositionPrimitive2D.
Definition at line 36 of file fillhatchprimitive2d.cxx.
References a, basegfx::B2DPolygon::append(), drawinglayer::texture::GeoTexSvxHatch::appendTransformations(), basegfx::utils::createPolygonFromRect(), drawinglayer::attribute::Double, getBColor(), getDefinitionRange(), drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::getDiscreteUnit(), getFillHatch(), drawinglayer::attribute::FillHatchAttribute::getMinimalDiscreteDistance(), getOutputRange(), drawinglayer::attribute::FillHatchAttribute::getStyle(), drawinglayer::attribute::Single, and drawinglayer::attribute::Triple.
|
overridevirtual |
Override standard getDecomposition to be view-dependent here.
Reimplemented from drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D.
Definition at line 175 of file fillhatchprimitive2d.cxx.
References drawinglayer::primitive2d::BufferedDecompositionPrimitive2D::get2DDecomposition(), drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D::get2DDecomposition(), and getFillHatch().
|
overridevirtual |
get range
Reimplemented from drawinglayer::primitive2d::BasePrimitive2D.
Definition at line 169 of file fillhatchprimitive2d.cxx.
References getOutputRange().
|
inline |
Definition at line 81 of file fillhatchprimitive2d.hxx.
References maBColor.
Referenced by create2DDecomposition(), operator==(), and drawinglayer::processor2d::VclPixelProcessor2D::processFillHatchPrimitive2D().
|
inline |
Definition at line 79 of file fillhatchprimitive2d.hxx.
References maDefinitionRange.
Referenced by create2DDecomposition(), and operator==().
|
inline |
Definition at line 80 of file fillhatchprimitive2d.hxx.
References maFillHatch.
Referenced by create2DDecomposition(), get2DDecomposition(), operator==(), and drawinglayer::processor2d::VclPixelProcessor2D::processFillHatchPrimitive2D().
|
inline |
data read access
Definition at line 78 of file fillhatchprimitive2d.hxx.
References maOutputRange.
Referenced by create2DDecomposition(), getB2DRange(), operator==(), and drawinglayer::processor2d::VclPixelProcessor2D::processFillHatchPrimitive2D().
|
overridevirtual |
provide unique ID
Implements drawinglayer::primitive2d::BasePrimitive2D.
Definition at line 192 of file fillhatchprimitive2d.cxx.
References PRIMITIVE2D_ID_FILLHATCHPRIMITIVE2D.
|
overridevirtual |
compare operator
Reimplemented from drawinglayer::primitive2d::BasePrimitive2D.
Definition at line 154 of file fillhatchprimitive2d.cxx.
References getBColor(), getDefinitionRange(), getFillHatch(), and getOutputRange().
|
private |
hatch background color (if used)
Definition at line 60 of file fillhatchprimitive2d.hxx.
Referenced by getBColor().
|
private |
the area the gradient definition is based on in the simplest case identical to OutputRange
Definition at line 54 of file fillhatchprimitive2d.hxx.
Referenced by getDefinitionRange().
|
private |
the hatch definition
Definition at line 57 of file fillhatchprimitive2d.hxx.
Referenced by getFillHatch().
|
private |
the geometrically visible area
Definition at line 50 of file fillhatchprimitive2d.hxx.
Referenced by getOutputRange().