Skip to content

Commit

Permalink
Add ViewBox diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
phthtgvi committed Jan 6, 2024
1 parent 1252624 commit 1f88204
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 4 deletions.
Binary file modified diagrams/All.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 22 additions & 4 deletions diagrams/All.puml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/' Objects '/


class Circle {
+Circle(float radius, const Vector2Df& center, ColorShape fill, ColorShape stroke, float stroke_width)
+getClass() : string {query}
Expand Down Expand Up @@ -293,6 +294,20 @@ class Vector2D <template<typename T>> {
}


class ViewBox {
+ViewBox()
+ViewBox(float X, float Y, float W, float H)
+getHeight() : float {query}
+getWidth() : float {query}
+getX() : float {query}
+getY() : float {query}
-h : float
-w : float
-x : float
-y : float
}


class Viewer {
-Viewer()
+~Viewer()
Expand Down Expand Up @@ -327,8 +342,6 @@ class PathPoint {





/' Inheritance relationships '/

.Ell <|-- .Circle
Expand Down Expand Up @@ -387,17 +400,22 @@ class PathPoint {
.Parser o-- .SVGElement


.Path *-- .PathPoint
.Parser *-- .ViewBox


.Renderer --> .Renderer : -instance
.Path *-- .PathPoint

.Renderer --> .Renderer : -instance

.SVGElement *-- .ColorShape


.SVGElement o-- .Gradient


.SVGElement o-- .SVGElement


.Stop *-- .ColorShape


Expand Down
Binary file added diagrams/ViewBox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions diagrams/ViewBox.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
@startuml





/' Objects '/

class Parser {
-Parser(const std::string& file_name)
+~Parser()
-parseCircle(rapidxml::xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Circle*
-parseColor(rapidxml::xml_node<>* node, std::string color, std::string& id) : ColorShape
-parseGradient(std::string id) : Gradient*
+getRoot() : Group*
-parseLine(rapidxml::xml_node<>* node, const ColorShape& stroke_color, float stroke_width) : Line*
+{static} getInstance(const std::string& file_name) : Parser*
-parsePath(rapidxml::xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Path*
-parseRect(rapidxml::xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Rect*
-parseElements(std::string file_name) : SVGElement*
-parseShape(rapidxml::xml_node<>* node) : SVGElement*
-root : SVGElement*
-parseText(rapidxml::xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Text*
+getViewPort() : Vector2Df {query}
-viewport : Vector2Df
+getViewBox() : ViewBox {query}
-viewbox : ViewBox
-parseEllipse(rapidxml::xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Ell*
-parsePolygon(rapidxml::xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Plygon*
-parsePolyline(rapidxml::xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Plyline*
-getFloatAttribute(rapidxml::xml_node<>* node, std::string name) : float
-{static} instance : static Parser*
-gradients : std::map<std::string, Gradient*>
-getAttribute(rapidxml::xml_node<>* node, std::string name) : std::string
-parsePathPoints(rapidxml::xml_node<>* node) : std::vector<PathPoint>
-getGradientStops(rapidxml::xml_node<>* node) : std::vector<Stop>
-parsePoints(rapidxml::xml_node<>* node) : std::vector<Vector2Df>
-getTransformOrder(rapidxml::xml_node<>* node) : std::vector<std::string>
-GetGradients(rapidxml::xml_node<>* node) : void
+printShapesData() : void
}


class ViewBox {
+ViewBox()
+ViewBox(float X, float Y, float W, float H)
+getHeight() : float {query}
+getWidth() : float {query}
+getX() : float {query}
+getY() : float {query}
-h : float
-w : float
-x : float
-y : float
}





/' Inheritance relationships '/




/' Aggregation relationships '/

.Parser o-- .Parser


.Parser *-- .ViewBox






/' Nested objects '/



@enduml

0 comments on commit 1f88204

Please sign in to comment.