AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
SVGTextPathElement.hpp
1/*
2Copyright (C) 2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGUI_SVGTEXTPATHELEMENT_H
17#define AEONGUI_SVGTEXTPATHELEMENT_H
18
19#include "SVGTextContentElement.hpp"
20#include "SVGAnimatedString.hpp"
21#include "SVGAnimatedLength.hpp"
22#include "SVGAnimatedEnumeration.hpp"
23
24namespace AeonGUI
25{
26 namespace DOM
27 {
32 {
33 public:
39 SVGTextPathElement ( const DOMString& aTagName, AttributeMap&& aAttributes, Node* aParent );
40 ~SVGTextPathElement() override;
41 void DrawStart ( Canvas& aCanvas ) const override;
42
46 const SVGAnimatedString& href() const;
50 const SVGAnimatedLength& startOffset() const;
54 const SVGAnimatedEnumeration& method() const;
58 const SVGAnimatedEnumeration& spacing() const;
59
60 protected:
61 void onAttributeChanged ( const DOMString& aName, const DOMString& aValue ) override;
62
63 private:
64 void ParseAttributes();
66 SVGAnimatedLength mStartOffset;
69 bool mSideRight{false};
70 int mTextAnchor{0};
71 };
72 }
73}
74#endif
Abstract 2D rendering surface.
Definition Canvas.hpp:40
Base class for all nodes in the DOM tree.
Definition Node.hpp:42
Animated enumeration attribute (SVG).
Definition SVGAnimatedEnumeration.hpp:31
Animated length attribute (SVG).
Definition SVGAnimatedLength.hpp:30
Animated string attribute (SVG).
Definition SVGAnimatedString.hpp:31
SVGTextContentElement(const DOMString &aTagName, AttributeMap &&aAttributes, Node *aParent)
Construct an SVGTextContentElement.
Definition SVGTextContentElement.cpp:28
void onAttributeChanged(const DOMString &aName, const DOMString &aValue) override
Called after an attribute is changed via setAttribute.
Definition SVGTextPathElement.cpp:91
SVGTextPathElement(const DOMString &aTagName, AttributeMap &&aAttributes, Node *aParent)
Construct an SVG textPath element.
Definition SVGTextPathElement.cpp:28
const SVGAnimatedLength & startOffset() const
Get the start offset along the referenced path.
Definition SVGTextPathElement.cpp:105
const SVGAnimatedEnumeration & method() const
Get text path placement method.
Definition SVGTextPathElement.cpp:109
const SVGAnimatedString & href() const
Get the path reference attribute.
Definition SVGTextPathElement.cpp:101
const SVGAnimatedEnumeration & spacing() const
Get text path spacing mode.
Definition SVGTextPathElement.cpp:113
void DrawStart(Canvas &aCanvas) const override
Apply the element's transform and begin drawing. If a filter attribute is present,...
Definition SVGTextPathElement.cpp:118