LibreOffice Module svgio (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
svgio::svgreader::SvgPatternNode Class Referencefinal

#include <svgpatternnode.hxx>

Inheritance diagram for svgio::svgreader::SvgPatternNode:
[legend]
Collaboration diagram for svgio::svgreader::SvgPatternNode:
[legend]

Public Member Functions

 SvgPatternNode (SvgDocument &rDocument, SvgNode *pParent)
 
virtual ~SvgPatternNode () override
 
virtual const SvgStyleAttributesgetSvgStyleAttributes () const override
 
virtual void parseAttribute (const OUString &rTokenName, SVGToken aSVGToken, const OUString &aContent) override
 
void getValuesRelative (double &rfX, double &rfY, double &rfW, double &rfH, const basegfx::B2DRange &rGeoRange, SvgNode const &rUser) const
 global helpers More...
 
const drawinglayer::primitive2d::Primitive2DContainergetPatternPrimitives () const
 get pattern primitives buffered, uses decomposeSvgNode internally More...
 
virtual basegfx::B2DRange getCurrentViewPort () const override
 InfoProvider support for % values. More...
 
const basegfx::B2DRangegetViewBox () const
 viewBox content More...
 
void setViewBox (const basegfx::B2DRange *pViewBox)
 
const SvgAspectRatiogetSvgAspectRatio () const
 SvgAspectRatio content. More...
 
const SvgNumbergetX () const
 X content, set if found in current context. More...
 
const SvgNumbergetY () const
 Y content, set if found in current context. More...
 
const SvgNumbergetWidth () const
 Width content, set if found in current context. More...
 
const SvgNumbergetHeight () const
 Height content, set if found in current context. More...
 
const SvgUnitsgetPatternUnits () const
 PatternUnits content. More...
 
void setPatternUnits (const SvgUnits aPatternUnits)
 
const SvgUnitsgetPatternContentUnits () const
 PatternContentUnits content. More...
 
void setPatternContentUnits (const SvgUnits aPatternContentUnits)
 
std::optional< basegfx::B2DHomMatrixgetPatternTransform () const
 PatternTransform content. More...
 
void setPatternTransform (const std::optional< basegfx::B2DHomMatrix > &pMatrix)
 
- Public Member Functions inherited from svgio::svgreader::SvgNode
 SvgNode (SVGToken aType, SvgDocument &rDocument, SvgNode *pParent)
 
virtual ~SvgNode () override
 
 SvgNode (const SvgNode &)=delete
 
SvgNodeoperator= (const SvgNode &)=delete
 
void accept (Visitor &rVisitor)
 
void readLocalCssStyle (std::u16string_view aContent)
 scan helper to read and interpret a local CssStyle to mpLocalCssStyle More...
 
void parseAttributes (const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs)
 style helpers More...
 
virtual const SvgStyleAttributesgetSvgStyleAttributes () const
 
virtual void parseAttribute (const OUString &rTokenName, SVGToken aSVGToken, const OUString &aContent)
 
virtual void decomposeSvgNode (drawinglayer::primitive2d::Primitive2DContainer &rTarget, bool bReferenced) const
 
virtual bool supportsParentStyle () const
 #i125258# tell if this node is allowed to have a parent style (e.g. defs do not) More...
 
SVGToken getType () const
 basic data read access More...
 
const SvgDocumentgetDocument () const
 
const SvgNodegetParent () const
 
const std::vector< std::unique_ptr< SvgNode > > & getChildren () const
 
virtual basegfx::B2DRange getCurrentViewPort () const override
 InfoProvider support for %, em and ex values. More...
 
virtual double getCurrentFontSizeInherited () const override
 return font size of node inherited from parents More...
 
virtual double getCurrentXHeightInherited () const override
 return xheight of node inherited from parents More...
 
double getCurrentFontSize () const
 
double getCurrentXHeight () const
 
std::optional< OUString > const & getId () const
 Id access. More...
 
void setId (OUString const &)
 
std::optional< OUString > const & getClass () const
 Class access. More...
 
void setClass (OUString const &)
 
XmlSpace getXmlSpace () const
 XmlSpace access. More...
 
void setXmlSpace (XmlSpace eXmlSpace)
 
Display getDisplay () const
 Display access #i121656#. More...
 
void setDisplay (Display eDisplay)
 
void setAlternativeParent (const SvgNode *pAlternativeParent=nullptr)
 alternative parent More...
 
bool hasLocalCssStyle ()
 Check if there is a local css style. More...
 
- Public Member Functions inherited from svgio::svgreader::InfoProvider
virtual ~InfoProvider ()
 
virtual basegfx::B2DRange getCurrentViewPort () const =0
 
virtual double getCurrentFontSizeInherited () const =0
 return font size of node inherited from parents More...
 
virtual double getCurrentXHeightInherited () const =0
 return xheight of node inherited from parents More...
 

Private Member Functions

void tryToFindLink ()
 link on demand More...
 

Private Attributes

drawinglayer::primitive2d::Primitive2DContainer aPrimitives
 buffered decomposition More...
 
SvgStyleAttributes maSvgStyleAttributes
 use styles More...
 
std::unique_ptr< basegfx::B2DRangempViewBox
 variable scan values, dependent of given XAttributeList More...
 
SvgAspectRatio maSvgAspectRatio
 
SvgNumber maX
 
SvgNumber maY
 
SvgNumber maWidth
 
SvgNumber maHeight
 
std::optional< SvgUnitsmoPatternUnits
 
std::optional< SvgUnitsmoPatternContentUnits
 
std::optional< basegfx::B2DHomMatrixmpaPatternTransform
 
bool mbResolvingLink
 link to another pattern used as style. More...
 
OUString maXLink
 
const SvgPatternNodempXLink
 

Additional Inherited Members

- Protected Member Functions inherited from svgio::svgreader::SvgNode
const SvgStyleAttributescheckForCssStyle (const SvgStyleAttributes &rOriginal) const
 helper to evtl. link to css style More...
 
void fillCssStyleVector (const SvgStyleAttributes &rOriginal)
 helper for filling the CssStyle vector once dependent on mbCssStyleVectorBuilt More...
 
void addCssStyle (const SvgDocument &rDocument, const OUString &aConcatenated)
 
void fillCssStyleVectorUsingHierarchyAndSelectors (const SvgNode &rCurrent, const OUString &aConcatenated)
 
void fillCssStyleVectorUsingParent (const SvgNode &rCurrent)
 

Detailed Description

Definition at line 29 of file svgpatternnode.hxx.

Constructor & Destructor Documentation

◆ SvgPatternNode()

svgio::svgreader::SvgPatternNode::SvgPatternNode ( SvgDocument rDocument,
SvgNode pParent 
)

Definition at line 34 of file svgpatternnode.cxx.

References Pattern.

◆ ~SvgPatternNode()

svgio::svgreader::SvgPatternNode::~SvgPatternNode ( )
overridevirtual

Definition at line 44 of file svgpatternnode.cxx.

Member Function Documentation

◆ getCurrentViewPort()

basegfx::B2DRange svgio::svgreader::SvgPatternNode::getCurrentViewPort ( ) const
overridevirtual

InfoProvider support for % values.

Reimplemented from svgio::svgreader::SvgNode.

Definition at line 271 of file svgpatternnode.cxx.

References svgio::svgreader::SvgNode::getCurrentViewPort(), and getViewBox().

◆ getHeight()

const SvgNumber & svgio::svgreader::SvgPatternNode::getHeight ( ) const

Height content, set if found in current context.

Definition at line 383 of file svgpatternnode.cxx.

References getHeight(), svgio::svgreader::SvgNumber::isSet(), maHeight, mbResolvingLink, mpXLink, and tryToFindLink().

Referenced by getHeight(), and getValuesRelative().

◆ getPatternContentUnits()

const SvgUnits * svgio::svgreader::SvgPatternNode::getPatternContentUnits ( ) const

◆ getPatternPrimitives()

const drawinglayer::primitive2d::Primitive2DContainer & svgio::svgreader::SvgPatternNode::getPatternPrimitives ( ) const

◆ getPatternTransform()

std::optional< basegfx::B2DHomMatrix > svgio::svgreader::SvgPatternNode::getPatternTransform ( ) const

◆ getPatternUnits()

const SvgUnits * svgio::svgreader::SvgPatternNode::getPatternUnits ( ) const

PatternUnits content.

Definition at line 403 of file svgpatternnode.cxx.

References getPatternUnits(), mbResolvingLink, moPatternUnits, mpXLink, and tryToFindLink().

Referenced by getPatternUnits(), and getValuesRelative().

◆ getSvgAspectRatio()

const SvgAspectRatio & svgio::svgreader::SvgPatternNode::getSvgAspectRatio ( ) const

◆ getSvgStyleAttributes()

const SvgStyleAttributes * svgio::svgreader::SvgPatternNode::getSvgStyleAttributes ( ) const
overridevirtual

◆ getValuesRelative()

void svgio::svgreader::SvgPatternNode::getValuesRelative ( double &  rfX,
double &  rfY,
double &  rfW,
double &  rfH,
const basegfx::B2DRange rGeoRange,
SvgNode const &  rUser 
) const

◆ getViewBox()

const basegfx::B2DRange * svgio::svgreader::SvgPatternNode::getViewBox ( ) const

◆ getWidth()

const SvgNumber & svgio::svgreader::SvgPatternNode::getWidth ( ) const

Width content, set if found in current context.

Definition at line 363 of file svgpatternnode.cxx.

References getWidth(), svgio::svgreader::SvgNumber::isSet(), maWidth, mbResolvingLink, mpXLink, and tryToFindLink().

Referenced by getValuesRelative(), and getWidth().

◆ getX()

const SvgNumber & svgio::svgreader::SvgPatternNode::getX ( ) const

X content, set if found in current context.

Definition at line 323 of file svgpatternnode.cxx.

References getX(), svgio::svgreader::SvgNumber::isSet(), maX, mbResolvingLink, mpXLink, and tryToFindLink().

Referenced by getValuesRelative(), and getX().

◆ getY()

const SvgNumber & svgio::svgreader::SvgPatternNode::getY ( ) const

Y content, set if found in current context.

Definition at line 343 of file svgpatternnode.cxx.

References getY(), svgio::svgreader::SvgNumber::isSet(), maY, mbResolvingLink, mpXLink, and tryToFindLink().

Referenced by getValuesRelative(), and getY().

◆ parseAttribute()

void svgio::svgreader::SvgPatternNode::parseAttribute ( const OUString &  rTokenName,
SVGToken  aSVGToken,
const OUString &  aContent 
)
overridevirtual

◆ setPatternContentUnits()

void svgio::svgreader::SvgPatternNode::setPatternContentUnits ( const SvgUnits  aPatternContentUnits)
inline

Definition at line 106 of file svgpatternnode.hxx.

References moPatternContentUnits.

Referenced by parseAttribute().

◆ setPatternTransform()

void svgio::svgreader::SvgPatternNode::setPatternTransform ( const std::optional< basegfx::B2DHomMatrix > &  pMatrix)
inline

Definition at line 110 of file svgpatternnode.hxx.

References mpaPatternTransform.

Referenced by parseAttribute().

◆ setPatternUnits()

void svgio::svgreader::SvgPatternNode::setPatternUnits ( const SvgUnits  aPatternUnits)
inline

Definition at line 102 of file svgpatternnode.hxx.

References moPatternUnits.

Referenced by parseAttribute().

◆ setViewBox()

void svgio::svgreader::SvgPatternNode::setViewBox ( const basegfx::B2DRange pViewBox)
inline

Definition at line 83 of file svgpatternnode.hxx.

References mpViewBox.

Referenced by parseAttribute().

◆ tryToFindLink()

void svgio::svgreader::SvgPatternNode::tryToFindLink ( )
private

Member Data Documentation

◆ aPrimitives

drawinglayer::primitive2d::Primitive2DContainer svgio::svgreader::SvgPatternNode::aPrimitives
private

buffered decomposition

Definition at line 33 of file svgpatternnode.hxx.

Referenced by getPatternPrimitives().

◆ maHeight

SvgNumber svgio::svgreader::SvgPatternNode::maHeight
private

Definition at line 45 of file svgpatternnode.hxx.

Referenced by getHeight(), and parseAttribute().

◆ maSvgAspectRatio

SvgAspectRatio svgio::svgreader::SvgPatternNode::maSvgAspectRatio
private

Definition at line 41 of file svgpatternnode.hxx.

Referenced by getSvgAspectRatio(), and parseAttribute().

◆ maSvgStyleAttributes

SvgStyleAttributes svgio::svgreader::SvgPatternNode::maSvgStyleAttributes
private

use styles

Definition at line 36 of file svgpatternnode.hxx.

Referenced by getSvgStyleAttributes(), and parseAttribute().

◆ maWidth

SvgNumber svgio::svgreader::SvgPatternNode::maWidth
private

Definition at line 44 of file svgpatternnode.hxx.

Referenced by getWidth(), and parseAttribute().

◆ maX

SvgNumber svgio::svgreader::SvgPatternNode::maX
private

Definition at line 42 of file svgpatternnode.hxx.

Referenced by getX(), and parseAttribute().

◆ maXLink

OUString svgio::svgreader::SvgPatternNode::maXLink
private

Definition at line 57 of file svgpatternnode.hxx.

Referenced by getPatternPrimitives(), parseAttribute(), and tryToFindLink().

◆ maY

SvgNumber svgio::svgreader::SvgPatternNode::maY
private

Definition at line 43 of file svgpatternnode.hxx.

Referenced by getY(), and parseAttribute().

◆ mbResolvingLink

bool svgio::svgreader::SvgPatternNode::mbResolvingLink
mutableprivate

link to another pattern used as style.

If maXLink is set, the node can be fetched on demand by using

Definition at line 56 of file svgpatternnode.hxx.

Referenced by getHeight(), getPatternContentUnits(), getPatternPrimitives(), getPatternTransform(), getPatternUnits(), getSvgAspectRatio(), getViewBox(), getWidth(), getX(), and getY().

◆ moPatternContentUnits

std::optional<SvgUnits> svgio::svgreader::SvgPatternNode::moPatternContentUnits
private

Definition at line 49 of file svgpatternnode.hxx.

Referenced by getPatternContentUnits(), and setPatternContentUnits().

◆ moPatternUnits

std::optional<SvgUnits> svgio::svgreader::SvgPatternNode::moPatternUnits
private

Definition at line 47 of file svgpatternnode.hxx.

Referenced by getPatternUnits(), and setPatternUnits().

◆ mpaPatternTransform

std::optional<basegfx::B2DHomMatrix> svgio::svgreader::SvgPatternNode::mpaPatternTransform
private

Definition at line 51 of file svgpatternnode.hxx.

Referenced by getPatternTransform(), and setPatternTransform().

◆ mpViewBox

std::unique_ptr<basegfx::B2DRange> svgio::svgreader::SvgPatternNode::mpViewBox
private

variable scan values, dependent of given XAttributeList

Definition at line 40 of file svgpatternnode.hxx.

Referenced by getViewBox(), and setViewBox().

◆ mpXLink

const SvgPatternNode* svgio::svgreader::SvgPatternNode::mpXLink
private

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