diff --git a/.clang-uml b/.clang-uml deleted file mode 100644 index f50cb277..00000000 --- a/.clang-uml +++ /dev/null @@ -1,30 +0,0 @@ -compilation_database_dir: build -output_directory: docs/diagrams -generate_method_arguments: none -diagrams: - Viewer: - type: class - include_relations_also_as_members: true - include: - elements: - - Viewer - Parser: - type: class - include_relations_also_as_members: true - include: - elements: - - Parser - Shape: - type: class - include_relations_also_as_members: true - include: - elements: - - Shape - - Circle - - Polygon - - Rectangle - - Ellipse - - Text - - Line - - Polyline - - Rect diff --git a/docs/diagrams/All.png b/docs/diagrams/All.png new file mode 100644 index 00000000..11851ef5 Binary files /dev/null and b/docs/diagrams/All.png differ diff --git a/docs/diagrams/All.puml b/docs/diagrams/All.puml new file mode 100644 index 00000000..35b206bb --- /dev/null +++ b/docs/diagrams/All.puml @@ -0,0 +1,330 @@ +@startuml + + + + + +/' Objects '/ + +class Circle { + +Circle(float radius, const Vector2Df& center, mColor fill, mColor stroke, float stroke_width) + +getClass() : std::string {query} +} + + +class Ell { + +Ell(const Vector2Df& radius, const Vector2Df& center, mColor fill, mColor stroke, float stroke_width) + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getClass() : std::string {query} + +printData() : void {query} + +setRadius(const Vector2Df& radius) : void +} + + +class Group { + +Group() + +Group(Attributes attributes) + +~Group() + -attributes : Attributes + +getAttributes() : Attributes {query} + +getClass() : std::string {query} + +getElements() : std::vector {query} + -shapes : std::vector + +addElement(SVGElement* shape) : void + +printData() : void {query} +} + + +class Line { + +Line(const Vector2Df& point1, const Vector2Df& point2, mColor stroke, float stroke_width) + -direction : Vector2Df + +getDirection() : Vector2Df {query} + +getLength() : float {query} + +getClass() : std::string {query} + +setDirection(const Vector2Df& direction) : void +} + + +class Parser { + -Parser(const std::string& file_name) + +~Parser() + -parseCircle(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Circle* + +getRoot() : Group* + -parseLine(xml_node<>* node, const mColor& stroke_color, float stroke_width) : Line* + +{static} getInstance(const std::string& file_name) : Parser* + -parsePath(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Path* + -parseRect(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Rect* + -parseElements(std::string file_name) : SVGElement* + -parseShape(xml_node<>* node) : SVGElement* + -root : SVGElement* + -parseText(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Text* + -parseEllipse(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : class Ell* + -parsePolygon(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : class Plygon* + -parsePolyline(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : class Plyline* + -getFloatAttribute(xml_node<>* node, std::string name) : float + -parseColor(xml_node<>* node, std::string color) : mColor + -{static} instance : static Parser* + -getAttribute(xml_node<>* node, std::string name) : std::string + -parsePathPoints(xml_node<>* node) : std::vector + -parsePoints(xml_node<>* node) : std::vector + -getTransformOrder(xml_node<>* node) : std::vector + +printShapesData() : void +} + + +class Path { + +Path(const mColor& fill, const mColor& stroke, float stroke_width) + -fill_rule : std::string + +getClass() : std::string {query} + +getFillRule() : std::string {query} + +getPoints() : std::vector {query} + -points : std::vector + +addPoint(PathPoint point) : void + +printData() : void {query} + +setFillRule(std::string fill_rule) : void +} + + +class Plygon { + +Plygon(mColor fill, mColor stroke, float stroke_width) + -fill_rule : std::string + +getClass() : std::string {query} + +getFillRule() : std::string {query} + +setFillRule(std::string fill_rule) : void +} + + +class Plyline { + +Plyline(const mColor& fill, const mColor& stroke, float stroke_width) + -fill_rule : std::string + +getClass() : std::string {query} + +getFillRule() : std::string {query} + +setFillRule(std::string fill_rule) : void +} + + +abstract class PolyShape { + #PolyShape(const mColor& fill, const mColor& stroke, float stroke_width) + +{abstract} getClass() : std::string {query} + #points : std::vector + +getPoints() : std::vector& {query} + +addPoint(const Vector2Df& point) : void + +printData() : void {query} +} + + +class Rect { + +Rect(float width, float height, Vector2Df position, Vector2Df radius, const mColor& fill, const mColor& stroke, float stroke_width) + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getHeight() : float {query} + +getWidth() : float {query} + -height : float + -width : float + +getClass() : std::string {query} + +printData() : void {query} + +setHeight(float height) : void + +setRadius(const Vector2Df& radius) : void + +setWidth(float width) : void +} + + +class Renderer { + -Renderer() + +{static} getInstance() : Renderer* + -{static} instance : static Renderer* + -applyTransform(std::vector transform_order, Gdiplus::Graphics& graphics) : void {query} + +draw(Gdiplus::Graphics& graphics, Group* group) : void {query} + -drawCircle(Gdiplus::Graphics& graphics, Circle* circle) : void {query} + -drawEllipse(Gdiplus::Graphics& graphics, Ell* ellipse) : void {query} + -drawLine(Gdiplus::Graphics& graphics, Line* line) : void {query} + -drawPath(Gdiplus::Graphics& graphics, Path* path) : void {query} + -drawPolygon(Gdiplus::Graphics& graphics, Plygon* polygon) : void {query} + -drawPolyline(Gdiplus::Graphics& graphics, Plyline* polyline) : void {query} + -drawRectangle(Gdiplus::Graphics& graphics, Rect* rectangle) : void {query} + -drawText(Gdiplus::Graphics& graphics, Text* text) : void {query} +} + + +abstract class SVGElement { + #SVGElement() + +~SVGElement() + +getParent() : SVGElement* {query} + #parent : SVGElement* + +getPosition() : Vector2Df {query} + -position : Vector2Df + +getOutlineThickness() : float {query} + -stroke_width : float + -fill : mColor + -stroke : mColor + +getFillColor() : mColor& {query} + +getOutlineColor() : mColor& {query} + +{abstract} getClass() : std::string {query} + +getTransforms() : std::vector {query} + -transforms : std::vector + +addElement(SVGElement* element) : void + +printData() : void {query} + +setFillColor(const mColor& color) : void + +setOutlineColor(const mColor& color) : void + +setOutlineThickness(float thickness) : void + +setParent(SVGElement* parent) : void + +setPosition(float x, float y) : void + +setPosition(const Vector2Df& position) : void + +setTransforms(const std::vector& transforms) : void +} + + +class Text { + +Text(Vector2Df pos, std::string text, float font_size, const mColor& fill, const mColor& stroke, float stroke_width) + -font_size : float + +getFontSize() : float {query} + -anchor : std::string + -content : std::string + +getAnchor() : std::string {query} + +getClass() : std::string {query} + +getContent() : std::string {query} + +getFontStyle() : std::string {query} + -style : std::string + +printData() : void {query} + +setAnchor(std::string anchor) : void + +setContent(std::string content) : void + +setFontSize(float font_size) : void + +setFontStyle(std::string style) : void +} + + +class Vector2D > { + +Vector2D() + +Vector2D(T X, T Y) + +Vector2D(const Vector2D& vector) + +x : T + +y : T +} + + +class Viewer { + -Viewer() + +~Viewer() + -last_mouse_pos : POINT + +{static} getInstance() : Viewer* + -is_dragging : bool + +needs_repaint : bool + +offset_x : float + +offset_y : float + +rotate_angle : float + +zoom_factor : float + -{static} instance : static Viewer* + -handleKeyDown(WPARAM wParam) : void + +handleKeyEvent(WPARAM wParam) : void + -handleLeftButtonDown(LPARAM lParam) : void + -handleLeftButtonUp() : void + +handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam) : void + -handleMouseMove(LPARAM lParam) : void + -handleMouseWheel(WPARAM wParam) : void +} + + +class mColor { + +mColor() + +mColor(int red, int green, int blue, int alpha) + +mColor(int color) + +a : int + +b : int + +g : int + +r : int + +{static} Black : static const mColor + +{static} Blue : static const mColor + +{static} Cyan : static const mColor + +{static} Green : static const mColor + +{static} Magenta : static const mColor + +{static} Red : static const mColor + +{static} Transparent : static const mColor + +{static} White : static const mColor + +{static} Yellow : static const mColor + +operator<<(std::ostream& os, const mColor& color) : std :: ostream& +} + + +class PathPoint { + +Point : Vector2Df + +TC : char +} + + + + + +/' Inheritance relationships '/ + +.Ell <|-- .Circle + + +.PolyShape <|-- .Plygon + + +.PolyShape <|-- .Plyline + + +.PolyShape <|-- .Rect + + +.SVGElement <|-- .Ell + + +.SVGElement <|-- .Group + + +.SVGElement <|-- .Line + + +.SVGElement <|-- .Path + + +.SVGElement <|-- .PolyShape + + +.SVGElement <|-- .Text + + + + + +/' Aggregation relationships '/ + +.Group o-- .SVGElement + + +.Parser --> .Parser : -instance + + +.Parser o-- .SVGElement + + +.Path *-- .PathPoint + + +.Renderer --> .Renderer : -instance + + +.SVGElement --> .SVGElement : #parent + + +.SVGElement "2" *-- .mColor + + +.Viewer --> .Viewer : -instance + + +.mColor "9" *-- .mColor + + + + + + +/' Nested objects '/ + + + +@enduml diff --git a/docs/diagrams/Parser.png b/docs/diagrams/Parser.png index 5ade28a7..e429ca69 100644 Binary files a/docs/diagrams/Parser.png and b/docs/diagrams/Parser.png differ diff --git a/docs/diagrams/Parser.puml b/docs/diagrams/Parser.puml index f3646b7d..9bfb8483 100644 --- a/docs/diagrams/Parser.puml +++ b/docs/diagrams/Parser.puml @@ -1,23 +1,57 @@ @startuml -class "Parser" as C_0001190833385181412596 -class C_0001190833385181412596 { -+Parser() = deleted : void --Parser() : void -+~Parser() : void -.. -+getAttribute() : std::string -{static} +getInstance() : Parser * -+parseColor() : sf::Color -+parsePoints() : std::vector -+parseSVG() : void -+renderSVG() : void -__ -{static} -instance : Parser * --shapes : std::vector --svg : pugi::xml_node + + + + + +/' Objects '/ + +class Parser { + -Parser(const std::string& file_name) + +~Parser() + -parseCircle(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Circle* + +getRoot() : Group* + -parseLine(xml_node<>* node, const mColor& stroke_color, float stroke_width) : Line* + +{static} getInstance(const std::string& file_name) : Parser* + -parsePath(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Path* + -parseRect(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Rect* + -parseElements(std::string file_name) : SVGElement* + -parseShape(xml_node<>* node) : SVGElement* + -root : SVGElement* + -parseText(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Text* + -parseEllipse(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : class Ell* + -parsePolygon(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : class Plygon* + -parsePolyline(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : class Plyline* + -getFloatAttribute(xml_node<>* node, std::string name) : float + -parseColor(xml_node<>* node, std::string color) : mColor + -{static} instance : static Parser* + -getAttribute(xml_node<>* node, std::string name) : std::string + -parsePathPoints(xml_node<>* node) : std::vector + -parsePoints(xml_node<>* node) : std::vector + -getTransformOrder(xml_node<>* node) : std::vector + +printShapesData() : void } -C_0001190833385181412596 --> C_0001190833385181412596 : -instance -'Generated with clang-uml, version 0.4.1 -'LLVM version Ubuntu clang version 15.0.7 + + + + +/' Inheritance relationships '/ + + + + +/' Aggregation relationships '/ + +.Parser --> .Parser : -instance + + + + + + +/' Nested objects '/ + + + @enduml diff --git a/docs/diagrams/Renderer.png b/docs/diagrams/Renderer.png new file mode 100644 index 00000000..a6afcbb0 Binary files /dev/null and b/docs/diagrams/Renderer.png differ diff --git a/docs/diagrams/Renderer.puml b/docs/diagrams/Renderer.puml new file mode 100644 index 00000000..e6cc3cce --- /dev/null +++ b/docs/diagrams/Renderer.puml @@ -0,0 +1,47 @@ +@startuml + + + + + +/' Objects '/ + +class Renderer { + -Renderer() + +{static} getInstance() : Renderer* + -{static} instance : static Renderer* + -applyTransform(std::vector transform_order, Gdiplus::Graphics& graphics) : void {query} + +draw(Gdiplus::Graphics& graphics, Group* group) : void {query} + -drawCircle(Gdiplus::Graphics& graphics, Circle* circle) : void {query} + -drawEllipse(Gdiplus::Graphics& graphics, Ell* ellipse) : void {query} + -drawLine(Gdiplus::Graphics& graphics, Line* line) : void {query} + -drawPath(Gdiplus::Graphics& graphics, Path* path) : void {query} + -drawPolygon(Gdiplus::Graphics& graphics, Plygon* polygon) : void {query} + -drawPolyline(Gdiplus::Graphics& graphics, Plyline* polyline) : void {query} + -drawRectangle(Gdiplus::Graphics& graphics, Rect* rectangle) : void {query} + -drawText(Gdiplus::Graphics& graphics, Text* text) : void {query} +} + + + + + +/' Inheritance relationships '/ + + + + +/' Aggregation relationships '/ + +.Renderer --> .Renderer : -instance + + + + + + +/' Nested objects '/ + + + +@enduml diff --git a/docs/diagrams/Shape.png b/docs/diagrams/Shape.png index e9f46f4e..cf405ead 100644 Binary files a/docs/diagrams/Shape.png and b/docs/diagrams/Shape.png differ diff --git a/docs/diagrams/Shape.puml b/docs/diagrams/Shape.puml index f47e82c5..6ee9fb9c 100644 --- a/docs/diagrams/Shape.puml +++ b/docs/diagrams/Shape.puml @@ -1,124 +1,275 @@ @startuml -abstract "Shape" as C_0001672291103657734280 -abstract C_0001672291103657734280 { -#Shape() : void -+~Shape() = default : void -.. -+draw() const : void -+getFillColor() const : const sf::Color & -+getInverseTransform() const : const sf::Transform & -+getOutlineColor() const : const sf::Color & -+getOutlineThickness() const : float -{abstract} +getPoint() const = 0 : sf::Vector2f -{abstract} +getPointCount() const = 0 : std::size_t -+getTransform() const : const sf::Transform & -+setFillColor() : void -+setOutlineColor() : void -+setOutlineThickness() : void -+setPosition() : void -+setPosition() : void -#update() : void --updateFillColors() : void --updateOutline() : void --updateOutlineColors() : void -__ --bounds : sf::FloatRect --fill_color : sf::Color --inside_bounds : sf::FloatRect --inverse_transform : sf::Transform --inverse_transform_need_update : bool --origin : sf::Vector2f --outline_color : sf::Color --outline_thickness : float --outline_vertices : sf::VertexArray --position : sf::Vector2f --rotation : float --scale : sf::Vector2f --texture : const sf::Texture * --transform : sf::Transform --transform_need_update : bool --vertices : sf::VertexArray + + + + + +/' Objects '/ + +class Circle { + +Circle(float radius, const Vector2Df& center, mColor fill, mColor stroke, float stroke_width) + +getClass() : std::string {query} +} + + +class Ell { + +Ell(const Vector2Df& radius, const Vector2Df& center, mColor fill, mColor stroke, float stroke_width) + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getClass() : std::string {query} + +printData() : void {query} + +setRadius(const Vector2Df& radius) : void +} + + +class Group { + +Group() + +Group(Attributes attributes) + +~Group() + -attributes : Attributes + +getAttributes() : Attributes {query} + +getClass() : std::string {query} + +getElements() : std::vector {query} + -shapes : std::vector + +addElement(SVGElement* shape) : void + +printData() : void {query} +} + + +class Line { + +Line(const Vector2Df& point1, const Vector2Df& point2, mColor stroke, float stroke_width) + -direction : Vector2Df + +getDirection() : Vector2Df {query} + +getLength() : float {query} + +getClass() : std::string {query} + +setDirection(const Vector2Df& direction) : void +} + + +class Parser { + -Parser(const std::string& file_name) + +~Parser() + -parseCircle(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Circle* + +getRoot() : Group* + -parseLine(xml_node<>* node, const mColor& stroke_color, float stroke_width) : Line* + +{static} getInstance(const std::string& file_name) : Parser* + -parsePath(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Path* + -parseRect(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Rect* + -parseElements(std::string file_name) : SVGElement* + -parseShape(xml_node<>* node) : SVGElement* + -root : SVGElement* + -parseText(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : Text* + -parseEllipse(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : class Ell* + -parsePolygon(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : class Plygon* + -parsePolyline(xml_node<>* node, const mColor& fill_color, const mColor& stroke_color, float stroke_width) : class Plyline* + -getFloatAttribute(xml_node<>* node, std::string name) : float + -parseColor(xml_node<>* node, std::string color) : mColor + -{static} instance : static Parser* + -getAttribute(xml_node<>* node, std::string name) : std::string + -parsePathPoints(xml_node<>* node) : std::vector + -parsePoints(xml_node<>* node) : std::vector + -getTransformOrder(xml_node<>* node) : std::vector + +printShapesData() : void +} + + +class Path { + +Path(const mColor& fill, const mColor& stroke, float stroke_width) + -fill_rule : std::string + +getClass() : std::string {query} + +getFillRule() : std::string {query} + +getPoints() : std::vector {query} + -points : std::vector + +addPoint(PathPoint point) : void + +printData() : void {query} + +setFillRule(std::string fill_rule) : void +} + + +class Plygon { + +Plygon(mColor fill, mColor stroke, float stroke_width) + -fill_rule : std::string + +getClass() : std::string {query} + +getFillRule() : std::string {query} + +setFillRule(std::string fill_rule) : void } -class "Ellipse" as C_0000008382941311063885 -class C_0000008382941311063885 { -+Ellipse() : void -.. -+getPoint() const : sf::Vector2f -+getPointCount() const : std::size_t -__ -#SCALE : const int -#radius : sf::Vector2f + + +class Plyline { + +Plyline(const mColor& fill, const mColor& stroke, float stroke_width) + -fill_rule : std::string + +getClass() : std::string {query} + +getFillRule() : std::string {query} + +setFillRule(std::string fill_rule) : void } -class "Circle" as C_0001034450863184659349 -class C_0001034450863184659349 { -+Circle() : void -__ + + +abstract class PolyShape { + #PolyShape(const mColor& fill, const mColor& stroke, float stroke_width) + +{abstract} getClass() : std::string {query} + #points : std::vector + +getPoints() : std::vector& {query} + +addPoint(const Vector2Df& point) : void + +printData() : void {query} } -class "Line" as C_0000446862122271229469 -class C_0000446862122271229469 { -+Line() : void -.. -+getLength() const : float -+getPoint() const : sf::Vector2f -+getPointCount() const : std::size_t -+setThickness() : void -__ --direction : sf::Vector2f --thickness : float + + +class Rect { + +Rect(float width, float height, Vector2Df position, Vector2Df radius, const mColor& fill, const mColor& stroke, float stroke_width) + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getHeight() : float {query} + +getWidth() : float {query} + -height : float + -width : float + +getClass() : std::string {query} + +printData() : void {query} + +setHeight(float height) : void + +setRadius(const Vector2Df& radius) : void + +setWidth(float width) : void } -class "Polygon" as C_0000359217836834441732 -class C_0000359217836834441732 { -+Polygon() : void -.. -+addPoint() : void -+getPoint() const : sf::Vector2f -+getPointCount() const : std::size_t -+polygonUpdate() : void -__ --points : std::vector + + +abstract class SVGElement { + #SVGElement() + +~SVGElement() + +getParent() : SVGElement* {query} + #parent : SVGElement* + +getPosition() : Vector2Df {query} + -position : Vector2Df + +getOutlineThickness() : float {query} + -stroke_width : float + -fill : mColor + -stroke : mColor + +getFillColor() : mColor& {query} + +getOutlineColor() : mColor& {query} + +{abstract} getClass() : std::string {query} + +getTransforms() : std::vector {query} + -transforms : std::vector + +addElement(SVGElement* element) : void + +printData() : void {query} + +setFillColor(const mColor& color) : void + +setOutlineColor(const mColor& color) : void + +setOutlineThickness(float thickness) : void + +setParent(SVGElement* parent) : void + +setPosition(float x, float y) : void + +setPosition(const Vector2Df& position) : void + +setTransforms(const std::vector& transforms) : void } -class "Polyline" as C_0001361390076764550325 -class C_0001361390076764550325 { -+Polyline() : void -.. -+addPoint() : void -+draw() const : void -+getPoint() const : sf::Vector2f -+getPointCount() const : std::size_t -+polylineUpdate() : void -__ --points : std::vector + + +class Text { + +Text(Vector2Df pos, std::string text, float font_size, const mColor& fill, const mColor& stroke, float stroke_width) + -font_size : float + +getFontSize() : float {query} + -anchor : std::string + -content : std::string + +getAnchor() : std::string {query} + +getClass() : std::string {query} + +getContent() : std::string {query} + +getFontStyle() : std::string {query} + -style : std::string + +printData() : void {query} + +setAnchor(std::string anchor) : void + +setContent(std::string content) : void + +setFontSize(float font_size) : void + +setFontStyle(std::string style) : void } -class "Rect" as C_0001903790827945341156 -class C_0001903790827945341156 { -+Rect() : void -.. -+getPoint() const : sf::Vector2f -+getPointCount() const : std::size_t -__ --height : float --rect_size : sf::Vector2f --width : float + +class mColor { + +mColor() + +mColor(int red, int green, int blue, int alpha) + +mColor(int color) + +a : int + +b : int + +g : int + +r : int + +{static} Black : static const mColor + +{static} Blue : static const mColor + +{static} Cyan : static const mColor + +{static} Green : static const mColor + +{static} Magenta : static const mColor + +{static} Red : static const mColor + +{static} Transparent : static const mColor + +{static} White : static const mColor + +{static} Yellow : static const mColor + +operator<<(std::ostream& os, const mColor& color) : std :: ostream& } -class "Text" as C_0001430338048021739765 -class C_0001430338048021739765 { -+Text() : void -.. -+draw() const : void -+getPoint() const : sf::Vector2f -+getPointCount() const : std::size_t -__ -{static} +font : sf::Font --text : sf::Text + + +class PathPoint { + +Point : Vector2Df + +TC : char } -C_0001672291103657734280 <|-- C_0000008382941311063885 -C_0000008382941311063885 <|-- C_0001034450863184659349 -C_0001672291103657734280 <|-- C_0000446862122271229469 -C_0001672291103657734280 <|-- C_0000359217836834441732 -C_0001672291103657734280 <|-- C_0001361390076764550325 -C_0000359217836834441732 <|-- C_0001903790827945341156 -C_0001672291103657734280 <|-- C_0001430338048021739765 - -'Generated with clang-uml, version 0.4.1 -'LLVM version Ubuntu clang version 15.0.7 + + + + + +/' Inheritance relationships '/ + +.Ell <|-- .Circle + + +.PolyShape <|-- .Plygon + + +.PolyShape <|-- .Plyline + + +.PolyShape <|-- .Rect + + +.SVGElement <|-- .Ell + + +.SVGElement <|-- .Group + + +.SVGElement <|-- .Line + + +.SVGElement <|-- .Path + + +.SVGElement <|-- .PolyShape + + +.SVGElement <|-- .Text + + + + + +/' Aggregation relationships '/ + +.Group o-- .SVGElement + + +.Parser --> .Parser : -instance + + +.Parser o-- .SVGElement + + +.Path *-- .PathPoint + + +.SVGElement --> .SVGElement : #parent + + +.SVGElement "2" *-- .mColor + + +.mColor "9" *-- .mColor + + + + + + +/' Nested objects '/ + + + @enduml diff --git a/docs/diagrams/Vector2D.png b/docs/diagrams/Vector2D.png new file mode 100644 index 00000000..58edf4cb Binary files /dev/null and b/docs/diagrams/Vector2D.png differ diff --git a/docs/diagrams/Vector2D.puml b/docs/diagrams/Vector2D.puml new file mode 100644 index 00000000..3e390a66 --- /dev/null +++ b/docs/diagrams/Vector2D.puml @@ -0,0 +1,36 @@ +@startuml + + + + + +/' Objects '/ + +class Vector2D > { + +Vector2D() + +Vector2D(T X, T Y) + +Vector2D(const Vector2D& vector) + +x : T + +y : T +} + + + + + +/' Inheritance relationships '/ + + + + +/' Aggregation relationships '/ + + + + + +/' Nested objects '/ + + + +@enduml diff --git a/docs/diagrams/Viewer.png b/docs/diagrams/Viewer.png index 178542c6..95d2e4f6 100644 Binary files a/docs/diagrams/Viewer.png and b/docs/diagrams/Viewer.png differ diff --git a/docs/diagrams/Viewer.puml b/docs/diagrams/Viewer.puml index a822cb61..cf047a59 100644 --- a/docs/diagrams/Viewer.puml +++ b/docs/diagrams/Viewer.puml @@ -1,28 +1,52 @@ @startuml -class "Viewer" as C_0000222566171378319347 -class C_0000222566171378319347 { -+Viewer() = deleted : void --Viewer() : void -.. -+operator=() = deleted : void -.. -{static} +getInstance() : Viewer * -+handleDragging() : void -+handleEvents() : void --moveView() : void --rotate() : void --startDragging() : void --stopDragging() : void --zoom() : void -__ -{static} -instance : Viewer * --is_mouse_dragging : bool --last_mouse_position : sf::Vector2i --view : sf::View & --window : sf::RenderWindow & + + + + + +/' Objects '/ + +class Viewer { + -Viewer() + +~Viewer() + -last_mouse_pos : POINT + +{static} getInstance() : Viewer* + -is_dragging : bool + +needs_repaint : bool + +offset_x : float + +offset_y : float + +rotate_angle : float + +zoom_factor : float + -{static} instance : static Viewer* + -handleKeyDown(WPARAM wParam) : void + +handleKeyEvent(WPARAM wParam) : void + -handleLeftButtonDown(LPARAM lParam) : void + -handleLeftButtonUp() : void + +handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam) : void + -handleMouseMove(LPARAM lParam) : void + -handleMouseWheel(WPARAM wParam) : void } -C_0000222566171378319347 --> C_0000222566171378319347 : -instance -'Generated with clang-uml, version 0.4.1 -'LLVM version Ubuntu clang version 15.0.7 + + + + +/' Inheritance relationships '/ + + + + +/' Aggregation relationships '/ + +.Viewer --> .Viewer : -instance + + + + + + +/' Nested objects '/ + + + @enduml diff --git a/hpp2plantuml b/hpp2plantuml new file mode 100755 index 00000000..ef4a6671 --- /dev/null +++ b/hpp2plantuml @@ -0,0 +1,8 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from hpp2plantuml.hpp2plantuml import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main())