24#include <osl/diagnose.h>
40 :
SvgNode(aType, rDocument, pParent),
41 maSvgStyleAttributes(*this),
44 mbResolvingLink(false),
171 if(!aContent.isEmpty())
186 if(!aContent.isEmpty())
264 fOffset = aOffset.
solve(*
this);
269 OSL_ENSURE(
false,
"OOps, SvgGradientStopNode with offset out of range (!)");
272 else if(fOffset > 1.0)
274 OSL_ENSURE(
false,
"OOps, SvgGradientStopNode with offset out of range (!)");
278 aVector.emplace_back(
285 OSL_ENSURE(
false,
"OOps, SvgGradientStopNode without Style (!)");
const SvgNode * findSvgNodeById(const OUString &rStr) const
find a node by its Id
SvgNumber getY2() const
y2 content
SvgNumber getX1() const
x1 content
SvgNumber maCx
radial gradient values
void setGradientTransform(const std::optional< basegfx::B2DHomMatrix > &pMatrix)
const SvgGradientNode * mpXLink
SvgGradientNode(SVGToken aType, SvgDocument &rDocument, SvgNode *pParent)
SvgNumber getCy() const
Cy content.
bool mbResolvingLink
link to another gradient used as style.
void collectGradientEntries(drawinglayer::primitive2d::SvgGradientEntryVector &aVector) const
collect gradient stop entries
const SvgNumber * getFy() const
Fy content.
std::optional< basegfx::B2DHomMatrix > mpaGradientTransform
SvgNumber getCx() const
Cx content.
SvgStyleAttributes maSvgStyleAttributes
use styles
virtual void parseAttribute(const OUString &rTokenName, SVGToken aSVGToken, const OUString &aContent) override
SvgNumber getX2() const
x2 content
SvgNumber getY1() const
y1 content
virtual const SvgStyleAttributes * getSvgStyleAttributes() const override
std::optional< basegfx::B2DHomMatrix > getGradientTransform() const
transform content, set if found in current context
const SvgNumber * getFx() const
Fx content.
void tryToFindLink()
link on demand
void setGradientUnits(const SvgUnits aGradientUnits)
SvgNumber maX1
linear gradient values
virtual ~SvgGradientNode() override
SvgNumber getR() const
R content.
void setSpreadMethod(const drawinglayer::primitive2d::SpreadMethod aSpreadMethod)
const SvgNumber & getOffset() const
offset content
virtual const SvgStyleAttributes * getSvgStyleAttributes() const override
const std::vector< std::unique_ptr< SvgNode > > & getChildren() const
const SvgStyleAttributes * checkForCssStyle(const SvgStyleAttributes &rOriginal) const
helper to evtl. link to css style
virtual void parseAttribute(const OUString &rTokenName, SVGToken aSVGToken, const OUString &aContent)
void readLocalCssStyle(std::u16string_view aContent)
scan helper to read and interpret a local CssStyle to mpLocalCssStyle
const SvgDocument & getDocument() const
double solve(const InfoProvider &rInfoProvider, NumberType aNumberType=NumberType::length) const
SvgNumber getStopOpacity() const
stop opacity content
const basegfx::BColor & getStopColor() const
stop color content
void parseStyleAttribute(SVGToken aSVGToken, const OUString &rContent)
local attribute scanner
::std::vector< SvgGradientEntry > SvgGradientEntryVector
std::basic_string_view< charT, traits > trim(std::basic_string_view< charT, traits > str)
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
bool readLocalLink(std::u16string_view rCandidate, OUString &rURL)
bool readSingleNumber(std::u16string_view rCandidate, SvgNumber &aNum)
basegfx::B2DHomMatrix readTransform(std::u16string_view rCandidate, InfoProvider const &rInfoProvider)
static constexpr OUStringLiteral aStrUserSpaceOnUse
static constexpr OUStringLiteral aStrObjectBoundingBox