AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
SVGSVGElement.hpp
1/*
2Copyright (C) 2019,2020,2023-2025,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_SVGSVGELEMENT_H
17#define AEONGUI_SVGSVGELEMENT_H
18
19#include "SVGGraphicsElement.hpp"
20#include "aeongui/Attribute.hpp"
21
22namespace AeonGUI
23{
24 namespace DOM
25 {
30 {
31 public:
37 SVGSVGElement ( const DOMString& aTagName, AttributeMap&& aAttributes, Node* aParent );
43 void DrawStart ( Canvas& aCanvas ) const final;
44 private:
45 // Attributes
46 double mWidth{};
47 double mHeight{};
48 ViewBox mViewBox{};
49 PreserveAspectRatio mPreserveAspectRatio{};
50 };
51 }
52}
53#endif
Abstract 2D rendering surface.
Definition Canvas.hpp:39
Base class for all nodes in the DOM tree.
Definition Node.hpp:40
SVGGraphicsElement(const DOMString &aTagName, AttributeMap &&aAttributes, Node *aParent)
Construct an SVGGraphicsElement.
Definition SVGGraphicsElement.cpp:24
void DrawStart(Canvas &aCanvas) const final
Set up viewport and viewBox, then draw children.
Definition SVGSVGElement.cpp:59
~SVGSVGElement() final
Destructor.
SVGSVGElement(const DOMString &aTagName, AttributeMap &&aAttributes, Node *aParent)
Construct an SVGSVGElement.
Definition SVGSVGElement.cpp:25
SVG viewBox attribute value.
Definition Attribute.hpp:31