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

#include <svgmarkernode.hxx>

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

Public Types

enum class  MarkerUnits {
  strokeWidth ,
  userSpaceOnUse
}
 
enum class  MarkerOrient {
  notset ,
  auto_start ,
  auto_start_reverse
}
 

Public Member Functions

 SvgMarkerNode (SvgDocument &rDocument, SvgNode *pParent)
 
virtual ~SvgMarkerNode () override
 
virtual const SvgStyleAttributesgetSvgStyleAttributes () const override
 
virtual void parseAttribute (const OUString &rTokenName, SVGToken aSVGToken, const OUString &aContent) override
 
const drawinglayer::primitive2d::Primitive2DContainergetMarkerPrimitives () const
 get marker 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 SvgNumbergetRefX () const
 RefX content, set if found in current context. More...
 
const SvgNumbergetRefY () const
 RefY content, set if found in current context. More...
 
MarkerUnits getMarkerUnits () const
 MarkerUnits content. More...
 
void setMarkerUnits (const MarkerUnits aMarkerUnits)
 
const SvgNumbergetMarkerWidth () const
 MarkerWidth content, set if found in current context. More...
 
const SvgNumbergetMarkerHeight () const
 MarkerHeight content, set if found in current context. More...
 
double getAngle () const
 Angle content, set if found in current context. More...
 
void setAngle (double fAngle)
 
MarkerOrient getMarkerOrient () const
 MarkerOrient content. More...
 
void setMarkerOrient (const MarkerOrient aMarkerOrient)
 
- 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 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 maRefX
 
SvgNumber maRefY
 
MarkerUnits maMarkerUnits
 
SvgNumber maMarkerWidth
 
SvgNumber maMarkerHeight
 
double mfAngle
 
MarkerOrient maMarkerOrient
 

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 28 of file svgmarkernode.hxx.

Member Enumeration Documentation

◆ MarkerOrient

Enumerator
notset 
auto_start 
auto_start_reverse 

Definition at line 37 of file svgmarkernode.hxx.

◆ MarkerUnits

Enumerator
strokeWidth 
userSpaceOnUse 

Definition at line 31 of file svgmarkernode.hxx.

Constructor & Destructor Documentation

◆ SvgMarkerNode()

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

Definition at line 25 of file svgmarkernode.cxx.

References Marker, and svgio::svgreader::notset.

◆ ~SvgMarkerNode()

svgio::svgreader::SvgMarkerNode::~SvgMarkerNode ( )
overridevirtual

Definition at line 40 of file svgmarkernode.cxx.

Member Function Documentation

◆ getAngle()

double svgio::svgreader::SvgMarkerNode::getAngle ( ) const
inline

Angle content, set if found in current context.

Definition at line 102 of file svgmarkernode.hxx.

References mfAngle.

Referenced by svgio::svgreader::SvgStyleAttributes::add_markers().

◆ getCurrentViewPort()

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

InfoProvider support for % values.

Reimplemented from svgio::svgreader::SvgNode.

Definition at line 185 of file svgmarkernode.cxx.

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

◆ getMarkerHeight()

const SvgNumber & svgio::svgreader::SvgMarkerNode::getMarkerHeight ( ) const
inline

MarkerHeight content, set if found in current context.

Definition at line 99 of file svgmarkernode.hxx.

References maMarkerHeight.

Referenced by svgio::svgreader::SvgStyleAttributes::prepare_singleMarker().

◆ getMarkerOrient()

MarkerOrient svgio::svgreader::SvgMarkerNode::getMarkerOrient ( ) const
inline

MarkerOrient content.

Definition at line 106 of file svgmarkernode.hxx.

References maMarkerOrient.

Referenced by svgio::svgreader::SvgStyleAttributes::add_markers().

◆ getMarkerPrimitives()

const drawinglayer::primitive2d::Primitive2DContainer & svgio::svgreader::SvgMarkerNode::getMarkerPrimitives ( ) const

get marker primitives buffered, uses decomposeSvgNode internally

Definition at line 175 of file svgmarkernode.cxx.

References aPrimitives, svgio::svgreader::SvgNode::decomposeSvgNode(), svgio::svgreader::SvgNode::getDisplay(), and svgio::svgreader::None.

Referenced by svgio::svgreader::SvgStyleAttributes::prepare_singleMarker().

◆ getMarkerUnits()

MarkerUnits svgio::svgreader::SvgMarkerNode::getMarkerUnits ( ) const
inline

MarkerUnits content.

Definition at line 92 of file svgmarkernode.hxx.

References maMarkerUnits.

Referenced by svgio::svgreader::SvgStyleAttributes::prepare_singleMarker().

◆ getMarkerWidth()

const SvgNumber & svgio::svgreader::SvgMarkerNode::getMarkerWidth ( ) const
inline

MarkerWidth content, set if found in current context.

