16#ifndef AEONGUI_SVGIMAGEELEMENT_H
17#define AEONGUI_SVGIMAGEELEMENT_H
19#include "SVGGraphicsElement.hpp"
20#include "SVGAnimatedLength.hpp"
21#include "SVGAnimatedString.hpp"
22#include "SVGAnimatedPreserveAspectRatio.hpp"
23#include "aeongui/RasterImage.hpp"
40 DLL
SVGImageElement (
const DOMString& aTagName, AttributeMap&& aAttributes,
Node* aParent );
67 DLL const DOMString&
decoding() const;
78 void ParseAttributes ( const AttributeMap& aAttributes );
79 bool EnsureImageLoaded() const;
83 SVGAnimatedLength mWidth{};
84 SVGAnimatedLength mHeight{};
85 SVGAnimatedString mHref{};
86 SVGAnimatedPreserveAspectRatio mPreserveAspectRatio{};
87 DOMString mCrossOrigin{};
88 DOMString mDecoding{
"auto"};
89 mutable RasterImage mRasterImage{};
90 mutable bool mImageLoadAttempted{
false};
Abstract 2D rendering surface.
Definition Canvas.hpp:40
Base class for all nodes in the DOM tree.
Definition Node.hpp:42
Animated length attribute (SVG).
Definition SVGAnimatedLength.hpp:30
Animated preserveAspectRatio attribute (SVG).
Definition SVGAnimatedPreserveAspectRatio.hpp:31
Animated string attribute (SVG).
Definition SVGAnimatedString.hpp:31
SVGGraphicsElement(const DOMString &aTagName, AttributeMap &&aAttributes, Node *aParent)
Construct an SVGGraphicsElement.
Definition SVGGraphicsElement.cpp:27
~SVGImageElement() final
Destructor.
const SVGAnimatedString & href() const
Get the animated href (image source URL).
Definition SVGImageElement.cpp:222
const SVGAnimatedPreserveAspectRatio & preserveAspectRatio() const
Get the animated preserveAspectRatio.
Definition SVGImageElement.cpp:227
const SVGAnimatedLength & height() const
Get the animated height.
Definition SVGImageElement.cpp:217
const DOMString & crossOrigin() const
Get the crossOrigin attribute value.
Definition SVGImageElement.cpp:232
const SVGAnimatedLength & x() const
Get the animated x position.
Definition SVGImageElement.cpp:202
const SVGAnimatedLength & width() const
Get the animated width.
Definition SVGImageElement.cpp:212
void DrawStart(Canvas &aCanvas) const final
Draw the embedded image onto the canvas.
Definition SVGImageElement.cpp:242
void onAttributeChanged(const DOMString &aName, const DOMString &aValue) override
Called after an attribute is changed via setAttribute.
Definition SVGImageElement.cpp:93
const SVGAnimatedLength & y() const
Get the animated y position.
Definition SVGImageElement.cpp:207
const DOMString & decoding() const
Get the decoding hint ("auto", "sync", or "async").
Definition SVGImageElement.cpp:237
SVGImageElement(const DOMString &aTagName, AttributeMap &&aAttributes, Node *aParent)
Construct an SVGImageElement.
Definition SVGImageElement.cpp:85