Definition at line 96 of file svgmarkernode.hxx.

References maMarkerWidth.

Referenced by svgio::svgreader::SvgStyleAttributes::prepare_singleMarker().

◆ getRefX()

const SvgNumber & svgio::svgreader::SvgMarkerNode::getRefX ( ) const
inline

RefX content, set if found in current context.

Definition at line 86 of file svgmarkernode.hxx.

References maRefX.

Referenced by svgio::svgreader::SvgStyleAttributes::prepare_singleMarker().

◆ getRefY()

const SvgNumber & svgio::svgreader::SvgMarkerNode::getRefY ( ) const
inline

RefY content, set if found in current context.

Definition at line 89 of file svgmarkernode.hxx.

References maRefY.

Referenced by svgio::svgreader::SvgStyleAttributes::prepare_singleMarker().

◆ getSvgAspectRatio()

const SvgAspectRatio & svgio::svgreader::SvgMarkerNode::getSvgAspectRatio ( ) const
inline

◆ getSvgStyleAttributes()

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

◆ getViewBox()

const basegfx::B2DRange * svgio::svgreader::SvgMarkerNode::getViewBox ( ) const
inline

viewBox content

Definition at line 79 of file svgmarkernode.hxx.

References mpViewBox.

Referenced by getCurrentViewPort(), and svgio::svgreader::SvgStyleAttributes::prepare_singleMarker().

◆ parseAttribute()

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

◆ setAngle()

void svgio::svgreader::SvgMarkerNode::setAngle ( double  fAngle)
inline

Definition at line 103 of file svgmarkernode.hxx.

References mfAngle.

Referenced by parseAttribute().

◆ setMarkerOrient()

void svgio::svgreader::SvgMarkerNode::setMarkerOrient ( const MarkerOrient  aMarkerOrient)
inline

Definition at line 107 of file svgmarkernode.hxx.

References maMarkerOrient.

Referenced by parseAttribute().

◆ setMarkerUnits()

void svgio::svgreader::SvgMarkerNode::setMarkerUnits ( const MarkerUnits  aMarkerUnits)
inline

Definition at line 93 of file svgmarkernode.hxx.

References maMarkerUnits.

Referenced by parseAttribute().

◆ setViewBox()

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

Definition at line 80 of file svgmarkernode.hxx.

References mpViewBox.

Referenced by parseAttribute().

Member Data Documentation

◆ aPrimitives

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

buffered decomposition

Definition at line 46 of file svgmarkernode.hxx.

Referenced by getMarkerPrimitives().

◆ maMarkerHeight

SvgNumber svgio::svgreader::SvgMarkerNode::maMarkerHeight
private

Definition at line 59 of file svgmarkernode.hxx.

Referenced by getMarkerHeight(), and parseAttribute().

◆ maMarkerOrient

MarkerOrient svgio::svgreader::SvgMarkerNode::maMarkerOrient
private

Definition at line 61 of file svgmarkernode.hxx.

Referenced by getMarkerOrient(), and setMarkerOrient().

◆ maMarkerUnits

MarkerUnits svgio::svgreader::SvgMarkerNode::maMarkerUnits
private

Definition at line 57 of file svgmarkernode.hxx.

Referenced by getMarkerUnits(), and setMarkerUnits().

◆ maMarkerWidth

SvgNumber svgio::svgreader::SvgMarkerNode::maMarkerWidth
private

Definition at line 58 of file svgmarkernode.hxx.

Referenced by getMarkerWidth(), and parseAttribute().

◆ maRefX

SvgNumber svgio::svgreader::SvgMarkerNode::maRefX
private

Definition at line 55 of file svgmarkernode.hxx.

Referenced by getRefX(), and parseAttribute().

◆ maRefY

SvgNumber svgio::svgreader::SvgMarkerNode::maRefY
private

Definition at line 56 of file svgmarkernode.hxx.

Referenced by getRefY(), and parseAttribute().

◆ maSvgAspectRatio

SvgAspectRatio svgio::svgreader::SvgMarkerNode::maSvgAspectRatio
private

Definition at line 54 of file svgmarkernode.hxx.

Referenced by getSvgAspectRatio(), and parseAttribute().

◆ maSvgStyleAttributes

SvgStyleAttributes svgio::svgreader::SvgMarkerNode::maSvgStyleAttributes
private

use styles

Definition at line 49 of file svgmarkernode.hxx.

Referenced by getSvgStyleAttributes(), and parseAttribute().

◆ mfAngle

double svgio::svgreader::SvgMarkerNode::mfAngle
private

Definition at line 60 of file svgmarkernode.hxx.

Referenced by getAngle(), and setAngle().

◆ mpViewBox

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

variable scan values, dependent of given XAttributeList

Definition at line 53 of file svgmarkernode.hxx.

Referenced by getViewBox(), and setViewBox().


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