diff --git a/.gitignore b/.gitignore index 6faf2c73..95170f16 100644 --- a/.gitignore +++ b/.gitignore @@ -30,9 +30,12 @@ *.out *.app *.bat +*.bak + build svg-reader external/samples/gradient -!docs/latex/code_documentation.pdf +latex/* +!latex/refman.pdf *.json *.jar diff --git a/Doxyfile b/Doxyfile index 29fde6a6..24dedce9 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "svg-reader" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.2 +PROJECT_NUMBER = 0.3 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/diagrams/All.png b/diagrams/All.png new file mode 100644 index 00000000..ba30aa61 Binary files /dev/null and b/diagrams/All.png differ diff --git a/diagrams/All.puml b/diagrams/All.puml new file mode 100644 index 00000000..388552b5 --- /dev/null +++ b/diagrams/All.puml @@ -0,0 +1,415 @@ +@startuml + + + + + +/' Objects '/ + +class Circle { + +Circle(float radius, const Vector2Df& center, ColorShape fill, ColorShape stroke, float stroke_width) + +getClass() : string {query} +} + + +class ColorShape { + +ColorShape() + +ColorShape(int red, int green, int blue, int alpha) + +ColorShape(int color) + +a : int + +b : int + +g : int + +r : int + +{static} Black : static const ColorShape + +{static} Blue : static const ColorShape + +{static} Cyan : static const ColorShape + +{static} Green : static const ColorShape + +{static} Magenta : static const ColorShape + +{static} Red : static const ColorShape + +{static} Transparent : static const ColorShape + +{static} White : static const ColorShape + +{static} Yellow : static const ColorShape + +operator<<(ostream& os, const ColorShape& color) : std :: ostream& +} + + +class Ell { + +Ell(const Vector2Df& radius, const Vector2Df& center, + ColorShape fill, ColorShape stroke, float stroke_width) + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getClass() : string {query} + +printData() : void {query} + +setRadius(const Vector2Df& radius) : void +} + + +abstract class Gradient { + +Gradient(vector stops, + pair points, string units) + +~Gradient() + +getPoints() : pair {query} + -points : pair + +{abstract} getClass() : string {query} + +getUnits() : string {query} + -units : string + +getStops() : vector {query} + -stops : vector + +getTransforms() : vector {query} + -transforms : vector + +addStop(Stop stop) : void + +setTransforms(vector transforms) : void + +setUnits(string units) : void +} + + +class Group { + +Group() + +Group(Attributes attributes) + +~Group() + -attributes : Attributes + +getAttributes() : Attributes {query} + +getClass() : string {query} + +getElements() : vector {query} + -shapes : vector + +addElement(SVGElement* shape) : void + +printData() : void {query} +} + + +class Line { + +Line(const Vector2Df& point1, const Vector2Df& point2, + ColorShape stroke, float stroke_width) + -direction : Vector2Df + +getDirection() : Vector2Df {query} + +getLength() : float {query} + +getClass() : string {query} + +setDirection(const Vector2Df& direction) : void +} + + +class LinearGradient { + +LinearGradient(vector stops, + pair points, string units) + +getClass() : string {query} +} + + +class Parser { + -Parser(const string& file_name) + +~Parser() + -parseCircle(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Circle* + -parseColor(xml_node<>* node, string color, string& id) : ColorShape + -parseGradient(string id) : Gradient* + +getRoot() : Group* + -parseLine(xml_node<>* node, const ColorShape& stroke_color, float stroke_width) : Line* + +{static} getInstance(const string& file_name) : Parser* + -parsePath(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Path* + -parseRect(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Rect* + -parseElements(string file_name) : SVGElement* + -parseShape(xml_node<>* node) : SVGElement* + -root : SVGElement* + -parseText(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Text* + +getViewPort() : Vector2Df {query} + -viewport : Vector2Df + -parseEllipse(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Ell* + -parsePolygon(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Plygon* + -parsePolyline(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Plyline* + -getFloatAttribute(xml_node<>* node, string name) : float + -{static} instance : static Parser* + -gradients : map + +getViewBox() : pair {query} + -viewbox : pair + -getAttribute(xml_node<>* node, string name) : string + -parsePathPoints(xml_node<>* node) : vector + -getGradientStops(xml_node<>* node) : vector + -parsePoints(xml_node<>* node) : vector + -getTransformOrder(xml_node<>* node) : vector + -GetGradients(xml_node<>* node) : void + +printShapesData() : void +} + + +class Path { + +Path(const ColorShape& fill, + const ColorShape& stroke, float stroke_width) + -fill_rule : string + +getClass() : string {query} + +getFillRule() : string {query} + +getPoints() : vector {query} + -points : vector + +addPoint(PathPoint point) : void + +printData() : void {query} + +setFillRule(string fill_rule) : void +} + + +class Plygon { + +Plygon(ColorShape fill, ColorShape stroke, float stroke_width) + +getClass() : string {query} +} + + +class Plyline { + +Plyline(const ColorShape& fill, const ColorShape& stroke, float stroke_width) + +getClass() : string {query} +} + + +abstract class PolyShape { + #PolyShape(const ColorShape& fill, + const ColorShape& stroke, float stroke_width) + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + #fill_rule : string + +{abstract} getClass() : string {query} + +getFillRule() : string {query} + #points : vector + +getPoints() : vector& {query} + +addPoint(const Vector2Df& point) : void + +printData() : void {query} + +setFillRule(string fill_rule) : void +} + + +class RadialGradient { + +RadialGradient(vector stops, pair points, + Vector2Df radius, string units) + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getClass() : string {query} +} + + +class Rect { + +Rect(float width, float height, Vector2Df position, Vector2Df radius, + const ColorShape& fill, const ColorShape& stroke, float stroke_width) + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getHeight() : float {query} + +getWidth() : float {query} + -height : float + -width : float + +getClass() : string {query} + +printData() : void {query} + +setHeight(float height) : void + +setRadius(const Vector2Df& radius) : void + +setWidth(float width) : void +} + + +class Renderer { + -Renderer() + -getBrush(SVGElement* shape, RectF bound) :Brush* {query} + +{static} getInstance() : Renderer* + -{static} instance : static Renderer* + -applyTransform(vector transform_order, Graphics& graphics) : void {query} + -applyTransformsOnBrush(vector transform_order, LinearGradientBrush*& brush) : void {query} + -applyTransformsOnBrush(vector transform_order, PathGradientBrush*& brush) : void {query} + +draw(Graphics& graphics, Group* group) : void {query} + -drawCircle(Graphics& graphics, Circle* circle) : void {query} + -drawEllipse(Graphics& graphics, Ell* ellipse) : void {query} + -drawLine(Graphics& graphics, Line* line) : void {query} + -drawPath(Graphics& graphics, Path* path) : void {query} + -drawPolygon(Graphics& graphics, Plygon* polygon) : void {query} + -drawPolyline(Graphics& graphics, Plyline* polyline) : void {query} + -drawRectangle(Graphics& graphics, Rect* rectangle) : void {query} + -drawText(Graphics& graphics, Text* text) : void {query} +} + + +abstract class SVGElement { + #SVGElement() + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width) + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width, const Vector2Df& position) + +~SVGElement() + -fill : ColorShape + -stroke : ColorShape + +getFillColor() : ColorShape& {query} + +getOutlineColor() : ColorShape& {query} + +getGradient() : Gradient* {query} + -gradient : Gradient* + +getParent() : SVGElement* {query} + #parent : SVGElement* + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + +getPosition() : Vector2Df {query} + -position : Vector2Df + +getOutlineThickness() : float {query} + -stroke_width : float + +{abstract} getClass() : string {query} + +getTransforms() : vector {query} + -transforms : vector + +addElement(SVGElement* element) : void + +printData() : void {query} + +setFillColor(const ColorShape& color) : void + +setGradient(Gradient* gradient) : void + +setOutlineColor(const ColorShape& color) : void + +setOutlineThickness(float thickness) : void + +setParent(SVGElement* parent) : void + +setPosition(float x, float y) : void + +setPosition(const Vector2Df& position) : void + +setTransforms(const vector& transforms) : void +} + + +class Stop { + +Stop(const ColorShape& color, float offset) + -color : ColorShape + +getColor() : ColorShape {query} + +getOffset() : float {query} + -offset : float +} + + +class Text { + +Text(Vector2Df pos, string text, float font_size, const ColorShape& fill, + const ColorShape& stroke, float stroke_width) + -font_size : float + +getFontSize() : float {query} + -anchor : string + -content : string + +getAnchor() : string {query} + +getClass() : string {query} + +getContent() : string {query} + +getFontStyle() : string {query} + -style : string + +printData() : void {query} + +setAnchor(string anchor) : void + +setContent(string content) : void + +setFontSize(float font_size) : void + +setFontStyle(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 + +window_size : Vector2Df + +{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* + +getWindowSize(HWND hWnd) : void {query} + -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 PathPoint { + +point : Vector2Df + +large_arc_flag : bool + +sweep_flag : bool + +tc : char + +x_axis_rotation : float +} + + + + + +/' Inheritance relationships '/ + +.Ell <|-- .Circle + + +.Gradient <|-- .LinearGradient + + +.Gradient <|-- .RadialGradient + + +.PolyShape <|-- .Plygon + + +.PolyShape <|-- .Plyline + + +.SVGElement <|-- .Ell + + +.SVGElement <|-- .Group + + +.SVGElement <|-- .Line + + +.SVGElement <|-- .Path + + +.SVGElement <|-- .PolyShape + + +.SVGElement <|-- .Rect + + +.SVGElement <|-- .Text + + + + + +/' Aggregation relationships '/ + +.Gradient *-- .Stop + + +.Group o-- .SVGElement + + +.Parser o-- .Gradient + + +.Parser --> .Parser : -instance + + +.Parser o-- .SVGElement + + +.Path *-- .PathPoint + + +.Renderer --> .Renderer : -instance + + +.SVGElement *-- .ColorShape + + +.SVGElement o-- .Gradient + +.Stop *-- .ColorShape + + +.Viewer --> .Viewer : -instance + + + + + + +/' Nested objects '/ + + + +@enduml diff --git a/diagrams/ColorShape.png b/diagrams/ColorShape.png new file mode 100644 index 00000000..a73aa3fb Binary files /dev/null and b/diagrams/ColorShape.png differ diff --git a/diagrams/ColorShape.puml b/diagrams/ColorShape.puml new file mode 100644 index 00000000..48423b3b --- /dev/null +++ b/diagrams/ColorShape.puml @@ -0,0 +1,97 @@ +@startuml + + + + + +/' Objects '/ + +class ColorShape { + +ColorShape() + +ColorShape(int red, int green, int blue, int alpha) + +ColorShape(int color) + +a : int + +b : int + +g : int + +r : int + +{static} Black : static const ColorShape + +{static} Blue : static const ColorShape + +{static} Cyan : static const ColorShape + +{static} Green : static const ColorShape + +{static} Magenta : static const ColorShape + +{static} Red : static const ColorShape + +{static} Transparent : static const ColorShape + +{static} White : static const ColorShape + +{static} Yellow : static const ColorShape + +operator<<(std::ostream& os, const ColorShape& color) : std :: ostream& +} + + +abstract class SVGElement { + #SVGElement() + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width) + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width, const Vector2Df& position) + +~SVGElement() + -fill : ColorShape + -stroke : ColorShape + +getFillColor() : ColorShape& {query} + +getOutlineColor() : ColorShape& {query} + +getGradient() : Gradient* {query} + -gradient : Gradient* + +getParent() : SVGElement* {query} + #parent : SVGElement* + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + +getPosition() : Vector2Df {query} + -position : Vector2Df + +getOutlineThickness() : float {query} + -stroke_width : float + +{abstract} getClass() : std::string {query} + +getTransforms() : std::vector {query} + -transforms : std::vector + +addElement(SVGElement* element) : void + +printData() : void {query} + +setFillColor(const ColorShape& color) : void + +setGradient(Gradient* gradient) : void + +setOutlineColor(const ColorShape& 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 Stop { + +Stop(const ColorShape& color, float offset) + -color : ColorShape + +getColor() : ColorShape {query} + +getOffset() : float {query} + -offset : float +} + + + + + +/' Inheritance relationships '/ + + + + +/' Aggregation relationships '/ + +.SVGElement *-- .ColorShape + +.Stop *-- .ColorShape + + + + + + +/' Nested objects '/ + + + +@enduml diff --git a/diagrams/Gradient.png b/diagrams/Gradient.png new file mode 100644 index 00000000..c6e0d213 Binary files /dev/null and b/diagrams/Gradient.png differ diff --git a/diagrams/Gradient.puml b/diagrams/Gradient.puml new file mode 100644 index 00000000..236d7b60 --- /dev/null +++ b/diagrams/Gradient.puml @@ -0,0 +1,172 @@ +@startuml + + + + + +/' Objects '/ + +class ColorShape { + +ColorShape() + +ColorShape(int red, int green, int blue, int alpha) + +ColorShape(int color) + +a : int + +b : int + +g : int + +r : int + +{static} Black : static const ColorShape + +{static} Blue : static const ColorShape + +{static} Cyan : static const ColorShape + +{static} Green : static const ColorShape + +{static} Magenta : static const ColorShape + +{static} Red : static const ColorShape + +{static} Transparent : static const ColorShape + +{static} White : static const ColorShape + +{static} Yellow : static const ColorShape + +operator<<(ostream& os, const ColorShape& color) : std :: ostream& +} + +abstract class Gradient { + +Gradient(vector stops, + pair points, string units) + +~Gradient() + +getPoints() : pair {query} + -points : pair + +{abstract} getClass() : string {query} + +getUnits() : string {query} + -units : string + +getStops() : vector {query} + -stops : vector + +getTransforms() : vector {query} + -transforms : vector + +addStop(Stop stop) : void + +setTransforms(vector transforms) : void + +setUnits(string units) : void +} + +class LinearGradient { + +LinearGradient(vector stops, + pair points, string units) + +getClass() : string {query} +} + + +class Parser { + -Parser(const string& file_name) + +~Parser() + -parseCircle(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Circle* + -parseColor(xml_node<>* node, string color, string& id) : ColorShape + -parseGradient(string id) : Gradient* + +getRoot() : Group* + -parseLine(xml_node<>* node, const ColorShape& stroke_color, float stroke_width) : Line* + +{static} getInstance(const string& file_name) : Parser* + -parsePath(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Path* + -parseRect(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Rect* + -parseElements(string file_name) : SVGElement* + -parseShape(xml_node<>* node) : SVGElement* + -root : SVGElement* + -parseText(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Text* + +getViewPort() : Vector2Df {query} + -viewport : Vector2Df + -parseEllipse(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Ell* + -parsePolygon(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Plygon* + -parsePolyline(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Plyline* + -getFloatAttribute(xml_node<>* node, string name) : float + -{static} instance : static Parser* + -gradients : map + +getViewBox() : pair {query} + -viewbox : pair + -getAttribute(xml_node<>* node, string name) : string + -parsePathPoints(xml_node<>* node) : vector + -getGradientStops(xml_node<>* node) : vector + -parsePoints(xml_node<>* node) : vector + -getTransformOrder(xml_node<>* node) : vector + -GetGradients(xml_node<>* node) : void + +printShapesData() : void +} + +class RadialGradient { + +RadialGradient(vector stops, pair points, + Vector2Df radius, string units) + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getClass() : string {query} +} + +abstract class SVGElement { + #SVGElement() + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width) + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width, const Vector2Df& position) + +~SVGElement() + -fill : ColorShape + -stroke : ColorShape + +getFillColor() : ColorShape& {query} + +getOutlineColor() : ColorShape& {query} + +getGradient() : Gradient* {query} + -gradient : Gradient* + +getParent() : SVGElement* {query} + #parent : SVGElement* + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + +getPosition() : Vector2Df {query} + -position : Vector2Df + +getOutlineThickness() : float {query} + -stroke_width : float + +{abstract} getClass() : string {query} + +getTransforms() : vector {query} + -transforms : vector + +addElement(SVGElement* element) : void + +printData() : void {query} + +setFillColor(const ColorShape& color) : void + +setGradient(Gradient* gradient) : void + +setOutlineColor(const ColorShape& color) : void + +setOutlineThickness(float thickness) : void + +setParent(SVGElement* parent) : void + +setPosition(float x, float y) : void + +setPosition(const Vector2Df& position) : void + +setTransforms(const vector& transforms) : void +} + + +class Stop { + +Stop(const ColorShape& color, float offset) + -color : ColorShape + +getColor() : ColorShape {query} + +getOffset() : float {query} + -offset : float +} + +/' Inheritance relationships '/ + +.Gradient <|-- .LinearGradient + + +.Gradient <|-- .RadialGradient + + +/' Aggregation relationships '/ + +.Gradient *-- .Stop + +.Parser o-- .Gradient + + +.Parser --> .Parser : -instance + + +.Parser o-- .SVGElement + + +.SVGElement *-- .ColorShape + + +.SVGElement o-- .Gradient + +.Stop *-- .ColorShape + + +/' Nested objects '/ + + + +@enduml diff --git a/diagrams/Group.png b/diagrams/Group.png new file mode 100644 index 00000000..af3a31d9 Binary files /dev/null and b/diagrams/Group.png differ diff --git a/diagrams/Group.puml b/diagrams/Group.puml new file mode 100644 index 00000000..a0b24361 --- /dev/null +++ b/diagrams/Group.puml @@ -0,0 +1,234 @@ +@startuml + + + + + +/' Objects '/ + +class Circle { + +Circle(float radius, const Vector2Df& center, ColorShape fill, ColorShape stroke, float stroke_width) + +getClass() : string {query} +} + +class Ell { + +Ell(const Vector2Df& radius, const Vector2Df& center, + ColorShape fill, ColorShape stroke, float stroke_width) + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getClass() : string {query} + +printData() : void {query} + +setRadius(const Vector2Df& radius) : void +} + +class Group { + +Group() + +Group(Attributes attributes) + +~Group() + -attributes : Attributes + +getAttributes() : Attributes {query} + +getClass() : string {query} + +getElements() : vector {query} + -shapes : vector + +addElement(SVGElement* shape) : void + +printData() : void {query} +} + + +class Line { + +Line(const Vector2Df& point1, const Vector2Df& point2, + ColorShape stroke, float stroke_width) + -direction : Vector2Df + +getDirection() : Vector2Df {query} + +getLength() : float {query} + +getClass() : string {query} + +setDirection(const Vector2Df& direction) : void +} + +class Path { + +Path(const ColorShape& fill, + const ColorShape& stroke, float stroke_width) + -fill_rule : string + +getClass() : string {query} + +getFillRule() : string {query} + +getPoints() : vector {query} + -points : vector + +addPoint(PathPoint point) : void + +printData() : void {query} + +setFillRule(string fill_rule) : void +} + + +class Plygon { + +Plygon(ColorShape fill, ColorShape stroke, float stroke_width) + +getClass() : string {query} +} + + +class Plyline { + +Plyline(const ColorShape& fill, const ColorShape& stroke, float stroke_width) + +getClass() : string {query} +} + + +abstract class PolyShape { + #PolyShape(const ColorShape& fill, + const ColorShape& stroke, float stroke_width) + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + #fill_rule : string + +{abstract} getClass() : string {query} + +getFillRule() : string {query} + #points : vector + +getPoints() : vector& {query} + +addPoint(const Vector2Df& point) : void + +printData() : void {query} + +setFillRule(string fill_rule) : void +} + +class Rect { + +Rect(float width, float height, Vector2Df position, Vector2Df radius, + const ColorShape& fill, const ColorShape& stroke, float stroke_width) + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getHeight() : float {query} + +getWidth() : float {query} + -height : float + -width : float + +getClass() : string {query} + +printData() : void {query} + +setHeight(float height) : void + +setRadius(const Vector2Df& radius) : void + +setWidth(float width) : void +} + +abstract class SVGElement { + #SVGElement() + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width) + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width, const Vector2Df& position) + +~SVGElement() + -fill : ColorShape + -stroke : ColorShape + +getFillColor() : ColorShape& {query} + +getOutlineColor() : ColorShape& {query} + +getGradient() : Gradient* {query} + -gradient : Gradient* + +getParent() : SVGElement* {query} + #parent : SVGElement* + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + +getPosition() : Vector2Df {query} + -position : Vector2Df + +getOutlineThickness() : float {query} + -stroke_width : float + +{abstract} getClass() : string {query} + +getTransforms() : vector {query} + -transforms : vector + +addElement(SVGElement* element) : void + +printData() : void {query} + +setFillColor(const ColorShape& color) : void + +setGradient(Gradient* gradient) : void + +setOutlineColor(const ColorShape& color) : void + +setOutlineThickness(float thickness) : void + +setParent(SVGElement* parent) : void + +setPosition(float x, float y) : void + +setPosition(const Vector2Df& position) : void + +setTransforms(const vector& transforms) : void +} + +class Text { + +Text(Vector2Df pos, string text, float font_size, const ColorShape& fill, + const ColorShape& stroke, float stroke_width) + -font_size : float + +getFontSize() : float {query} + -anchor : string + -content : string + +getAnchor() : string {query} + +getClass() : string {query} + +getContent() : string {query} + +getFontStyle() : string {query} + -style : string + +printData() : void {query} + +setAnchor(string anchor) : void + +setContent(string content) : void + +setFontSize(float font_size) : void + +setFontStyle(string style) : void +} + + +class Vector2D > { + +Vector2D() + +Vector2D(T X, T Y) + +Vector2D(const Vector2D& vector) + +x : T + +y : T +} + +class PathPoint { + +point : Vector2Df + +large_arc_flag : bool + +sweep_flag : bool + +tc : char + +x_axis_rotation : float +} + + + + + +/' Inheritance relationships '/ + +.Ell <|-- .Circle + + +.PolyShape <|-- .Plygon + + +.PolyShape <|-- .Plyline + + +.SVGElement <|-- .Ell + + +.SVGElement <|-- .Group + + +.SVGElement <|-- .Line + + +.SVGElement <|-- .Path + + +.SVGElement <|-- .PolyShape + + +.SVGElement <|-- .Rect + + +.SVGElement <|-- .Text + + + + + +/' Aggregation relationships '/ + +.Group o-- .SVGElement + + +.Path *-- .PathPoint + + + + + + + + +/' Nested objects '/ + + + +@enduml diff --git a/diagrams/Parser.png b/diagrams/Parser.png new file mode 100644 index 00000000..80117796 Binary files /dev/null and b/diagrams/Parser.png differ diff --git a/diagrams/Parser.puml b/diagrams/Parser.puml new file mode 100644 index 00000000..c5301089 --- /dev/null +++ b/diagrams/Parser.puml @@ -0,0 +1,122 @@ +@startuml + + + + + +/' Objects '/ + +abstract class Gradient { + +Gradient(std::vector stops, std::pair points, std::string units) + +~Gradient() + +getPoints() : std::pair {query} + -points : std::pair + +{abstract} getClass() : std::string {query} + +getUnits() : std::string {query} + -units : std::string + +getStops() : std::vector {query} + -stops : std::vector + +getTransforms() : std::vector {query} + -transforms : std::vector + +addStop(Stop stop) : void + +setTransforms(std::vector transforms) : void + +setUnits(std::string units) : void +} + + +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 + -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 + +getViewBox() : std::pair {query} + -viewbox : std::pair + -getAttribute(rapidxml::xml_node<>* node, std::string name) : std::string + -parsePathPoints(rapidxml::xml_node<>* node) : std::vector + -getGradientStops(rapidxml::xml_node<>* node) : std::vector + -parsePoints(rapidxml::xml_node<>* node) : std::vector + -getTransformOrder(rapidxml::xml_node<>* node) : std::vector + -GetGradients(rapidxml::xml_node<>* node) : void + +printShapesData() : void +} + + +abstract class SVGElement { + #SVGElement() + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width) + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width, const Vector2Df& position) + +~SVGElement() + -fill : ColorShape + -stroke : ColorShape + +getFillColor() : ColorShape& {query} + +getOutlineColor() : ColorShape& {query} + +getGradient() : Gradient* {query} + -gradient : Gradient* + +getParent() : SVGElement* {query} + #parent : SVGElement* + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + +getPosition() : Vector2Df {query} + -position : Vector2Df + +getOutlineThickness() : float {query} + -stroke_width : float + +{abstract} getClass() : std::string {query} + +getTransforms() : std::vector {query} + -transforms : std::vector + +addElement(SVGElement* element) : void + +printData() : void {query} + +setFillColor(const ColorShape& color) : void + +setGradient(Gradient* gradient) : void + +setOutlineColor(const ColorShape& 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 +} + + + + + +/' Inheritance relationships '/ + + + + +/' Aggregation relationships '/ + +.Parser o-- .Gradient + + +.Parser --> .Parser : -instance + + +.Parser o-- .SVGElement + + +.SVGElement o-- .Gradient + +/' Nested objects '/ + + + +@enduml diff --git a/diagrams/Renderer.png b/diagrams/Renderer.png new file mode 100644 index 00000000..a4b57f60 Binary files /dev/null and b/diagrams/Renderer.png differ diff --git a/docs/diagrams/Renderer.puml b/diagrams/Renderer.puml similarity index 76% rename from docs/diagrams/Renderer.puml rename to diagrams/Renderer.puml index e6cc3cce..eb628023 100644 --- a/docs/diagrams/Renderer.puml +++ b/diagrams/Renderer.puml @@ -8,9 +8,12 @@ class Renderer { -Renderer() + -getBrush(SVGElement* shape, Gdiplus::RectF bound) : Gdiplus::Brush* {query} +{static} getInstance() : Renderer* -{static} instance : static Renderer* -applyTransform(std::vector transform_order, Gdiplus::Graphics& graphics) : void {query} + -applyTransformsOnBrush(std::vector transform_order, Gdiplus::LinearGradientBrush*& brush) : void {query} + -applyTransformsOnBrush(std::vector transform_order, Gdiplus::PathGradientBrush*& brush) : 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} diff --git a/diagrams/Shape.png b/diagrams/Shape.png new file mode 100644 index 00000000..9fde6e7e Binary files /dev/null and b/diagrams/Shape.png differ diff --git a/diagrams/Shape.puml b/diagrams/Shape.puml new file mode 100644 index 00000000..a26e39bd --- /dev/null +++ b/diagrams/Shape.puml @@ -0,0 +1,361 @@ +@startuml + + + + + +/' Objects '/ + +class Circle { + +Circle(float radius, const Vector2Df& center, ColorShape fill, ColorShape stroke, float stroke_width) + +getClass() : string {query} +} + + +class ColorShape { + +ColorShape() + +ColorShape(int red, int green, int blue, int alpha) + +ColorShape(int color) + +a : int + +b : int + +g : int + +r : int + +{static} Black : static const ColorShape + +{static} Blue : static const ColorShape + +{static} Cyan : static const ColorShape + +{static} Green : static const ColorShape + +{static} Magenta : static const ColorShape + +{static} Red : static const ColorShape + +{static} Transparent : static const ColorShape + +{static} White : static const ColorShape + +{static} Yellow : static const ColorShape + +operator<<(ostream& os, const ColorShape& color) : std :: ostream& +} + + +class Ell { + +Ell(const Vector2Df& radius, const Vector2Df& center, + ColorShape fill, ColorShape stroke, float stroke_width) + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getClass() : string {query} + +printData() : void {query} + +setRadius(const Vector2Df& radius) : void +} + + +abstract class Gradient { + +Gradient(vector stops, + pair points, string units) + +~Gradient() + +getPoints() : pair {query} + -points : pair + +{abstract} getClass() : string {query} + +getUnits() : string {query} + -units : string + +getStops() : vector {query} + -stops : vector + +getTransforms() : vector {query} + -transforms : vector + +addStop(Stop stop) : void + +setTransforms(vector transforms) : void + +setUnits(string units) : void +} + + +class Group { + +Group() + +Group(Attributes attributes) + +~Group() + -attributes : Attributes + +getAttributes() : Attributes {query} + +getClass() : string {query} + +getElements() : vector {query} + -shapes : vector + +addElement(SVGElement* shape) : void + +printData() : void {query} +} + + +class Line { + +Line(const Vector2Df& point1, const Vector2Df& point2, + ColorShape stroke, float stroke_width) + -direction : Vector2Df + +getDirection() : Vector2Df {query} + +getLength() : float {query} + +getClass() : string {query} + +setDirection(const Vector2Df& direction) : void +} + + +class LinearGradient { + +LinearGradient(vector stops, + pair points, string units) + +getClass() : string {query} +} + + +class Parser { + -Parser(const string& file_name) + +~Parser() + -parseCircle(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Circle* + -parseColor(xml_node<>* node, string color, string& id) : ColorShape + -parseGradient(string id) : Gradient* + +getRoot() : Group* + -parseLine(xml_node<>* node, const ColorShape& stroke_color, float stroke_width) : Line* + +{static} getInstance(const string& file_name) : Parser* + -parsePath(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Path* + -parseRect(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Rect* + -parseElements(string file_name) : SVGElement* + -parseShape(xml_node<>* node) : SVGElement* + -root : SVGElement* + -parseText(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : Text* + +getViewPort() : Vector2Df {query} + -viewport : Vector2Df + -parseEllipse(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Ell* + -parsePolygon(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Plygon* + -parsePolyline(xml_node<>* node, const ColorShape& fill_color, const ColorShape& stroke_color, float stroke_width) : class Plyline* + -getFloatAttribute(xml_node<>* node, string name) : float + -{static} instance : static Parser* + -gradients : map + +getViewBox() : pair {query} + -viewbox : pair + -getAttribute(xml_node<>* node, string name) : string + -parsePathPoints(xml_node<>* node) : vector + -getGradientStops(xml_node<>* node) : vector + -parsePoints(xml_node<>* node) : vector + -getTransformOrder(xml_node<>* node) : vector + -GetGradients(xml_node<>* node) : void + +printShapesData() : void +} + + +class Path { + +Path(const ColorShape& fill, + const ColorShape& stroke, float stroke_width) + -fill_rule : string + +getClass() : string {query} + +getFillRule() : string {query} + +getPoints() : vector {query} + -points : vector + +addPoint(PathPoint point) : void + +printData() : void {query} + +setFillRule(string fill_rule) : void +} + + +class Plygon { + +Plygon(ColorShape fill, ColorShape stroke, float stroke_width) + +getClass() : string {query} +} + + +class Plyline { + +Plyline(const ColorShape& fill, const ColorShape& stroke, float stroke_width) + +getClass() : string {query} +} + + +abstract class PolyShape { + #PolyShape(const ColorShape& fill, + const ColorShape& stroke, float stroke_width) + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + #fill_rule : string + +{abstract} getClass() : string {query} + +getFillRule() : string {query} + #points : vector + +getPoints() : vector& {query} + +addPoint(const Vector2Df& point) : void + +printData() : void {query} + +setFillRule(string fill_rule) : void +} + + +class RadialGradient { + +RadialGradient(vector stops, pair points, + Vector2Df radius, string units) + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getClass() : string {query} +} + + +class Rect { + +Rect(float width, float height, Vector2Df position, Vector2Df radius, + const ColorShape& fill, const ColorShape& stroke, float stroke_width) + +getRadius() : Vector2Df {query} + -radius : Vector2Df + +getHeight() : float {query} + +getWidth() : float {query} + -height : float + -width : float + +getClass() : string {query} + +printData() : void {query} + +setHeight(float height) : void + +setRadius(const Vector2Df& radius) : void + +setWidth(float width) : void +} + +abstract class SVGElement { + #SVGElement() + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width) + #SVGElement(const ColorShape& fill, const ColorShape& stroke, float stroke_width, const Vector2Df& position) + +~SVGElement() + -fill : ColorShape + -stroke : ColorShape + +getFillColor() : ColorShape& {query} + +getOutlineColor() : ColorShape& {query} + +getGradient() : Gradient* {query} + -gradient : Gradient* + +getParent() : SVGElement* {query} + #parent : SVGElement* + +getMaxBound() : Vector2Df {query} + +getMinBound() : Vector2Df {query} + +getPosition() : Vector2Df {query} + -position : Vector2Df + +getOutlineThickness() : float {query} + -stroke_width : float + +{abstract} getClass() : string {query} + +getTransforms() : vector {query} + -transforms : vector + +addElement(SVGElement* element) : void + +printData() : void {query} + +setFillColor(const ColorShape& color) : void + +setGradient(Gradient* gradient) : void + +setOutlineColor(const ColorShape& color) : void + +setOutlineThickness(float thickness) : void + +setParent(SVGElement* parent) : void + +setPosition(float x, float y) : void + +setPosition(const Vector2Df& position) : void + +setTransforms(const vector& transforms) : void +} + + +class Stop { + +Stop(const ColorShape& color, float offset) + -color : ColorShape + +getColor() : ColorShape {query} + +getOffset() : float {query} + -offset : float +} + + +class Text { + +Text(Vector2Df pos, string text, float font_size, const ColorShape& fill, + const ColorShape& stroke, float stroke_width) + -font_size : float + +getFontSize() : float {query} + -anchor : string + -content : string + +getAnchor() : string {query} + +getClass() : string {query} + +getContent() : string {query} + +getFontStyle() : string {query} + -style : string + +printData() : void {query} + +setAnchor(string anchor) : void + +setContent(string content) : void + +setFontSize(float font_size) : void + +setFontStyle(string style) : void +} + + +class Vector2D > { + +Vector2D() + +Vector2D(T X, T Y) + +Vector2D(const Vector2D& vector) + +x : T + +y : T +} + +class PathPoint { + +point : Vector2Df + +large_arc_flag : bool + +sweep_flag : bool + +tc : char + +x_axis_rotation : float +} + + + + + +/' Inheritance relationships '/ + +.Ell <|-- .Circle + + +.Gradient <|-- .LinearGradient + + +.Gradient <|-- .RadialGradient + + +.PolyShape <|-- .Plygon + + +.PolyShape <|-- .Plyline + + +.SVGElement <|-- .Ell + + +.SVGElement <|-- .Group + + +.SVGElement <|-- .Line + + +.SVGElement <|-- .Path + + +.SVGElement <|-- .PolyShape + + +.SVGElement <|-- .Rect + + +.SVGElement <|-- .Text + + + + + +/' Aggregation relationships '/ + +.Gradient *-- .Stop + + +.Group o-- .SVGElement + + +.Parser o-- .Gradient + + +.Parser --> .Parser : -instance + + +.Parser o-- .SVGElement + + +.Path *-- .PathPoint + +.SVGElement *-- .ColorShape + + +.SVGElement o-- .Gradient + +.Stop *-- .ColorShape + + + + + +/' Nested objects '/ + + + +@enduml diff --git a/docs/diagrams/Vector2D.png b/diagrams/Vector2D.png similarity index 100% rename from docs/diagrams/Vector2D.png rename to diagrams/Vector2D.png diff --git a/docs/diagrams/Vector2D.puml b/diagrams/Vector2D.puml similarity index 100% rename from docs/diagrams/Vector2D.puml rename to diagrams/Vector2D.puml diff --git a/diagrams/Viewer.png b/diagrams/Viewer.png new file mode 100644 index 00000000..dd024d75 Binary files /dev/null and b/diagrams/Viewer.png differ diff --git a/docs/diagrams/Viewer.puml b/diagrams/Viewer.puml similarity index 91% rename from docs/diagrams/Viewer.puml rename to diagrams/Viewer.puml index cf047a59..c5f74261 100644 --- a/docs/diagrams/Viewer.puml +++ b/diagrams/Viewer.puml @@ -10,6 +10,7 @@ class Viewer { -Viewer() +~Viewer() -last_mouse_pos : POINT + +window_size : Vector2Df +{static} getInstance() : Viewer* -is_dragging : bool +needs_repaint : bool @@ -18,6 +19,7 @@ class Viewer { +rotate_angle : float +zoom_factor : float -{static} instance : static Viewer* + +getWindowSize(HWND hWnd) : void {query} -handleKeyDown(WPARAM wParam) : void +handleKeyEvent(WPARAM wParam) : void -handleLeftButtonDown(LPARAM lParam) : void diff --git a/docs/html/Circle_8cpp_source.html b/docs/Circle_8cpp_source.html similarity index 99% rename from docs/html/Circle_8cpp_source.html rename to docs/Circle_8cpp_source.html index 152af7c8..aa2606a9 100644 --- a/docs/html/Circle_8cpp_source.html +++ b/docs/Circle_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
diff --git a/docs/html/Circle_8hpp_source.html b/docs/Circle_8hpp_source.html similarity index 98% rename from docs/html/Circle_8hpp_source.html rename to docs/Circle_8hpp_source.html index b01c7e02..30c1db8b 100644 --- a/docs/html/Circle_8hpp_source.html +++ b/docs/Circle_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -140,9 +140,9 @@
Circle(float radius, const Vector2Df &center, mColor fill, mColor stroke, float stroke_width)
Constructs a Circle object.
Definition: Circle.cpp:3
Represents an ellipse in 2D space.
Definition: Ellipse.hpp:12
Vector2Df radius
Radii of the ellipse in the x and y directions.
Definition: Ellipse.hpp:14
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/html/Color_8cpp_source.html b/docs/Color_8cpp_source.html similarity index 99% rename from docs/html/Color_8cpp_source.html rename to docs/Color_8cpp_source.html index 627d5610..1f081182 100644 --- a/docs/html/Color_8cpp_source.html +++ b/docs/Color_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
diff --git a/docs/html/Color_8hpp_source.html b/docs/Color_8hpp_source.html similarity index 99% rename from docs/html/Color_8hpp_source.html rename to docs/Color_8hpp_source.html index 1df9b01e..6a7eec22 100644 --- a/docs/html/Color_8hpp_source.html +++ b/docs/Color_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
diff --git a/docs/html/Ellipse_8cpp_source.html b/docs/Ellipse_8cpp_source.html similarity index 73% rename from docs/html/Ellipse_8cpp_source.html rename to docs/Ellipse_8cpp_source.html index 4215a146..0325ca86 100644 --- a/docs/html/Ellipse_8cpp_source.html +++ b/docs/Ellipse_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -127,37 +127,40 @@
4 
5 Ell::Ell(const Vector2Df &radius, const Vector2Df &center, mColor fill,
6  mColor stroke, float stroke_thickness)
-
7  : radius(radius) {
-
8  setPosition(center);
- - -
11  setOutlineThickness(stroke_thickness);
-
12 }
-
13 
-
14 std::string Ell::getClass() const { return "Ellipse"; }
-
15 
-
16 void Ell::setRadius(const Vector2Df &radius) { this->radius = radius; }
-
17 
-
18 Vector2Df Ell::getRadius() const { return radius; }
+
7  : SVGElement(fill, stroke, stroke_thickness, center), radius(radius) {}
+
8 
+
9 std::string Ell::getClass() const { return "Ellipse"; }
+
10 
+
11 void Ell::setRadius(const Vector2Df &radius) { this->radius = radius; }
+
12 
+
13 Vector2Df Ell::getRadius() const { return radius; }
+
14 
+ +
16  return Vector2Df(getPosition().x - getRadius().x,
+
17  getPosition().y - getRadius().y);
+
18 }
19 
-
20 void Ell::printData() const {
- -
22  std::cout << "Radius: " << getRadius().x << " " << getRadius().y
-
23  << std::endl;
-
24 }
-
Vector2Df getRadius() const
Gets the radius of the ellipse.
Definition: Ellipse.cpp:18
-
std::string getClass() const override
Gets the type of the shape.
Definition: Ellipse.cpp:14
-
void printData() const override
Prints the data of the shape.
Definition: Ellipse.cpp:20
+ +
21  return Vector2Df(getPosition().x + getRadius().x,
+
22  getPosition().y + getRadius().y);
+
23 }
+
24 
+
25 void Ell::printData() const {
+ +
27  std::cout << "Radius: " << getRadius().x << " " << getRadius().y
+
28  << std::endl;
+
29 }
+
Vector2Df getRadius() const
Gets the radius of the ellipse.
Definition: Ellipse.cpp:13
+
std::string getClass() const override
Gets the type of the shape.
Definition: Ellipse.cpp:9
+
void printData() const override
Prints the data of the shape.
Definition: Ellipse.cpp:25
Ell(const Vector2Df &radius, const Vector2Df &center, mColor fill, mColor stroke, float stroke_width)
Constructs an Ellipse object.
Definition: Ellipse.cpp:5
-
void setRadius(const Vector2Df &radius)
Sets the radius of the ellipse.
Definition: Ellipse.cpp:16
+
Vector2Df getMaxBound() const override
Gets the maximum bounding box of the shape.
Definition: Ellipse.cpp:20
+
void setRadius(const Vector2Df &radius)
Sets the radius of the ellipse.
Definition: Ellipse.cpp:11
+
Vector2Df getMinBound() const override
Gets the minimum bounding box of the shape.
Definition: Ellipse.cpp:15
Vector2Df radius
Radii of the ellipse in the x and y directions.
Definition: Ellipse.hpp:14
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
void setPosition(float x, float y)
Sets the position of the shape.
Definition: SVGElement.cpp:22
-
void setOutlineThickness(float thickness)
Sets the outline thickness of the shape.
Definition: SVGElement.cpp:16
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
-
void setFillColor(const mColor &color)
Sets the fill color of the shape.
Definition: SVGElement.cpp:8
-
void setOutlineColor(const mColor &color)
Sets the outline color of the shape.
Definition: SVGElement.cpp:12
-
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:33
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
Vector2Df getPosition() const
Get the current position of the shape.
Definition: SVGElement.cpp:41
+
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:47
T x
X coordinate of the vector.
Definition: Vector2D.hpp:45
T y
Y coordinate of the vector.
Definition: Vector2D.hpp:46
diff --git a/docs/html/Ellipse_8hpp_source.html b/docs/Ellipse_8hpp_source.html similarity index 86% rename from docs/html/Ellipse_8hpp_source.html rename to docs/Ellipse_8hpp_source.html index ae1e0db2..b3b25701 100644 --- a/docs/html/Ellipse_8hpp_source.html +++ b/docs/Ellipse_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -140,21 +140,27 @@
44 
50  Vector2Df getRadius() const;
51 
-
57  void printData() const override;
-
58 };
-
59 
-
60 #endif // ELLIPSE_HPP_
+
57  Vector2Df getMinBound() const override;
+
58 
+
64  Vector2Df getMaxBound() const override;
+
65 
+
71  void printData() const override;
+
72 };
+
73 
+
74 #endif // ELLIPSE_HPP_
Represents an ellipse in 2D space.
Definition: Ellipse.hpp:12
-
Vector2Df getRadius() const
Gets the radius of the ellipse.
Definition: Ellipse.cpp:18
-
std::string getClass() const override
Gets the type of the shape.
Definition: Ellipse.cpp:14
-
void printData() const override
Prints the data of the shape.
Definition: Ellipse.cpp:20
+
Vector2Df getRadius() const
Gets the radius of the ellipse.
Definition: Ellipse.cpp:13
+
std::string getClass() const override
Gets the type of the shape.
Definition: Ellipse.cpp:9
+
void printData() const override
Prints the data of the shape.
Definition: Ellipse.cpp:25
Ell(const Vector2Df &radius, const Vector2Df &center, mColor fill, mColor stroke, float stroke_width)
Constructs an Ellipse object.
Definition: Ellipse.cpp:5
-
void setRadius(const Vector2Df &radius)
Sets the radius of the ellipse.
Definition: Ellipse.cpp:16
+
Vector2Df getMaxBound() const override
Gets the maximum bounding box of the shape.
Definition: Ellipse.cpp:20
+
void setRadius(const Vector2Df &radius)
Sets the radius of the ellipse.
Definition: Ellipse.cpp:11
+
Vector2Df getMinBound() const override
Gets the minimum bounding box of the shape.
Definition: Ellipse.cpp:15
Vector2Df radius
Radii of the ellipse in the x and y directions.
Definition: Ellipse.hpp:14
-
Represents an element in an SVG file.
Definition: SVGElement.hpp:17
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/Gradient_8cpp_source.html b/docs/Gradient_8cpp_source.html new file mode 100644 index 00000000..30b3d43f --- /dev/null +++ b/docs/Gradient_8cpp_source.html @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/graphics/Gradient.cpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Gradient.cpp
+
+
+
1 #include "Gradient.hpp"
+
2 
+
3 Gradient::Gradient(std::vector< Stop > stops,
+
4  std::pair< Vector2Df, Vector2Df > points, std::string units)
+
5  : stops(stops), points(points), units(units) {}
+
6 
+
7 std::vector< Stop > Gradient::getStops() const { return stops; }
+
8 
+
9 std::pair< Vector2Df, Vector2Df > Gradient::getPoints() const { return points; }
+
10 
+
11 void Gradient::setUnits(std::string units) { this->units = units; }
+
12 
+
13 std::string Gradient::getUnits() const { return units; }
+
14 
+
15 void Gradient::setTransforms(std::vector< std::string > transforms) {
+
16  this->transforms = transforms;
+
17 }
+
18 
+
19 std::vector< std::string > Gradient::getTransforms() const {
+
20  return transforms;
+
21 }
+
22 
+
23 void Gradient::addStop(Stop stop) { stops.push_back(stop); }
+
std::vector< Stop > getStops() const
Gets the stops of the gradient.
Definition: Gradient.cpp:7
+
std::vector< std::string > transforms
Transforms of the gradient.
Definition: Gradient.hpp:96
+
void addStop(Stop stop)
Adds a stop to the gradient.
Definition: Gradient.cpp:23
+
std::string getUnits() const
Gets the units of the gradient.
Definition: Gradient.cpp:13
+
std::string units
Units of the gradient.
Definition: Gradient.hpp:95
+
void setUnits(std::string units)
Gets the units of the gradient.
Definition: Gradient.cpp:11
+
std::vector< Stop > stops
Stops of the gradient.
Definition: Gradient.hpp:92
+
std::pair< Vector2Df, Vector2Df > points
Start and end points of the gradient.
Definition: Gradient.hpp:94
+
Gradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)
Constructs a Gradient object.
Definition: Gradient.cpp:3
+
std::pair< Vector2Df, Vector2Df > getPoints() const
Gets the start and end points of the gradient.
Definition: Gradient.cpp:9
+
std::vector< std::string > getTransforms() const
Gets the transforms of the gradient.
Definition: Gradient.cpp:19
+
void setTransforms(std::vector< std::string > transforms)
Gets the transforms of the gradient.
Definition: Gradient.cpp:15
+
A class that represents a stop.
Definition: Stop.hpp:11
+
+
+ + + \ No newline at end of file diff --git a/docs/Gradient_8hpp_source.html b/docs/Gradient_8hpp_source.html new file mode 100644 index 00000000..644b1431 --- /dev/null +++ b/docs/Gradient_8hpp_source.html @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/graphics/Gradient.hpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Gradient.hpp
+
+
+
1 #ifndef GRADIENT_HPP_
+
2 #define GRADIENT_HPP_
+
3 
+
4 #include <string>
+
5 #include <vector>
+
6 
+
7 #include "Stop.hpp"
+
8 #include "Vector2D.hpp"
+
9 
+
18 class Gradient {
+
19 public:
+
27  Gradient(std::vector< Stop > stops,
+
28  std::pair< Vector2Df, Vector2Df > points, std::string units);
+
29 
+
33  virtual ~Gradient() = default;
+
34 
+
40  virtual std::string getClass() const = 0;
+
41 
+
47  std::vector< Stop > getStops() const;
+
48 
+
54  std::pair< Vector2Df, Vector2Df > getPoints() const;
+
55 
+
61  void setUnits(std::string units);
+
62 
+
68  std::string getUnits() const;
+
69 
+
75  void setTransforms(std::vector< std::string > transforms);
+
76 
+
82  std::vector< std::string > getTransforms() const;
+
83 
+
89  void addStop(Stop stop);
+
90 
+
91 private:
+
92  std::vector< Stop > stops;
+
93  std::pair< Vector2Df, Vector2Df >
+ +
95  std::string units;
+
96  std::vector< std::string > transforms;
+
97 };
+
98 
+
99 #endif
+
A class that represents a gradient.
Definition: Gradient.hpp:18
+
std::vector< Stop > getStops() const
Gets the stops of the gradient.
Definition: Gradient.cpp:7
+
std::vector< std::string > transforms
Transforms of the gradient.
Definition: Gradient.hpp:96
+
void addStop(Stop stop)
Adds a stop to the gradient.
Definition: Gradient.cpp:23
+
std::string getUnits() const
Gets the units of the gradient.
Definition: Gradient.cpp:13
+
std::string units
Units of the gradient.
Definition: Gradient.hpp:95
+
void setUnits(std::string units)
Gets the units of the gradient.
Definition: Gradient.cpp:11
+
std::vector< Stop > stops
Stops of the gradient.
Definition: Gradient.hpp:92
+
std::pair< Vector2Df, Vector2Df > points
Start and end points of the gradient.
Definition: Gradient.hpp:94
+
virtual ~Gradient()=default
Destructs a Gradient object.
+
Gradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)
Constructs a Gradient object.
Definition: Gradient.cpp:3
+
std::pair< Vector2Df, Vector2Df > getPoints() const
Gets the start and end points of the gradient.
Definition: Gradient.cpp:9
+
virtual std::string getClass() const =0
Gets the type of the gradient.
+
std::vector< std::string > getTransforms() const
Gets the transforms of the gradient.
Definition: Gradient.cpp:19
+
void setTransforms(std::vector< std::string > transforms)
Gets the transforms of the gradient.
Definition: Gradient.cpp:15
+
A class that represents a stop.
Definition: Stop.hpp:11
+
+
+ + + \ No newline at end of file diff --git a/docs/html/Graphics_8hpp_source.html b/docs/Graphics_8hpp_source.html similarity index 95% rename from docs/html/Graphics_8hpp_source.html rename to docs/Graphics_8hpp_source.html index ab62e013..98cc7a84 100644 --- a/docs/html/Graphics_8hpp_source.html +++ b/docs/Graphics_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -129,13 +129,15 @@
6 #include "graphics/Ellipse.hpp"
7 #include "graphics/Group.hpp"
8 #include "graphics/Line.hpp"
-
9 #include "graphics/Path.hpp"
-
10 #include "graphics/Polygon.hpp"
-
11 #include "graphics/Polyline.hpp"
-
12 #include "graphics/Rect.hpp"
-
13 #include "graphics/Text.hpp"
-
14 
-
15 #endif // GRAPHICS_HPP_
+
9 #include "graphics/LinearGradient.hpp"
+
10 #include "graphics/Path.hpp"
+
11 #include "graphics/Polygon.hpp"
+
12 #include "graphics/Polyline.hpp"
+
13 #include "graphics/RadialGradient.hpp"
+
14 #include "graphics/Rect.hpp"
+
15 #include "graphics/Text.hpp"
+
16 
+
17 #endif // GRAPHICS_HPP_
diff --git a/docs/LinearGradient_8cpp_source.html b/docs/LinearGradient_8cpp_source.html new file mode 100644 index 00000000..f2084673 --- /dev/null +++ b/docs/LinearGradient_8cpp_source.html @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/graphics/LinearGradient.cpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
LinearGradient.cpp
+
+
+
1 #include "LinearGradient.hpp"
+
2 
+
3 LinearGradient::LinearGradient(std::vector< Stop > stops,
+
4  std::pair< Vector2Df, Vector2Df > points,
+
5  std::string units)
+
6  : Gradient(stops, points, units) {}
+
7 
+
8 std::string LinearGradient::getClass() const { return "LinearGradient"; }
+
A class that represents a gradient.
Definition: Gradient.hpp:18
+
std::string getClass() const override
Gets the type of the gradient.
+
LinearGradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)
Constructs a LinearGradient object.
+
+
+ + + \ No newline at end of file diff --git a/docs/LinearGradient_8hpp_source.html b/docs/LinearGradient_8hpp_source.html new file mode 100644 index 00000000..25e89254 --- /dev/null +++ b/docs/LinearGradient_8hpp_source.html @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/graphics/LinearGradient.hpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
LinearGradient.hpp
+
+
+
1 #ifndef LINEAR_GRADIENT_HPP_
+
2 #define LINEAR_GRADIENT_HPP_
+
3 
+
4 #include "Gradient.hpp"
+
5 
+
14 class LinearGradient : public Gradient {
+
15 public:
+
23  LinearGradient(std::vector< Stop > stops,
+
24  std::pair< Vector2Df, Vector2Df > points, std::string units);
+
25 
+
32  std::string getClass() const override;
+
33 };
+
34 
+
35 #endif
+
A class that represents a gradient.
Definition: Gradient.hpp:18
+
std::string units
Units of the gradient.
Definition: Gradient.hpp:95
+
std::vector< Stop > stops
Stops of the gradient.
Definition: Gradient.hpp:92
+
std::pair< Vector2Df, Vector2Df > points
Start and end points of the gradient.
Definition: Gradient.hpp:94
+
A class that represents a linear gradient.
+
std::string getClass() const override
Gets the type of the gradient.
+
LinearGradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)
Constructs a LinearGradient object.
+
+
+ + + \ No newline at end of file diff --git a/docs/Parser_8cpp_source.html b/docs/Parser_8cpp_source.html new file mode 100644 index 00000000..b640f6f9 --- /dev/null +++ b/docs/Parser_8cpp_source.html @@ -0,0 +1,1032 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/Parser.cpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Parser.cpp
+
+
+
1 #include "Parser.hpp"
+
2 
+
3 Parser *Parser::instance = nullptr;
+
4 
+
5 namespace {
+
6  auto getHexColor = [](std::string color) -> mColor {
+
7  std::stringstream ss;
+
8  int pos = color.find("#");
+
9  if (color.size() < 5 || color[pos + 4] == ' ') {
+
10  ss << std::hex << color.substr(pos + 1, 1) << " "
+
11  << color.substr(pos + 2, 1) << " " << color.substr(pos + 3, 1);
+
12  int r, g, b;
+
13  ss >> r >> g >> b;
+
14  r = r * 16 + r;
+
15  g = g * 16 + g;
+
16  b = b * 16 + b;
+
17  return mColor(r, g, b, 255);
+
18  } else if (color.size() < 6 || color[pos + 5] == ' ') {
+
19  ss << std::hex << color.substr(pos + 1, 1) << " "
+
20  << color.substr(pos + 2, 1) << " " << color.substr(pos + 3, 1)
+
21  << color.substr(pos + 4, 1);
+
22  int r, g, b, a;
+
23  ss >> r >> g >> b >> a;
+
24  r = r * 16 + r;
+
25  g = g * 16 + g;
+
26  b = b * 16 + b;
+
27  a = a * 16 + a;
+
28  return mColor(r, g, b, a);
+
29  } else {
+
30  ss << std::hex << color.substr(pos + 1, 2) << " "
+
31  << color.substr(pos + 3, 2) << " " << color.substr(pos + 5, 2);
+
32  int r, g, b;
+
33  ss >> r >> g >> b;
+
34  if (color[pos + 7] != '\0' && color[pos + 7] != ' ') {
+
35  std::stringstream ss;
+
36  ss << std::hex << color.substr(pos + 7, 2);
+
37  int a;
+
38  ss >> a;
+
39  return mColor(r, g, b, a);
+
40  }
+
41  return mColor(r, g, b, 255);
+
42  }
+
43  };
+
44 
+
45  auto getRgbColor = [](std::string color) -> mColor {
+
46  int r, g, b;
+
47  float a = 1;
+
48  sscanf(color.c_str(), "rgb(%d,%d,%d,%f)", &r, &g, &b, &a);
+
49  return mColor(r, g, b, 255 * a);
+
50  };
+
51 
+
52  std::string removeExtraSpaces(std::string input) {
+
53  input.erase(std::remove(input.begin(), input.end(), '\t'), input.end());
+
54  input.erase(std::remove(input.begin(), input.end(), '\n'), input.end());
+
55  std::string result;
+
56  bool spaceDetected = false;
+
57  bool firstSpace = true;
+
58  for (int i = 0; i < input.size(); i++) {
+
59  if (input[i] == ' ') {
+
60  if (!spaceDetected) {
+
61  if (!firstSpace)
+
62  result.push_back(input[i]);
+
63  else
+
64  firstSpace = false;
+
65  spaceDetected = true;
+
66  }
+
67  } else {
+
68  result.push_back(input[i]);
+
69  firstSpace = false;
+
70  spaceDetected = false;
+
71  }
+
72  }
+
73 
+
74  if (!result.empty() && result.back() == ' ') {
+
75  result.pop_back();
+
76  }
+
77 
+
78  return result;
+
79  }
+
80 
+
81  void removeRedundantSpaces(std::string &path_string) {
+
82  int index = 0;
+
83  while (index < path_string.size()) {
+
84  if ((index == 0 || index == path_string.size() - 1) &&
+
85  path_string[index] == ' ') {
+
86  path_string.erase(index, 1);
+
87  } else if (path_string[index] == ' ' &&
+
88  path_string[index - 1] == ' ') {
+
89  path_string.erase(index, 1);
+
90  } else {
+
91  index++;
+
92  }
+
93  }
+
94  }
+
95 
+
96  void insertSpaceBeforeEachLetter(std::string &path_string) {
+
97  std::string result;
+
98  for (int index = 0; index < path_string.size(); index++) {
+
99  if (std::isalpha(path_string[index]) &&
+
100  tolower(path_string[index]) != 'e') {
+
101  result += " ";
+
102  result += path_string[index];
+
103  result += " ";
+
104  } else if (path_string[index] == '-' && index - 1 >= 0 &&
+
105  tolower(path_string[index - 1]) != 'e') {
+
106  result += " ";
+
107  result += path_string[index];
+
108  } else if (path_string[index] == '.') {
+
109  if (index > 0 && path_string[index - 1] == '-')
+
110  result += "0";
+
111  else if (index > 0 && isalpha(path_string[index - 1]))
+
112  result += " 0";
+
113  result += path_string[index];
+
114  } else {
+
115  result += path_string[index];
+
116  }
+
117  }
+
118  path_string = result;
+
119  }
+
120 
+
121  void formatSvgPathString(std::string &path_string) {
+
122  std::replace(path_string.begin(), path_string.end(), '\t', ' ');
+
123  std::replace(path_string.begin(), path_string.end(), '\n', ' ');
+
124  insertSpaceBeforeEachLetter(path_string);
+
125  std::replace(path_string.begin(), path_string.end(), ',', ' ');
+
126  removeRedundantSpaces(path_string);
+
127 
+
128  auto checkAbbreviation = [](const std::string &s) {
+
129  int cnt = 0;
+
130  for (auto c : s)
+
131  if (c == '.') ++cnt;
+
132  if (cnt == 2) return true;
+
133  return false;
+
134  };
+
135 
+
136  std::stringstream ss(path_string);
+
137  std::string element;
+
138  std::string result;
+
139  while (ss >> element) {
+
140  std::string point_x = "";
+
141  std::string point_y = "";
+
142  if (checkAbbreviation(element)) {
+
143  for (int i = (int)element.size() - 1; i >= 0; --i) {
+
144  if (element[i] == '.') {
+
145  point_y = "0." + element.substr(i + 1);
+
146  point_x = element.substr(0, i);
+
147  break;
+
148  }
+
149  }
+
150  result += point_x + ' ' + point_y + ' ';
+
151  } else
+
152  result += element + ' ';
+
153  }
+
154  path_string = result;
+
155  }
+
156 } // namespace
+
157 
+
158 Parser *Parser::getInstance(const std::string &file_name) {
+
159  if (instance == nullptr) {
+
160  instance = new Parser(file_name);
+
161  }
+
162  return instance;
+
163 }
+
164 
+
165 Parser::Parser(const std::string &file_name) {
+
166  root = parseElements(file_name);
+
167 }
+
168 
+
169 Group *Parser::getRoot() { return dynamic_cast< Group * >(root); }
+
170 
+
171 Attributes xmlToString(rapidxml::xml_attribute<> *attribute) {
+
172  Attributes attributes;
+
173  while (attribute) {
+
174  attributes.push_back(
+
175  std::make_pair(attribute->name(), attribute->value()));
+
176  attribute = attribute->next_attribute();
+
177  }
+
178  return attributes;
+
179 }
+
180 
+
181 SVGElement *Parser::parseElements(std::string file_name) {
+
182  rapidxml::xml_document<> doc;
+
183  std::ifstream file(file_name);
+
184  std::vector< char > buffer((std::istreambuf_iterator< char >(file)),
+
185  std::istreambuf_iterator< char >());
+
186  buffer.push_back('\0');
+
187  doc.parse< 0 >(&buffer[0]);
+
188 
+
189  rapidxml::xml_node<> *svg = doc.first_node();
+
190  viewport.x = getFloatAttribute(svg, "width");
+
191  viewport.y = getFloatAttribute(svg, "height");
+
192  std::string viewbox = getAttribute(svg, "viewBox");
+
193  if (viewbox != "") {
+
194  std::stringstream ss(viewbox);
+
195  ss >> this->viewbox.first.x >> this->viewbox.first.y >>
+
196  this->viewbox.second.x >> this->viewbox.second.y;
+
197  }
+
198  rapidxml::xml_node<> *node = svg->first_node();
+
199  rapidxml::xml_node<> *prev = NULL;
+
200 
+
201  SVGElement *root = new Group();
+
202  SVGElement *current = root;
+
203 
+
204  while (node) {
+
205  if (std::string(node->name()) == "defs") {
+
206  GetGradients(node);
+
207  prev = node;
+
208  node = node->next_sibling();
+
209  } else if (std::string(node->name()) == "g") {
+
210  Group *group = dynamic_cast< Group * >(current);
+
211  for (auto group_attribute : group->getAttributes()) {
+
212  bool found = false;
+
213  for (auto attribute = node->first_attribute(); attribute;
+
214  attribute = attribute->next_attribute()) {
+
215  if (std::string(attribute->name()) ==
+
216  group_attribute.first) {
+
217  if (group_attribute.first == "opacity") {
+
218  std::string opacity = std::to_string(
+
219  std::stof(attribute->value()) *
+
220  std::stof(group_attribute.second));
+
221  char *value = doc.allocate_string(opacity.c_str());
+
222  attribute->value(value);
+
223  }
+
224  found = true;
+
225  break;
+
226  }
+
227  }
+
228  if (!found && group_attribute.first != "transform") {
+
229  char *name =
+
230  doc.allocate_string(group_attribute.first.c_str());
+
231  char *value =
+
232  doc.allocate_string(group_attribute.second.c_str());
+
233  rapidxml::xml_attribute<> *new_attribute =
+
234  doc.allocate_attribute(name, value);
+
235  node->append_attribute(new_attribute);
+
236  }
+
237  }
+
238  Group *new_group = new Group(xmlToString(node->first_attribute()));
+
239  new_group->setTransforms(getTransformOrder(node));
+
240  current->addElement(new_group);
+
241  current = new_group;
+
242  prev = node;
+
243  node = node->first_node();
+
244  } else {
+
245  Group *group = dynamic_cast< Group * >(current);
+
246  for (auto group_attribute : group->getAttributes()) {
+
247  bool found = false;
+
248  for (auto attribute = node->first_attribute(); attribute;
+
249  attribute = attribute->next_attribute()) {
+
250  if (std::string(attribute->name()) ==
+
251  group_attribute.first) {
+
252  if (group_attribute.first == "opacity") {
+
253  std::string opacity = std::to_string(
+
254  std::stof(attribute->value()) *
+
255  std::stof(group_attribute.second));
+
256  char *value = doc.allocate_string(opacity.c_str());
+
257  attribute->value(value);
+
258  }
+
259  found = true;
+
260  break;
+
261  }
+
262  }
+
263  if (!found && group_attribute.first != "transform") {
+
264  char *name =
+
265  doc.allocate_string(group_attribute.first.c_str());
+
266  char *value =
+
267  doc.allocate_string(group_attribute.second.c_str());
+
268  rapidxml::xml_attribute<> *new_attribute =
+
269  doc.allocate_attribute(name, value);
+
270  node->append_attribute(new_attribute);
+
271  }
+
272  }
+
273  SVGElement *shape = parseShape(node);
+
274  if (shape != NULL) current->addElement(shape);
+
275  prev = node;
+
276  node = node->next_sibling();
+
277  }
+
278  if (node == NULL && current != root) {
+
279  while (prev->parent()->next_sibling() == NULL) {
+
280  current = current->getParent();
+
281  prev = prev->parent();
+
282  if (prev == svg) {
+
283  break;
+
284  }
+
285  }
+
286  if (prev == svg) {
+
287  break;
+
288  }
+
289  current = current->getParent();
+
290  node = prev->parent()->next_sibling();
+
291  }
+
292  }
+
293  return root;
+
294 }
+
295 
+
296 std::string Parser::getAttribute(rapidxml::xml_node<> *node, std::string name) {
+
297  if (name == "text") return removeExtraSpaces(node->value());
+
298  std::string result;
+
299  if (node->first_attribute(name.c_str()) == NULL) {
+
300  if (name == "fill" || name == "stop-color")
+
301  result = "black";
+
302  else if (name == "stroke" || name == "transform" || name == "rotate" ||
+
303  name == "font-style")
+
304  result = "none";
+
305  else if (name == "text-anchor")
+
306  result = "start";
+
307  else if (name == "fill-rule")
+
308  result = "nonzero";
+
309  else if (name == "gradientUnits")
+
310  result = "objectBoundingBox";
+
311  } else {
+
312  result = node->first_attribute(name.c_str())->value();
+
313  }
+
314  return result;
+
315 }
+
316 
+
317 float Parser::getFloatAttribute(rapidxml::xml_node<> *node, std::string name) {
+
318  float result;
+
319  if (node->first_attribute(name.c_str()) == NULL) {
+
320  if (std::string(node->name()).find("Gradient") != std::string::npos) {
+
321  if (name == "x1" || name == "y1" || name == "fr")
+
322  result = 0;
+
323  else if (name == "cx" || name == "cy")
+
324  result = name == "cx" ? 0.5 * this->viewbox.second.x
+
325  : 0.5 * this->viewbox.second.y;
+
326  else if (name == "r") {
+
327  result = sqrt((pow(this->viewbox.second.x, 2) +
+
328  pow(this->viewbox.second.y, 2)) /
+
329  2) /
+
330  2;
+
331  } else if (name == "fx" || name == "fy")
+
332  result = name == "fx" ? getFloatAttribute(node, "cx")
+
333  : getFloatAttribute(node, "cy");
+
334  else
+
335  result = name == "x2" ? this->viewbox.second.x
+
336  : this->viewbox.second.y;
+
337  } else {
+
338  if (name == "stroke-width" || name == "stroke-opacity" ||
+
339  name == "fill-opacity" || name == "opacity" ||
+
340  name == "stop-opacity")
+
341  result = 1;
+
342  else
+
343  result = 0;
+
344  }
+
345  } else {
+
346  if (name == "width" || name == "height") {
+
347  std::string value = node->first_attribute(name.c_str())->value();
+
348  if (value.find("%") != std::string::npos) {
+
349  result = std::stof(value.substr(0, value.find("%"))) *
+
350  this->viewbox.second.x / 100;
+
351  } else if (value.find("pt") != std::string::npos) {
+
352  result = std::stof(value.substr(0, value.find("pt"))) * 1.33;
+
353  } else {
+
354  result = std::stof(value);
+
355  }
+
356  } else
+
357  result = std::stof(node->first_attribute(name.c_str())->value());
+
358  }
+
359  return result;
+
360 }
+
361 
+
362 mColor Parser::parseColor(rapidxml::xml_node<> *node, std::string name,
+
363  std::string &id) {
+
364  std::string color = getAttribute(node, name);
+
365  color.erase(std::remove(color.begin(), color.end(), ' '), color.end());
+
366  if (color.find("url") == std::string::npos) {
+
367  for (auto &c : color) c = tolower(c);
+
368  }
+
369  if (color == "none")
+
370  return mColor::Transparent;
+
371  else {
+
372  mColor result;
+
373  if (color.find("url") != std::string::npos) {
+
374  if (color.find("'") != std::string::npos) {
+
375  id = color.substr(color.find("'") + 1);
+
376  id.erase(id.find("'"));
+
377  id.erase(id.find("#"), 1);
+
378  } else {
+
379  id = color.substr(color.find("#") + 1);
+
380  id.erase(id.find(")"));
+
381  }
+
382  result = mColor::Transparent;
+
383  } else if (color.find("#") != std::string::npos) {
+
384  result = getHexColor(color);
+
385  } else if (color.find("rgb") != std::string::npos) {
+
386  result = getRgbColor(color);
+
387  } else {
+
388  auto color_code = color_map.find(color);
+
389  if (color_code == color_map.end()) {
+
390  std::cout << "Color " << color << " not found" << std::endl;
+
391  exit(-1);
+
392  }
+
393  result = color_code->second;
+
394  }
+
395  if (name == "stop-color")
+
396  result.a = result.a * getFloatAttribute(node, "stop-opacity");
+
397  else
+
398  result.a = result.a * getFloatAttribute(node, name + "-opacity") *
+
399  getFloatAttribute(node, "opacity");
+
400  return result;
+
401  }
+
402 }
+
403 
+
404 Gradient *Parser::parseGradient(std::string id) {
+
405  if (gradients.find(id) == gradients.end()) {
+
406  std::cout << "Gradient " << id << " not found" << std::endl;
+
407  exit(-1);
+
408  }
+
409  return gradients.at(id);
+
410 }
+
411 
+
412 std::vector< Stop > Parser::getGradientStops(rapidxml::xml_node<> *node) {
+
413  std::vector< Stop > stops;
+
414  rapidxml::xml_node<> *stop_node = node->first_node();
+
415  while (stop_node) {
+
416  if (std::string(stop_node->name()) == "stop") {
+
417  std::string id = "";
+
418  mColor color = parseColor(stop_node, "stop-color", id);
+
419  float offset = getFloatAttribute(stop_node, "offset");
+
420  if (offset > 1) offset /= 100;
+
421  stops.push_back(Stop(color, offset));
+
422  }
+
423  stop_node = stop_node->next_sibling();
+
424  }
+
425  return stops;
+
426 }
+
427 
+
428 void Parser::GetGradients(rapidxml::xml_node<> *node) {
+
429  rapidxml::xml_node<> *gradient_node = node->first_node();
+
430  while (gradient_node) {
+
431  if (std::string(gradient_node->name()).find("Gradient") !=
+
432  std::string::npos) {
+
433  Gradient *gradient;
+
434  std::string id = getAttribute(gradient_node, "id");
+
435  std::string units = getAttribute(gradient_node, "gradientUnits");
+
436  std::vector< Stop > stops = getGradientStops(gradient_node);
+
437  std::string href = getAttribute(gradient_node, "xlink:href");
+
438  int pos = href.find("#");
+
439  if (pos != std::string::npos) {
+
440  href = href.substr(pos + 1);
+
441  }
+
442  if (std::string(gradient_node->name()).find("linear") !=
+
443  std::string::npos) {
+
444  float x1 = getFloatAttribute(gradient_node, "x1");
+
445  float y1 = getFloatAttribute(gradient_node, "y1");
+
446  float x2 = getFloatAttribute(gradient_node, "x2");
+
447  float y2 = getFloatAttribute(gradient_node, "y2");
+
448  std::pair< Vector2Df, Vector2Df > points = {{x1, y1}, {x2, y2}};
+
449  gradient = new LinearGradient(stops, points, units);
+
450  if (this->gradients.find(id) == this->gradients.end())
+
451  this->gradients[id] = gradient;
+
452  } else if (std::string(gradient_node->name()).find("radial") !=
+
453  std::string::npos) {
+
454  float cx = getFloatAttribute(gradient_node, "cx");
+
455  float cy = getFloatAttribute(gradient_node, "cy");
+
456  float fx = getFloatAttribute(gradient_node, "fx");
+
457  float fy = getFloatAttribute(gradient_node, "fy");
+
458  float r = getFloatAttribute(gradient_node, "r");
+
459  float fr = getFloatAttribute(gradient_node, "fr");
+
460  std::pair< Vector2Df, Vector2Df > points = {{cx, cy}, {fx, fy}};
+
461  Vector2Df radius(r, fr);
+
462  gradient = new RadialGradient(stops, points, radius, units);
+
463  if (this->gradients.find(id) == this->gradients.end())
+
464  this->gradients[id] = gradient;
+
465  }
+
466  if (href != "") {
+
467  for (auto stop : parseGradient(href)->getStops()) {
+
468  gradient->addStop(stop);
+
469  }
+
470  }
+
471  if (gradient != NULL)
+
472  gradient->setTransforms(getTransformOrder(gradient_node));
+
473  }
+
474  gradient_node = gradient_node->next_sibling();
+
475  }
+
476 }
+
477 
+
478 std::vector< Vector2Df > Parser::parsePoints(rapidxml::xml_node<> *node) {
+
479  std::vector< Vector2Df > points;
+
480  std::string points_string = getAttribute(node, "points");
+
481 
+
482  std::stringstream ss(points_string);
+
483  float x, y;
+
484 
+
485  while (ss >> x) {
+
486  if (ss.peek() == ',') ss.ignore();
+
487  ss >> y;
+
488  points.push_back(Vector2Df(x, y));
+
489  }
+
490 
+
491  return points;
+
492 }
+
493 
+
494 std::vector< PathPoint > Parser::parsePathPoints(rapidxml::xml_node<> *node) {
+
495  std::vector< PathPoint > points;
+
496  std::string path_string = getAttribute(node, "d");
+
497 
+
498  formatSvgPathString(path_string);
+
499 
+
500  std::stringstream ss(path_string);
+
501  std::string element;
+
502  PathPoint pPoint{{0, 0}, 'M'};
+
503  while (ss >> element) {
+
504  if (std::isalpha(element[0])) {
+
505  pPoint.tc = element[0];
+
506  if (tolower(pPoint.tc) == 'm' || tolower(pPoint.tc) == 'l' ||
+
507  tolower(pPoint.tc) == 'c' || tolower(pPoint.tc) == 's' ||
+
508  tolower(pPoint.tc) == 'q' || tolower(pPoint.tc) == 't')
+
509  ss >> pPoint.point.x >> pPoint.point.y;
+
510  else if (tolower(pPoint.tc) == 'h') {
+
511  ss >> pPoint.point.x;
+
512  pPoint.point.y = 0;
+
513  } else if (tolower(pPoint.tc) == 'v') {
+
514  ss >> pPoint.point.y;
+
515  pPoint.point.x = 0;
+
516  } else if (tolower(pPoint.tc) == 'a') {
+
517  ss >> pPoint.radius.x >> pPoint.radius.y;
+
518  ss >> pPoint.x_axis_rotation;
+
519  ss >> pPoint.large_arc_flag >> pPoint.sweep_flag;
+
520  ss >> pPoint.point.x >> pPoint.point.y;
+
521  }
+
522  } else {
+
523  if (tolower(pPoint.tc) == 'm' || tolower(pPoint.tc) == 'l' ||
+
524  tolower(pPoint.tc) == 'c' || tolower(pPoint.tc) == 's' ||
+
525  tolower(pPoint.tc) == 'q' || tolower(pPoint.tc) == 't') {
+
526  if (tolower(pPoint.tc) == 'm') pPoint.tc = 'L';
+
527  pPoint.point.x = std::stof(element);
+
528  ss >> pPoint.point.y;
+
529  } else if (tolower(pPoint.tc) == 'h') {
+
530  pPoint.point.x = std::stof(element);
+
531  pPoint.point.y = 0;
+
532  } else if (tolower(pPoint.tc) == 'v') {
+
533  pPoint.point.y = std::stof(element);
+
534  pPoint.point.x = 0;
+
535  } else if (tolower(pPoint.tc) == 'a') {
+
536  pPoint.radius.x = std::stof(element);
+
537  ss >> pPoint.radius.y;
+
538  ss >> pPoint.x_axis_rotation;
+
539  ss >> pPoint.large_arc_flag >> pPoint.sweep_flag;
+
540  ss >> pPoint.point.x >> pPoint.point.y;
+
541  }
+
542  }
+
543  points.push_back(pPoint);
+
544  }
+
545 
+
546  std::vector< PathPoint > handle_points;
+
547 
+
548  Vector2Df first_point{0, 0}, cur_point{0, 0};
+
549  int n = points.size();
+
550  for (int i = 0; i < n; i++) {
+
551  if (tolower(points[i].tc) == 'm') {
+
552  first_point = points[i].point;
+
553  if (points[i].tc == 'm') {
+
554  first_point.x = cur_point.x + points[i].point.x;
+
555  first_point.y = cur_point.y + points[i].point.y;
+
556  }
+
557  cur_point = first_point;
+
558  handle_points.push_back({first_point, 'm'});
+
559  } else if (tolower(points[i].tc) == 'l' ||
+
560  tolower(points[i].tc) == 't') {
+
561  Vector2Df end_point{cur_point.x + points[i].point.x,
+
562  cur_point.y + points[i].point.y};
+
563  if (points[i].tc == 'L' || points[i].tc == 'T')
+
564  end_point = points[i].point;
+
565  cur_point = end_point;
+
566  char TC = tolower(points[i].tc);
+
567  handle_points.push_back({end_point, TC});
+
568  } else if (tolower(points[i].tc) == 'h') {
+
569  Vector2Df end_point{cur_point.x + points[i].point.x, cur_point.y};
+
570  if (points[i].tc == 'H')
+
571  end_point = Vector2Df{points[i].point.x, cur_point.y};
+
572  cur_point = end_point;
+
573  handle_points.push_back({end_point, 'h'});
+
574  } else if (tolower(points[i].tc) == 'v') {
+
575  Vector2Df end_point{cur_point.x, cur_point.y + points[i].point.y};
+
576  if (points[i].tc == 'V')
+
577  end_point = Vector2Df{cur_point.x, points[i].point.y};
+
578  cur_point = end_point;
+
579  handle_points.push_back({end_point, 'v'});
+
580  } else if (tolower(points[i].tc) == 'c') {
+
581  if (i + 2 < n) {
+
582  Vector2Df control_point1 =
+
583  Vector2Df{cur_point.x + points[i].point.x,
+
584  cur_point.y + points[i].point.y};
+
585  Vector2Df control_point2 =
+
586  Vector2Df{cur_point.x + points[i + 1].point.x,
+
587  cur_point.y + points[i + 1].point.y};
+
588  Vector2Df control_point3 =
+
589  Vector2Df{cur_point.x + points[i + 2].point.x,
+
590  cur_point.y + points[i + 2].point.y};
+
591  if (points[i].tc == 'C') {
+
592  control_point1 = points[i].point;
+
593  control_point2 = points[i + 1].point;
+
594  control_point3 = points[i + 2].point;
+
595  }
+
596  i += 2;
+
597  cur_point = control_point3;
+
598  handle_points.push_back({control_point1, 'c'});
+
599  handle_points.push_back({control_point2, 'c'});
+
600  handle_points.push_back({control_point3, 'c'});
+
601  }
+
602  } else if (tolower(points[i].tc) == 'z') {
+
603  cur_point = first_point;
+
604  handle_points.push_back({first_point, 'z'});
+
605  } else if (tolower(points[i].tc) == 's' ||
+
606  tolower(points[i].tc) == 'q') {
+
607  if (i + 1 < n) {
+
608  Vector2Df control_point1 =
+
609  Vector2Df{cur_point.x + points[i].point.x,
+
610  cur_point.y + points[i].point.y};
+
611  Vector2Df control_point2 =
+
612  Vector2Df{cur_point.x + points[i + 1].point.x,
+
613  cur_point.y + points[i + 1].point.y};
+
614  if (points[i].tc == 'S' || points[i].tc == 'Q') {
+
615  control_point1 = points[i].point;
+
616  control_point2 = points[i + 1].point;
+
617  }
+
618  i += 1;
+
619  cur_point = control_point2;
+
620  char TC = tolower(points[i].tc);
+
621  handle_points.push_back({control_point1, TC});
+
622  handle_points.push_back({control_point2, TC});
+
623  }
+
624  } else if (tolower(points[i].tc) == 'a') {
+
625  Vector2Df end_point{cur_point.x + points[i].point.x,
+
626  cur_point.y + points[i].point.y};
+
627  if (points[i].tc == 'A') end_point = points[i].point;
+
628  handle_points.push_back(
+
629  {end_point, 'a', points[i].radius, points[i].x_axis_rotation,
+
630  points[i].large_arc_flag, points[i].sweep_flag});
+
631  cur_point = end_point;
+
632  }
+
633  }
+
634  return handle_points;
+
635 }
+
636 
+
637 std::vector< std::string > Parser::getTransformOrder(
+
638  rapidxml::xml_node<> *node) {
+
639  std::string transform_tag;
+
640  if (std::string(node->name()).find("Gradient") != std::string::npos)
+
641  transform_tag = getAttribute(node, "gradientTransform");
+
642  else
+
643  transform_tag = getAttribute(node, "transform");
+
644  std::vector< std::string > order;
+
645  std::stringstream ss(transform_tag);
+
646  std::string type;
+
647  while (ss >> type) {
+
648  if (type.find("translate") != std::string::npos ||
+
649  type.find("scale") != std::string::npos ||
+
650  type.find("rotate") != std::string::npos ||
+
651  type.find("matrix") != std::string::npos) {
+
652  while (type.find(")") == std::string::npos) {
+
653  std::string temp;
+
654  ss >> temp;
+
655  type += " " + temp;
+
656  }
+
657  std::string temp = type.substr(0, type.find("(") + 1);
+
658  temp.erase(std::remove(temp.begin(), temp.end(), ' '), temp.end());
+
659  type.erase(0, type.find("(") + 1);
+
660  type = temp + type;
+
661  order.push_back(type);
+
662  }
+
663  }
+
664  return order;
+
665 }
+
666 
+
667 SVGElement *Parser::parseShape(rapidxml::xml_node<> *node) {
+
668  SVGElement *shape = NULL;
+
669  std::string type = node->name();
+
670  std::string id = "";
+
671  mColor stroke_color = parseColor(node, "stroke", id);
+
672  mColor fill_color = parseColor(node, "fill", id);
+
673  float stroke_width = getFloatAttribute(node, "stroke-width");
+
674  if (type == "line") {
+
675  shape = parseLine(node, stroke_color, stroke_width);
+
676  } else if (type == "rect") {
+
677  shape = parseRect(node, fill_color, stroke_color, stroke_width);
+
678  } else if (type == "circle") {
+
679  shape = parseCircle(node, fill_color, stroke_color, stroke_width);
+
680  } else if (type == "ellipse") {
+
681  shape = parseEllipse(node, fill_color, stroke_color, stroke_width);
+
682  } else if (type == "polygon") {
+
683  shape = parsePolygon(node, fill_color, stroke_color, stroke_width);
+
684  } else if (type == "polyline") {
+
685  shape = parsePolyline(node, fill_color, stroke_color, stroke_width);
+
686  } else if (type == "path") {
+
687  shape = parsePath(node, fill_color, stroke_color, stroke_width);
+
688  } else if (type == "text") {
+
689  shape = parseText(node, fill_color, stroke_color, stroke_width);
+
690  }
+
691  if (shape != NULL) {
+
692  if (type == "text") {
+
693  float dx = getFloatAttribute(node, "dx");
+
694  float dy = getFloatAttribute(node, "dy");
+
695  std::string transform = "translate(" + std::to_string(dx) + " " +
+
696  std::to_string(dy) + ")";
+
697  std::vector< std::string > transform_order =
+
698  getTransformOrder(node);
+
699  transform_order.push_back(transform);
+
700  shape->setTransforms(transform_order);
+
701  } else
+
702  shape->setTransforms(getTransformOrder(node));
+
703  if (id != "") {
+
704  shape->setGradient(parseGradient(id));
+
705  }
+
706  }
+
707  return shape;
+
708 }
+
709 
+
710 Line *Parser::parseLine(rapidxml::xml_node<> *node, const mColor &stroke_color,
+
711  float stroke_width) {
+
712  Line *shape = new Line(
+
713  Vector2Df(getFloatAttribute(node, "x1"), getFloatAttribute(node, "y1")),
+
714  Vector2Df(getFloatAttribute(node, "x2"), getFloatAttribute(node, "y2")),
+
715  stroke_color, stroke_width);
+
716  return shape;
+
717 }
+
718 
+
719 Rect *Parser::parseRect(rapidxml::xml_node<> *node, const mColor &fill_color,
+
720  const mColor &stroke_color, float stroke_width) {
+
721  float x = getFloatAttribute(node, "x");
+
722  float y = getFloatAttribute(node, "y");
+
723  float rx = getFloatAttribute(node, "rx");
+
724  float ry = getFloatAttribute(node, "ry");
+
725  Rect *shape =
+
726  new Rect(getFloatAttribute(node, "width"),
+
727  getFloatAttribute(node, "height"), Vector2Df(x, y),
+
728  Vector2Df(rx, ry), fill_color, stroke_color, stroke_width);
+
729  return shape;
+
730 }
+
731 
+
732 Circle *Parser::parseCircle(rapidxml::xml_node<> *node,
+
733  const mColor &fill_color,
+
734  const mColor &stroke_color, float stroke_width) {
+
735  float cx = getFloatAttribute(node, "cx");
+
736  float cy = getFloatAttribute(node, "cy");
+
737  float radius = getFloatAttribute(node, "r");
+
738  Circle *shape = new Circle(radius, Vector2Df(cx, cy), fill_color,
+
739  stroke_color, stroke_width);
+
740  return shape;
+
741 }
+
742 
+
743 Ell *Parser::parseEllipse(rapidxml::xml_node<> *node, const mColor &fill_color,
+
744  const mColor &stroke_color, float stroke_width) {
+
745  float radius_x = getFloatAttribute(node, "rx");
+
746  float radius_y = getFloatAttribute(node, "ry");
+
747  float cx = getFloatAttribute(node, "cx");
+
748  float cy = getFloatAttribute(node, "cy");
+
749  Ell *shape = new Ell(Vector2Df(radius_x, radius_y), Vector2Df(cx, cy),
+
750  fill_color, stroke_color, stroke_width);
+
751  return shape;
+
752 }
+
753 
+
754 Plygon *Parser::parsePolygon(rapidxml::xml_node<> *node,
+
755  const mColor &fill_color,
+
756  const mColor &stroke_color, float stroke_width) {
+
757  Plygon *shape = new Plygon(fill_color, stroke_color, stroke_width);
+
758  std::vector< Vector2Df > points = parsePoints(node);
+
759  for (auto point : points) {
+
760  shape->addPoint(point);
+
761  }
+
762  std::string fill_rule = getAttribute(node, "fill-rule");
+
763  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
+
764  fill_rule.end());
+
765  shape->setFillRule(fill_rule);
+
766  return shape;
+
767 }
+
768 
+
769 Plyline *Parser::parsePolyline(rapidxml::xml_node<> *node,
+
770  const mColor &fill_color,
+
771  const mColor &stroke_color, float stroke_width) {
+
772  Plyline *shape = new Plyline(fill_color, stroke_color, stroke_width);
+
773  std::vector< Vector2Df > points = parsePoints(node);
+
774  for (auto point : points) {
+
775  shape->addPoint(point);
+
776  }
+
777  std::string fill_rule = getAttribute(node, "fill-rule");
+
778  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
+
779  fill_rule.end());
+
780  shape->setFillRule(fill_rule);
+
781  return shape;
+
782 }
+
783 
+
784 Text *Parser::parseText(rapidxml::xml_node<> *node, const mColor &fill_color,
+
785  const mColor &stroke_color, float stroke_width) {
+
786  float x = getFloatAttribute(node, "x");
+
787  float y = getFloatAttribute(node, "y");
+
788  float font_size = getFloatAttribute(node, "font-size");
+
789  std::string text = getAttribute(node, "text");
+
790 
+
791  Text *shape =
+
792  new Text(Vector2Df(x - (font_size * 6.6 / 40),
+
793  y - font_size + (font_size * 4.4 / 40)),
+
794  text, font_size, fill_color, stroke_color, stroke_width);
+
795 
+
796  std::string anchor = getAttribute(node, "text-anchor");
+
797  anchor.erase(std::remove(anchor.begin(), anchor.end(), ' '), anchor.end());
+
798  shape->setAnchor(anchor);
+
799 
+
800  std::string style = getAttribute(node, "font-style");
+
801  style.erase(std::remove(style.begin(), style.end(), ' '), style.end());
+
802  shape->setFontStyle(style);
+
803 
+
804  return shape;
+
805 }
+
806 
+
807 Path *Parser::parsePath(rapidxml::xml_node<> *node, const mColor &fill_color,
+
808  const mColor &stroke_color, float stroke_width) {
+
809  Path *shape = new Path(fill_color, stroke_color, stroke_width);
+
810  std::vector< PathPoint > points = parsePathPoints(node);
+
811  for (auto point : points) {
+
812  shape->addPoint(point);
+
813  }
+
814  std::string fill_rule = getAttribute(node, "fill-rule");
+
815  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
+
816  fill_rule.end());
+
817  shape->setFillRule(fill_rule);
+
818  return shape;
+
819 }
+
820 
+ +
822  delete root;
+
823  for (auto gradient : gradients) {
+
824  delete gradient.second;
+
825  }
+
826 }
+
827 
+ +
829 
+
830 std::pair< Vector2Df, Vector2Df > Parser::getViewBox() const { return viewbox; }
+
831 
+ +
Represents a circle in 2D space.
Definition: Circle.hpp:13
+
Represents an ellipse in 2D space.
Definition: Ellipse.hpp:12
+
A class that represents a gradient.
Definition: Gradient.hpp:18
+
void addStop(Stop stop)
Adds a stop to the gradient.
Definition: Gradient.cpp:23
+
void setTransforms(std::vector< std::string > transforms)
Gets the transforms of the gradient.
Definition: Gradient.cpp:15
+
A composite class that contains a vector of shape pointers (polymorphic).
Definition: Group.hpp:19
+
Attributes getAttributes() const
Gets the attributes of the shape.
Definition: Group.cpp:15
+
Represents a line in 2D space.
Definition: Line.hpp:12
+
A class that represents a linear gradient.
+
To manipulate and parse an SVG file.
Definition: Parser.hpp:24
+
Vector2Df getViewPort() const
Gets the viewport of the SVG file.
Definition: Parser.cpp:832
+
class Plyline * parsePolyline(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the polyline element.
Definition: Parser.cpp:769
+
static Parser * getInstance(const std::string &file_name)
Gets the singleton instance of the Parser class.
Definition: Parser.cpp:158
+
class Ell * parseEllipse(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the ellipse element.
Definition: Parser.cpp:743
+
SVGElement * root
The root of the SVG file.
Definition: Parser.hpp:276
+
mColor parseColor(rapidxml::xml_node<> *node, std::string color, std::string &id)
Gets the color attributes of a node.
Definition: Parser.cpp:362
+
Rect * parseRect(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the rect element.
Definition: Parser.cpp:719
+
Vector2Df viewport
The viewport of the SVG file.
Definition: Parser.hpp:281
+
void printShapesData()
Prints the data of the shapes.
Definition: Parser.cpp:828
+
~Parser()
Destructor for the Parser class.
Definition: Parser.cpp:821
+
Parser(const Parser &)=delete
Deleted copy constructor to enforce the singleton pattern.
+
std::pair< Vector2Df, Vector2Df > getViewBox() const
Gets the viewbox of the SVG file.
Definition: Parser.cpp:830
+
Text * parseText(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the text element.
Definition: Parser.cpp:784
+
Group * getRoot()
Gets the root of the tree of SVGElements.
Definition: Parser.cpp:169
+
std::string getAttribute(rapidxml::xml_node<> *node, std::string name)
Gets the attributes of a node.
Definition: Parser.cpp:296
+
Path * parsePath(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the path element.
Definition: Parser.cpp:807
+
class Plygon * parsePolygon(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the polygon element.
Definition: Parser.cpp:754
+
std::pair< Vector2Df, Vector2Df > viewbox
The viewbox of the SVG file.
Definition: Parser.hpp:280
+
std::map< std::string, Gradient * > gradients
Definition: Parser.hpp:277
+
Line * parseLine(rapidxml::xml_node<> *node, const mColor &stroke_color, float stroke_width)
Parses the line element.
Definition: Parser.cpp:710
+
std::vector< std::string > getTransformOrder(rapidxml::xml_node<> *node)
Gets the transform order of the element.
Definition: Parser.cpp:637
+
SVGElement * parseElements(std::string file_name)
Parses the SVG file and creates a tree of SVGElements.
Definition: Parser.cpp:181
+
float getFloatAttribute(rapidxml::xml_node<> *node, std::string name)
Gets the floating point attributes of a node.
Definition: Parser.cpp:317
+
Circle * parseCircle(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the circle element.
Definition: Parser.cpp:732
+
SVGElement * parseShape(rapidxml::xml_node<> *node)
Parses the group of elements.
Definition: Parser.cpp:667
+
void GetGradients(rapidxml::xml_node<> *node)
Gets the gradients of a node.
Definition: Parser.cpp:428
+
Gradient * parseGradient(std::string id)
Gets the gradient of a node.
Definition: Parser.cpp:404
+
std::vector< Stop > getGradientStops(rapidxml::xml_node<> *node)
Gets the gradient stops of a node.
Definition: Parser.cpp:412
+
static Parser * instance
The instance of the Parser.
Definition: Parser.hpp:275
+
std::vector< PathPoint > parsePathPoints(rapidxml::xml_node<> *node)
Gets the points of the path element.
Definition: Parser.cpp:494
+
std::vector< Vector2Df > parsePoints(rapidxml::xml_node<> *node)
Gets the points of the element.
Definition: Parser.cpp:478
+
Represents a path element in 2D space.
Definition: Path.hpp:28
+
void setFillRule(std::string fill_rule)
Sets the fill rule of the path.
Definition: Path.cpp:12
+
void addPoint(PathPoint point)
Adds a point to the path.
Definition: Path.cpp:8
+
Represents a polygon in 2D space.
Definition: Polygon.hpp:12
+
Represents a polyline in 2D space.
Definition: Polyline.hpp:12
+
void setFillRule(std::string fill_rule)
Sets the fill rule of the polyshape.
Definition: PolyShape.cpp:11
+
virtual void addPoint(const Vector2Df &point)
Adds a vertex to the shape.
Definition: PolyShape.cpp:7
+
A class that represents a radial gradient.
+
Represents a rectangle in 2D space.
Definition: Rect.hpp:13
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
void setTransforms(const std::vector< std::string > &transforms)
Sets the transformations of the shape.
Definition: SVGElement.cpp:67
+
SVGElement * getParent() const
Parent pointer getter.
Definition: SVGElement.cpp:77
+
void setGradient(Gradient *gradient)
Sets the gradient of the shape.
Definition: SVGElement.cpp:79
+
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:47
+
SVGElement * parent
Pointer to the group that contains the shape.
Definition: SVGElement.hpp:219
+
virtual void addElement(SVGElement *element)
Adds a shape to the composite group.
Definition: SVGElement.cpp:83
+
A class that represents a stop.
Definition: Stop.hpp:11
+
Represents text in 2D space.
Definition: Text.hpp:12
+
void setFontStyle(std::string style)
Sets the style of the text.
Definition: Text.cpp:22
+
void setAnchor(std::string anchor)
Sets the anchor of the text.
Definition: Text.cpp:18
+ +
T x
X coordinate of the vector.
Definition: Vector2D.hpp:45
+
T y
Y coordinate of the vector.
Definition: Vector2D.hpp:46
+
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
+
int a
Alpha (opacity) component.
Definition: Color.hpp:63
+
static const mColor Transparent
Transparent (black) predefined color.
Definition: Color.hpp:58
+
A struct that contains a point and a type of point.
Definition: Path.hpp:10
+
+
+ + + \ No newline at end of file diff --git a/docs/Parser_8hpp_source.html b/docs/Parser_8hpp_source.html new file mode 100644 index 00000000..972f8c84 --- /dev/null +++ b/docs/Parser_8hpp_source.html @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/Parser.hpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Parser.hpp
+
+
+
1 #ifndef PARSER_HPP_
+
2 #define PARSER_HPP_
+
3 
+
4 #include <algorithm>
+
5 #include <cmath>
+
6 #include <cstring>
+
7 #include <fstream>
+
8 #include <iostream>
+
9 #include <sstream>
+
10 #include <string>
+
11 #include <vector>
+
12 
+
13 #include "../external/rapidxml/rapidxml.hpp"
+
14 #include "Graphics.hpp"
+
15 
+
16 typedef std::vector< std::pair< std::string, std::string > > Attributes;
+
17 
+
24 class Parser {
+
25 public:
+
33  static Parser* getInstance(const std::string& file_name);
+
34 
+
38  Parser(const Parser&) = delete;
+
39 
+
43  ~Parser();
+
44 
+
50  Group* getRoot();
+
51 
+
57  void printShapesData();
+
58 
+
64  std::pair< Vector2Df, Vector2Df > getViewBox() const;
+
65 
+
71  Vector2Df getViewPort() const;
+
72 
+
73 private:
+
79  Parser(const std::string& file_name);
+
80 
+
88  SVGElement* parseElements(std::string file_name);
+
89 
+
98  std::string getAttribute(rapidxml::xml_node<>* node, std::string name);
+
99 
+
108  float getFloatAttribute(rapidxml::xml_node<>* node, std::string name);
+
109 
+
116  std::vector< Stop > getGradientStops(rapidxml::xml_node<>* node);
+
117 
+
123  void GetGradients(rapidxml::xml_node<>* node);
+
124 
+
131  Gradient* parseGradient(std::string id);
+
132 
+
141  mColor parseColor(rapidxml::xml_node<>* node, std::string color,
+
142  std::string& id);
+
143 
+
150  std::vector< Vector2Df > parsePoints(rapidxml::xml_node<>* node);
+
151 
+
158  std::vector< PathPoint > parsePathPoints(rapidxml::xml_node<>* node);
+
159 
+
166  std::vector< std::string > getTransformOrder(rapidxml::xml_node<>* node);
+
167 
+
176  Line* parseLine(rapidxml::xml_node<>* node, const mColor& stroke_color,
+
177  float stroke_width);
+
178 
+
188  Rect* parseRect(rapidxml::xml_node<>* node, const mColor& fill_color,
+
189  const mColor& stroke_color, float stroke_width);
+
190 
+
200  class Plyline* parsePolyline(rapidxml::xml_node<>* node,
+
201  const mColor& fill_color,
+
202  const mColor& stroke_color,
+
203  float stroke_width);
+
204 
+
214  class Plygon* parsePolygon(rapidxml::xml_node<>* node,
+
215  const mColor& fill_color,
+
216  const mColor& stroke_color, float stroke_width);
+
217 
+
227  Circle* parseCircle(rapidxml::xml_node<>* node, const mColor& fill_color,
+
228  const mColor& stroke_color, float stroke_width);
+
229 
+
239  class Ell* parseEllipse(rapidxml::xml_node<>* node,
+
240  const mColor& fill_color,
+
241  const mColor& stroke_color, float stroke_width);
+
242 
+
252  Path* parsePath(rapidxml::xml_node<>* node, const mColor& fill_color,
+
253  const mColor& stroke_color, float stroke_width);
+
254 
+
263  Text* parseText(rapidxml::xml_node<>* node, const mColor& fill_color,
+
264  const mColor& stroke_color, float stroke_width);
+
265 
+
272  SVGElement* parseShape(rapidxml::xml_node<>* node);
+
273 
+
274 private:
+
275  static Parser* instance;
+ +
277  std::map< std::string, Gradient* > gradients;
+
279  std::pair< Vector2Df, Vector2Df >
+ + +
282 };
+
283 
+
284 #endif // PARSER_HPP_
+
Represents a circle in 2D space.
Definition: Circle.hpp:13
+
Represents an ellipse in 2D space.
Definition: Ellipse.hpp:12
+
A class that represents a gradient.
Definition: Gradient.hpp:18
+
A composite class that contains a vector of shape pointers (polymorphic).
Definition: Group.hpp:19
+
Represents a line in 2D space.
Definition: Line.hpp:12
+
To manipulate and parse an SVG file.
Definition: Parser.hpp:24
+
Vector2Df getViewPort() const
Gets the viewport of the SVG file.
Definition: Parser.cpp:832
+
class Plyline * parsePolyline(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the polyline element.
Definition: Parser.cpp:769
+
static Parser * getInstance(const std::string &file_name)
Gets the singleton instance of the Parser class.
Definition: Parser.cpp:158
+
class Ell * parseEllipse(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the ellipse element.
Definition: Parser.cpp:743
+
SVGElement * root
The root of the SVG file.
Definition: Parser.hpp:276
+
mColor parseColor(rapidxml::xml_node<> *node, std::string color, std::string &id)
Gets the color attributes of a node.
Definition: Parser.cpp:362
+
Rect * parseRect(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the rect element.
Definition: Parser.cpp:719
+
Vector2Df viewport
The viewport of the SVG file.
Definition: Parser.hpp:281
+
void printShapesData()
Prints the data of the shapes.
Definition: Parser.cpp:828
+
~Parser()
Destructor for the Parser class.
Definition: Parser.cpp:821
+
Parser(const Parser &)=delete
Deleted copy constructor to enforce the singleton pattern.
+
std::pair< Vector2Df, Vector2Df > getViewBox() const
Gets the viewbox of the SVG file.
Definition: Parser.cpp:830
+
Text * parseText(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the text element.
Definition: Parser.cpp:784
+
Group * getRoot()
Gets the root of the tree of SVGElements.
Definition: Parser.cpp:169
+
std::string getAttribute(rapidxml::xml_node<> *node, std::string name)
Gets the attributes of a node.
Definition: Parser.cpp:296
+
Path * parsePath(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the path element.
Definition: Parser.cpp:807
+
class Plygon * parsePolygon(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the polygon element.
Definition: Parser.cpp:754
+
std::pair< Vector2Df, Vector2Df > viewbox
The viewbox of the SVG file.
Definition: Parser.hpp:280
+
std::map< std::string, Gradient * > gradients
Definition: Parser.hpp:277
+
Line * parseLine(rapidxml::xml_node<> *node, const mColor &stroke_color, float stroke_width)
Parses the line element.
Definition: Parser.cpp:710
+
std::vector< std::string > getTransformOrder(rapidxml::xml_node<> *node)
Gets the transform order of the element.
Definition: Parser.cpp:637
+
SVGElement * parseElements(std::string file_name)
Parses the SVG file and creates a tree of SVGElements.
Definition: Parser.cpp:181
+
float getFloatAttribute(rapidxml::xml_node<> *node, std::string name)
Gets the floating point attributes of a node.
Definition: Parser.cpp:317
+
Circle * parseCircle(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the circle element.
Definition: Parser.cpp:732
+
SVGElement * parseShape(rapidxml::xml_node<> *node)
Parses the group of elements.
Definition: Parser.cpp:667
+
void GetGradients(rapidxml::xml_node<> *node)
Gets the gradients of a node.
Definition: Parser.cpp:428
+
Gradient * parseGradient(std::string id)
Gets the gradient of a node.
Definition: Parser.cpp:404
+
std::vector< Stop > getGradientStops(rapidxml::xml_node<> *node)
Gets the gradient stops of a node.
Definition: Parser.cpp:412
+
static Parser * instance
The instance of the Parser.
Definition: Parser.hpp:275
+
std::vector< PathPoint > parsePathPoints(rapidxml::xml_node<> *node)
Gets the points of the path element.
Definition: Parser.cpp:494
+
std::vector< Vector2Df > parsePoints(rapidxml::xml_node<> *node)
Gets the points of the element.
Definition: Parser.cpp:478
+
Represents a path element in 2D space.
Definition: Path.hpp:28
+
Represents a polygon in 2D space.
Definition: Polygon.hpp:12
+
Represents a polyline in 2D space.
Definition: Polyline.hpp:12
+
Represents a rectangle in 2D space.
Definition: Rect.hpp:13
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
Represents text in 2D space.
Definition: Text.hpp:12
+ +
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
+
+
+ + + \ No newline at end of file diff --git a/docs/html/Path_8cpp_source.html b/docs/Path_8cpp_source.html similarity index 71% rename from docs/html/Path_8cpp_source.html rename to docs/Path_8cpp_source.html index b10f0442..349f2242 100644 --- a/docs/html/Path_8cpp_source.html +++ b/docs/Path_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -123,46 +123,38 @@
1 #include "Path.hpp"
2 
-
3 Path::Path(const mColor& fill, const mColor& stroke, float stroke_width) {
- - - -
7 }
-
8 
-
9 std::string Path::getClass() const { return "Path"; }
-
10 
-
11 void Path::addPoint(PathPoint point) { points.push_back(point); }
-
12 
-
13 std::vector< PathPoint > Path::getPoints() const { return points; }
-
14 
-
15 void Path::setFillRule(std::string fill_rule) { this->fill_rule = fill_rule; }
-
16 
-
17 std::string Path::getFillRule() const { return fill_rule; }
-
18 
-
19 void Path::printData() const {
- -
21  std::cout << "Points: ";
-
22  for (auto point : points) {
-
23  std::cout << point.TC << " " << point.Point.x << " " << point.Point.y
-
24  << " ";
-
25  }
-
26 }
+
3 Path::Path(const mColor& fill, const mColor& stroke, float stroke_width)
+
4  : SVGElement(fill, stroke, stroke_width) {}
+
5 
+
6 std::string Path::getClass() const { return "Path"; }
+
7 
+
8 void Path::addPoint(PathPoint point) { points.push_back(point); }
+
9 
+
10 std::vector< PathPoint > Path::getPoints() const { return points; }
+
11 
+
12 void Path::setFillRule(std::string fill_rule) { this->fill_rule = fill_rule; }
+
13 
+
14 std::string Path::getFillRule() const { return fill_rule; }
+
15 
+
16 void Path::printData() const {
+ +
18  std::cout << "Points: ";
+
19  for (auto point : points) {
+
20  std::cout << point.tc << " " << point.point.x << " " << point.point.y
+
21  << " ";
+
22  }
+
23 }
Path(const mColor &fill, const mColor &stroke, float stroke_width)
Constructs a Path object.
Definition: Path.cpp:3
-
std::vector< PathPoint > points
Vector of points in the path.
Definition: Path.hpp:86
-
void printData() const override
Prints the data of the shape.
Definition: Path.cpp:19
-
std::string getFillRule() const
Gets the current fill rule of the path.
Definition: Path.cpp:17
-
std::vector< PathPoint > getPoints() const
Gets the vector of points in the path.
Definition: Path.cpp:13
-
std::string fill_rule
Fill rule of the path.
Definition: Path.hpp:87
-
std::string getClass() const override
Gets the type of the shape.
Definition: Path.cpp:9
-
void setFillRule(std::string fill_rule)
Sets the fill rule of the path.
Definition: Path.cpp:15
-
void addPoint(PathPoint point)
Adds a point to the path.
Definition: Path.cpp:11
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
void setOutlineThickness(float thickness)
Sets the outline thickness of the shape.
Definition: SVGElement.cpp:16
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
-
void setFillColor(const mColor &color)
Sets the fill color of the shape.
Definition: SVGElement.cpp:8
-
void setOutlineColor(const mColor &color)
Sets the outline color of the shape.
Definition: SVGElement.cpp:12
-
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:33
+
std::vector< PathPoint > points
Vector of points in the path.
Definition: Path.hpp:90
+
void printData() const override
Prints the data of the shape.
Definition: Path.cpp:16
+
std::string getFillRule() const
Gets the current fill rule of the path.
Definition: Path.cpp:14
+
std::vector< PathPoint > getPoints() const
Gets the vector of points in the path.
Definition: Path.cpp:10
+
std::string fill_rule
Fill rule of the path.
Definition: Path.hpp:91
+
std::string getClass() const override
Gets the type of the shape.
Definition: Path.cpp:6
+
void setFillRule(std::string fill_rule)
Sets the fill rule of the path.
Definition: Path.cpp:12
+
void addPoint(PathPoint point)
Adds a point to the path.
Definition: Path.cpp:8
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:47
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
A struct that contains a point and a type of point.
Definition: Path.hpp:10
diff --git a/docs/html/Path_8hpp_source.html b/docs/Path_8hpp_source.html similarity index 80% rename from docs/html/Path_8hpp_source.html rename to docs/Path_8hpp_source.html index 4c157c2e..479cdfdc 100644 --- a/docs/html/Path_8hpp_source.html +++ b/docs/Path_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -127,46 +127,50 @@
4 #include "SVGElement.hpp"
5 
10 struct PathPoint {
-
11  Vector2Df Point;
-
12  char TC;
-
13 };
-
14 
-
24 class Path : public SVGElement {
-
25 public:
-
33  Path(const mColor& fill, const mColor& stroke, float stroke_width);
-
34 
-
40  std::string getClass() const override;
-
41 
-
49  void addPoint(PathPoint point);
-
50 
-
56  std::vector< PathPoint > getPoints() const;
-
57 
-
66  void setFillRule(std::string fill_rule);
-
67 
-
76  std::string getFillRule() const;
-
77 
-
83  void printData() const override;
-
84 
-
85 private:
-
86  std::vector< PathPoint > points;
-
87  std::string fill_rule;
-
88 };
-
89 
-
90 #endif
-
Represents a path element in 2D space.
Definition: Path.hpp:24
+
11  Vector2Df point;
+
12  char tc;
+
13  Vector2Df radius{0, 0};
+
14  float x_axis_rotation = 0.f;
+
15  bool large_arc_flag = false;
+
16  bool sweep_flag = false;
+
17 };
+
18 
+
28 class Path : public SVGElement {
+
29 public:
+
37  Path(const mColor& fill, const mColor& stroke, float stroke_width);
+
38 
+
44  std::string getClass() const override;
+
45 
+
53  void addPoint(PathPoint point);
+
54 
+
60  std::vector< PathPoint > getPoints() const;
+
61 
+
70  void setFillRule(std::string fill_rule);
+
71 
+
80  std::string getFillRule() const;
+
81 
+
87  void printData() const override;
+
88 
+
89 private:
+
90  std::vector< PathPoint > points;
+
91  std::string fill_rule;
+
92 };
+
93 
+
94 #endif
+
Represents a path element in 2D space.
Definition: Path.hpp:28
Path(const mColor &fill, const mColor &stroke, float stroke_width)
Constructs a Path object.
Definition: Path.cpp:3
-
std::vector< PathPoint > points
Vector of points in the path.
Definition: Path.hpp:86
-
void printData() const override
Prints the data of the shape.
Definition: Path.cpp:19
-
std::string getFillRule() const
Gets the current fill rule of the path.
Definition: Path.cpp:17
-
std::vector< PathPoint > getPoints() const
Gets the vector of points in the path.
Definition: Path.cpp:13
-
std::string fill_rule
Fill rule of the path.
Definition: Path.hpp:87
-
std::string getClass() const override
Gets the type of the shape.
Definition: Path.cpp:9
-
void setFillRule(std::string fill_rule)
Sets the fill rule of the path.
Definition: Path.cpp:15
-
void addPoint(PathPoint point)
Adds a point to the path.
Definition: Path.cpp:11
-
Represents an element in an SVG file.
Definition: SVGElement.hpp:17
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
+
std::vector< PathPoint > points
Vector of points in the path.
Definition: Path.hpp:90
+
void printData() const override
Prints the data of the shape.
Definition: Path.cpp:16
+
std::string getFillRule() const
Gets the current fill rule of the path.
Definition: Path.cpp:14
+
std::vector< PathPoint > getPoints() const
Gets the vector of points in the path.
Definition: Path.cpp:10
+
std::string fill_rule
Fill rule of the path.
Definition: Path.hpp:91
+
std::string getClass() const override
Gets the type of the shape.
Definition: Path.cpp:6
+
void setFillRule(std::string fill_rule)
Sets the fill rule of the path.
Definition: Path.cpp:12
+
void addPoint(PathPoint point)
Adds a point to the path.
Definition: Path.cpp:8
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
A struct that contains a point and a type of point.
Definition: Path.hpp:10
diff --git a/docs/html/PolyShape_8cpp_source.html b/docs/PolyShape_8cpp_source.html similarity index 59% rename from docs/html/PolyShape_8cpp_source.html rename to docs/PolyShape_8cpp_source.html index 519c7517..9b9dd3b8 100644 --- a/docs/html/PolyShape_8cpp_source.html +++ b/docs/PolyShape_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -124,36 +124,59 @@
1 #include "PolyShape.hpp"
2 
3 PolyShape::PolyShape(const mColor& fill, const mColor& stroke,
-
4  float stroke_width) {
- - - -
8 }
-
9 
-
10 void PolyShape::addPoint(const Vector2Df& point) { points.push_back(point); }
-
11 
-
12 const std::vector< Vector2Df >& PolyShape::getPoints() const { return points; }
-
13 
-
14 void PolyShape::printData() const {
- -
16  std::cout << "Points: ";
-
17  for (auto& point : getPoints()) {
-
18  std::cout << point.x << "," << point.y << " ";
-
19  }
-
20  std::cout << std::endl;
-
21 }
-
const std::vector< Vector2Df > & getPoints() const
Gets the total number of vertices representing the shape.
Definition: PolyShape.cpp:12
-
virtual void addPoint(const Vector2Df &point)
Adds a vertex to the shape.
Definition: PolyShape.cpp:10
-
void printData() const override
Prints the data of the shape.
Definition: PolyShape.cpp:14
+
4  float stroke_width)
+
5  : SVGElement(fill, stroke, stroke_width) {}
+
6 
+
7 void PolyShape::addPoint(const Vector2Df& point) { points.push_back(point); }
+
8 
+
9 const std::vector< Vector2Df >& PolyShape::getPoints() const { return points; }
+
10 
+
11 void PolyShape::setFillRule(std::string fill_rule) {
+
12  this->fill_rule = fill_rule;
+
13 }
+
14 
+
15 std::string PolyShape::getFillRule() const { return fill_rule; }
+
16 
+ +
18  float min_x = points[0].x;
+
19  float min_y = points[0].y;
+
20  for (auto& point : points) {
+
21  min_x = std::min(min_x, point.x);
+
22  min_y = std::min(min_y, point.y);
+
23  }
+
24  return Vector2Df(min_x, min_y);
+
25 }
+
26 
+ +
28  float max_x = points[0].x;
+
29  float max_y = points[0].y;
+
30  for (auto& point : points) {
+
31  max_x = std::max(max_x, point.x);
+
32  max_y = std::max(max_y, point.y);
+
33  }
+
34  return Vector2Df(max_x, max_y);
+
35 }
+
36 
+
37 void PolyShape::printData() const {
+ +
39  std::cout << "Points: ";
+
40  for (auto& point : getPoints()) {
+
41  std::cout << point.x << "," << point.y << " ";
+
42  }
+
43  std::cout << std::endl;
+
44 }
+
Vector2Df getMinBound() const override
Gets the minimum bounding box of the shape.
Definition: PolyShape.cpp:17
+
void setFillRule(std::string fill_rule)
Sets the fill rule of the polyshape.
Definition: PolyShape.cpp:11
+
const std::vector< Vector2Df > & getPoints() const
Gets the total number of vertices representing the shape.
Definition: PolyShape.cpp:9
+
virtual void addPoint(const Vector2Df &point)
Adds a vertex to the shape.
Definition: PolyShape.cpp:7
+
void printData() const override
Prints the data of the shape.
Definition: PolyShape.cpp:37
+
Vector2Df getMaxBound() const override
Gets the maximum bounding box of the shape.
Definition: PolyShape.cpp:27
PolyShape(const mColor &fill, const mColor &stroke, float stroke_width)
Constructs a PolyShape object.
Definition: PolyShape.cpp:3
+
std::string fill_rule
Fill rule of the polyshape.
Definition: PolyShape.hpp:15
+
std::string getFillRule() const
Gets the fill rule of the polyshape.
Definition: PolyShape.cpp:15
std::vector< Vector2Df > points
Vertices of the polyshape.
Definition: PolyShape.hpp:14
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
void setOutlineThickness(float thickness)
Sets the outline thickness of the shape.
Definition: SVGElement.cpp:16
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
-
void setFillColor(const mColor &color)
Sets the fill color of the shape.
Definition: SVGElement.cpp:8
-
void setOutlineColor(const mColor &color)
Sets the outline color of the shape.
Definition: SVGElement.cpp:12
-
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:33
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:47
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/html/PolyShape_8hpp_source.html b/docs/PolyShape_8hpp_source.html similarity index 72% rename from docs/html/PolyShape_8hpp_source.html rename to docs/PolyShape_8hpp_source.html index f4132acf..a3e1fd22 100644 --- a/docs/html/PolyShape_8hpp_source.html +++ b/docs/PolyShape_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -129,31 +129,45 @@
12 class PolyShape : public SVGElement {
13 protected:
14  std::vector< Vector2Df > points;
-
15 
-
25  PolyShape(const mColor &fill, const mColor &stroke, float stroke_width);
-
26 
-
27 public:
-
34  std::string getClass() const = 0;
-
35 
-
41  virtual void addPoint(const Vector2Df &point);
-
42 
-
48  const std::vector< Vector2Df > &getPoints() const;
-
49 
-
55  void printData() const override;
-
56 };
+
15  std::string fill_rule;
+
16 
+
26  PolyShape(const mColor &fill, const mColor &stroke, float stroke_width);
+
27 
+
28 public:
+
35  std::string getClass() const = 0;
+
36 
+
42  virtual void addPoint(const Vector2Df &point);
+
43 
+
49  const std::vector< Vector2Df > &getPoints() const;
+
50 
+
56  void setFillRule(std::string fill_rule);
57 
-
58 #endif // POLYSHAPE_HPP_
+
63  std::string getFillRule() const;
+
64 
+
70  Vector2Df getMinBound() const override;
+
71 
+
77  Vector2Df getMaxBound() const override;
+
78 
+
84  void printData() const override;
+
85 };
+
86 
+
87 #endif // POLYSHAPE_HPP_
Abstract base class for polygon and polyline shapes in 2D space.
Definition: PolyShape.hpp:12
-
const std::vector< Vector2Df > & getPoints() const
Gets the total number of vertices representing the shape.
Definition: PolyShape.cpp:12
-
virtual void addPoint(const Vector2Df &point)
Adds a vertex to the shape.
Definition: PolyShape.cpp:10
-
void printData() const override
Prints the data of the shape.
Definition: PolyShape.cpp:14
+
Vector2Df getMinBound() const override
Gets the minimum bounding box of the shape.
Definition: PolyShape.cpp:17
+
void setFillRule(std::string fill_rule)
Sets the fill rule of the polyshape.
Definition: PolyShape.cpp:11
+
const std::vector< Vector2Df > & getPoints() const
Gets the total number of vertices representing the shape.
Definition: PolyShape.cpp:9
+
virtual void addPoint(const Vector2Df &point)
Adds a vertex to the shape.
Definition: PolyShape.cpp:7
+
void printData() const override
Prints the data of the shape.
Definition: PolyShape.cpp:37
+
Vector2Df getMaxBound() const override
Gets the maximum bounding box of the shape.
Definition: PolyShape.cpp:27
PolyShape(const mColor &fill, const mColor &stroke, float stroke_width)
Constructs a PolyShape object.
Definition: PolyShape.cpp:3
+
std::string fill_rule
Fill rule of the polyshape.
Definition: PolyShape.hpp:15
+
std::string getFillRule() const
Gets the fill rule of the polyshape.
Definition: PolyShape.cpp:15
std::vector< Vector2Df > points
Vertices of the polyshape.
Definition: PolyShape.hpp:14
std::string getClass() const =0
Gets the type of the shape.
-
Represents an element in an SVG file.
Definition: SVGElement.hpp:17
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/html/Polygon_8cpp_source.html b/docs/Polygon_8cpp_source.html similarity index 81% rename from docs/html/Polygon_8cpp_source.html rename to docs/Polygon_8cpp_source.html index 214ab13b..71c73a26 100644 --- a/docs/html/Polygon_8cpp_source.html +++ b/docs/Polygon_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -127,14 +127,7 @@
4  : PolyShape(fill, stroke, stroke_width) {}
5 
6 std::string Plygon::getClass() const { return "Polygon"; }
-
7 
-
8 void Plygon::setFillRule(std::string fill_rule) { this->fill_rule = fill_rule; }
-
9 
-
10 std::string Plygon::getFillRule() const { return fill_rule; }
-
std::string fill_rule
Fill rule of the polygon.
Definition: Polygon.hpp:47
-
std::string getFillRule() const
Gets the fill rule of the polygon.
Definition: Polygon.cpp:10
std::string getClass() const override
Gets the type of the shape.
Definition: Polygon.cpp:6
-
void setFillRule(std::string fill_rule)
Sets the fill rule of the polygon.
Definition: Polygon.cpp:8
Plygon(mColor fill, mColor stroke, float stroke_width)
Constructs a Polygon object.
Definition: Polygon.cpp:3
Abstract base class for polygon and polyline shapes in 2D space.
Definition: PolyShape.hpp:12
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/html/Polygon_8hpp_source.html b/docs/Polygon_8hpp_source.html similarity index 80% rename from docs/html/Polygon_8hpp_source.html rename to docs/Polygon_8hpp_source.html index a32f85db..55c87b52 100644 --- a/docs/html/Polygon_8hpp_source.html +++ b/docs/Polygon_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -131,26 +131,16 @@
23 
30  std::string getClass() const override;
-
31 
-
37  void setFillRule(std::string fill_rule);
-
38 
-
44  std::string getFillRule() const;
-
45 
-
46 private:
-
47  std::string fill_rule;
-
48 };
-
49 
-
50 #endif // POLYGON_HPP_
+
31 };
+
32 
+
33 #endif // POLYGON_HPP_
Represents a polygon in 2D space.
Definition: Polygon.hpp:12
-
std::string fill_rule
Fill rule of the polygon.
Definition: Polygon.hpp:47
-
std::string getFillRule() const
Gets the fill rule of the polygon.
Definition: Polygon.cpp:10
std::string getClass() const override
Gets the type of the shape.
Definition: Polygon.cpp:6
-
void setFillRule(std::string fill_rule)
Sets the fill rule of the polygon.
Definition: Polygon.cpp:8
Plygon(mColor fill, mColor stroke, float stroke_width)
Constructs a Polygon object.
Definition: Polygon.cpp:3
Abstract base class for polygon and polyline shapes in 2D space.
Definition: PolyShape.hpp:12
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/html/Polyline_8cpp_source.html b/docs/Polyline_8cpp_source.html similarity index 80% rename from docs/html/Polyline_8cpp_source.html rename to docs/Polyline_8cpp_source.html index 2cb7f7ea..c2e67f75 100644 --- a/docs/html/Polyline_8cpp_source.html +++ b/docs/Polyline_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -127,17 +127,8 @@
4  : PolyShape(fill, stroke, stroke_width) {}
5 
6 std::string Plyline::getClass() const { return "Polyline"; }
-
7 
-
8 void Plyline::setFillRule(std::string fill_rule) {
-
9  this->fill_rule = fill_rule;
-
10 }
-
11 
-
12 std::string Plyline::getFillRule() const { return fill_rule; }
std::string getClass() const override
Gets the type of the shape.
Definition: Polyline.cpp:6
-
std::string fill_rule
Fill rule of the polyline.
Definition: Polyline.hpp:47
Plyline(const mColor &fill, const mColor &stroke, float stroke_width)
Constructs a Polyline object.
Definition: Polyline.cpp:3
-
void setFillRule(std::string fill_rule)
Sets the fill rule of the polyline.
Definition: Polyline.cpp:8
-
std::string getFillRule() const
Gets the fill rule of the polyline.
Definition: Polyline.cpp:12
Abstract base class for polygon and polyline shapes in 2D space.
Definition: PolyShape.hpp:12
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/html/Polyline_8hpp_source.html b/docs/Polyline_8hpp_source.html similarity index 80% rename from docs/html/Polyline_8hpp_source.html rename to docs/Polyline_8hpp_source.html index b3a9ce6a..a67a9d28 100644 --- a/docs/html/Polyline_8hpp_source.html +++ b/docs/Polyline_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -131,26 +131,16 @@
23  Plyline(const mColor& fill, const mColor& stroke, float stroke_width);
24 
30  std::string getClass() const override;
-
31 
-
37  void setFillRule(std::string fill_rule);
-
38 
-
44  std::string getFillRule() const;
-
45 
-
46 private:
-
47  std::string fill_rule;
-
48 };
-
49 
-
50 #endif // POLYLINE_HPP_
+
31 };
+
32 
+
33 #endif // POLYLINE_HPP_
Represents a polyline in 2D space.
Definition: Polyline.hpp:12
std::string getClass() const override
Gets the type of the shape.
Definition: Polyline.cpp:6
-
std::string fill_rule
Fill rule of the polyline.
Definition: Polyline.hpp:47
Plyline(const mColor &fill, const mColor &stroke, float stroke_width)
Constructs a Polyline object.
Definition: Polyline.cpp:3
-
void setFillRule(std::string fill_rule)
Sets the fill rule of the polyline.
Definition: Polyline.cpp:8
-
std::string getFillRule() const
Gets the fill rule of the polyline.
Definition: Polyline.cpp:12
Abstract base class for polygon and polyline shapes in 2D space.
Definition: PolyShape.hpp:12
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/RadialGradient_8cpp_source.html b/docs/RadialGradient_8cpp_source.html new file mode 100644 index 00000000..dd85a17b --- /dev/null +++ b/docs/RadialGradient_8cpp_source.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/graphics/RadialGradient.cpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
RadialGradient.cpp
+
+
+
1 #include "RadialGradient.hpp"
+
2 
+
3 RadialGradient::RadialGradient(std::vector< Stop > stops,
+
4  std::pair< Vector2Df, Vector2Df > points,
+
5  Vector2Df radius, std::string units)
+
6  : Gradient(stops, points, units) {
+
7  this->radius = radius;
+
8 }
+
9 
+
10 std::string RadialGradient::getClass() const { return "RadialGradient"; }
+
11 
+ +
A class that represents a gradient.
Definition: Gradient.hpp:18
+
std::string getClass() const override
Gets the type of the gradient.
+
RadialGradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, Vector2Df radius, std::string units)
Constructs a RadialGradient object.
+
Vector2Df radius
The radius of the gradient.
+
Vector2Df getRadius() const
Gets the radius of the gradient.
+ +
+
+ + + \ No newline at end of file diff --git a/docs/RadialGradient_8hpp_source.html b/docs/RadialGradient_8hpp_source.html new file mode 100644 index 00000000..0268a0f8 --- /dev/null +++ b/docs/RadialGradient_8hpp_source.html @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/graphics/RadialGradient.hpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
RadialGradient.hpp
+
+
+
1 #ifndef RADIAL_GRADIENT_HPP_
+
2 #define RADIAL_GRADIENT_HPP_
+
3 
+
4 #include "Gradient.hpp"
+
5 
+
14 class RadialGradient : public Gradient {
+
15 public:
+
24  RadialGradient(std::vector< Stop > stops,
+
25  std::pair< Vector2Df, Vector2Df > points, Vector2Df radius,
+
26  std::string units);
+
27 
+
34  std::string getClass() const override;
+
35 
+
41  Vector2Df getRadius() const;
+
42 
+
43 private:
+ +
45 };
+
46 
+
47 #endif
+
A class that represents a gradient.
Definition: Gradient.hpp:18
+
std::string units
Units of the gradient.
Definition: Gradient.hpp:95
+
std::vector< Stop > stops
Stops of the gradient.
Definition: Gradient.hpp:92
+
std::pair< Vector2Df, Vector2Df > points
Start and end points of the gradient.
Definition: Gradient.hpp:94
+
A class that represents a radial gradient.
+
std::string getClass() const override
Gets the type of the gradient.
+
RadialGradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, Vector2Df radius, std::string units)
Constructs a RadialGradient object.
+
Vector2Df radius
The radius of the gradient.
+
Vector2Df getRadius() const
Gets the radius of the gradient.
+ +
+
+ + + \ No newline at end of file diff --git a/docs/html/Rect_8cpp_source.html b/docs/Rect_8cpp_source.html similarity index 71% rename from docs/html/Rect_8cpp_source.html rename to docs/Rect_8cpp_source.html index b14d2000..4f0e6090 100644 --- a/docs/html/Rect_8cpp_source.html +++ b/docs/Rect_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -125,62 +125,44 @@
2 
3 Rect::Rect(float width, float height, Vector2Df position, Vector2Df radius,
4  const mColor &fill, const mColor &stroke, float stroke_width)
-
5  : PolyShape(fill, stroke, stroke_width), width(width), height(height),
-
6  radius(radius) {
-
7  addPoint(Vector2Df(0, 0));
- - - - -
12 }
+
5  : SVGElement(fill, stroke, stroke_width, position), width(width),
+
6  height(height), radius(radius) {}
+
7 
+
8 std::string Rect::getClass() const { return "Rect"; }
+
9 
+
10 void Rect::setWidth(float width) { this->width = width; }
+
11 
+
12 float Rect::getWidth() const { return width; }
13 
-
14 std::string Rect::getClass() const { return "Rect"; }
+
14 void Rect::setHeight(float height) { this->height = height; }
15 
-
16 void Rect::setWidth(float width) {
-
17  this->width = width;
-
18  points[1].x = width;
-
19  points[2].x = width;
-
20 }
+
16 float Rect::getHeight() const { return height; }
+
17 
+
18 void Rect::setRadius(const Vector2Df &radius) { this->radius = radius; }
+
19 
+
20 Vector2Df Rect::getRadius() const { return radius; }
21 
-
22 float Rect::getWidth() const { return width; }
-
23 
-
24 void Rect::setHeight(float height) {
-
25  this->height = height;
-
26  points[2].y = height;
-
27  points[3].y = height;
+
22 void Rect::printData() const {
+ +
24  std::cout << "Width: " << getWidth() << std::endl;
+
25  std::cout << "Height: " << getHeight() << std::endl;
+
26  std::cout << "Radius: " << getRadius().x << " " << getRadius().y
+
27  << std::endl;
28 }
-
29 
-
30 float Rect::getHeight() const { return height; }
-
31 
-
32 void Rect::setRadius(const Vector2Df &radius) { this->radius = radius; }
-
33 
-
34 Vector2Df Rect::getRadius() const { return radius; }
-
35 
-
36 void Rect::printData() const {
- -
38  std::cout << "Width: " << getWidth() << std::endl;
-
39  std::cout << "Height: " << getHeight() << std::endl;
-
40  std::cout << "Radius: " << getRadius().x << " " << getRadius().y
-
41  << std::endl;
-
42 }
-
Abstract base class for polygon and polyline shapes in 2D space.
Definition: PolyShape.hpp:12
-
virtual void addPoint(const Vector2Df &point)
Adds a vertex to the shape.
Definition: PolyShape.cpp:10
-
std::vector< Vector2Df > points
Vertices of the polyshape.
Definition: PolyShape.hpp:14
-
void setRadius(const Vector2Df &radius)
Sets the radii of the rectangle.
Definition: Rect.cpp:32
+
void setRadius(const Vector2Df &radius)
Sets the radii of the rectangle.
Definition: Rect.cpp:18
float height
Height of the rectangle.
Definition: Rect.hpp:16
-
Vector2Df getRadius() const
Gets the radii of the rectangle.
Definition: Rect.cpp:34
-
float getHeight() const
Gets the height of the rectangle.
Definition: Rect.cpp:30
-
std::string getClass() const override
Gets the type of the shape.
Definition: Rect.cpp:14
-
void printData() const override
Prints the data of the rectangle.
Definition: Rect.cpp:36
+
Vector2Df getRadius() const
Gets the radii of the rectangle.
Definition: Rect.cpp:20
+
float getHeight() const
Gets the height of the rectangle.
Definition: Rect.cpp:16
+
std::string getClass() const override
Gets the type of the shape.
Definition: Rect.cpp:8
+
void printData() const override
Prints the data of the rectangle.
Definition: Rect.cpp:22
Vector2Df radius
Radii of the rectangle in the x and y directions.
Definition: Rect.hpp:17
float width
Width of the rectangle.
Definition: Rect.hpp:15
-
void setHeight(float height)
Sets the height of the rectangle.
Definition: Rect.cpp:24
-
float getWidth() const
Gets the width of the rectangle.
Definition: Rect.cpp:22
+
void setHeight(float height)
Sets the height of the rectangle.
Definition: Rect.cpp:14
+
float getWidth() const
Gets the width of the rectangle.
Definition: Rect.cpp:12
Rect(float width, float height, Vector2Df position, Vector2Df radius, const mColor &fill, const mColor &stroke, float stroke_width)
Constructs a Rect object.
Definition: Rect.cpp:3
-
void setWidth(float width)
Sets the width of the rectangle.
Definition: Rect.cpp:16
-
void setPosition(float x, float y)
Sets the position of the shape.
Definition: SVGElement.cpp:22
-
Vector2Df position
Position of the shape.
Definition: SVGElement.hpp:172
-
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:33
+
void setWidth(float width)
Sets the width of the rectangle.
Definition: Rect.cpp:10
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:47
T x
X coordinate of the vector.
Definition: Vector2D.hpp:45
T y
Y coordinate of the vector.
Definition: Vector2D.hpp:46
diff --git a/docs/html/Rect_8hpp_source.html b/docs/Rect_8hpp_source.html similarity index 93% rename from docs/html/Rect_8hpp_source.html rename to docs/Rect_8hpp_source.html index b2febc6b..6e395160 100644 --- a/docs/html/Rect_8hpp_source.html +++ b/docs/Rect_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -124,9 +124,9 @@
1 #ifndef RECT_HPP_
2 #define RECT_HPP_
3 
-
4 #include "Polygon.hpp"
+
4 #include "SVGElement.hpp"
5 
-
13 class Rect : public PolyShape {
+
13 class Rect : public SVGElement {
14 private:
15  float width;
16  float height;
@@ -154,24 +154,24 @@
89 };
90 
91 #endif // RECT_HPP_
-
Abstract base class for polygon and polyline shapes in 2D space.
Definition: PolyShape.hpp:12
Represents a rectangle in 2D space.
Definition: Rect.hpp:13
-
void setRadius(const Vector2Df &radius)
Sets the radii of the rectangle.
Definition: Rect.cpp:32
+
void setRadius(const Vector2Df &radius)
Sets the radii of the rectangle.
Definition: Rect.cpp:18
float height
Height of the rectangle.
Definition: Rect.hpp:16
-
Vector2Df getRadius() const
Gets the radii of the rectangle.
Definition: Rect.cpp:34
-
float getHeight() const
Gets the height of the rectangle.
Definition: Rect.cpp:30
-
std::string getClass() const override
Gets the type of the shape.
Definition: Rect.cpp:14
-
void printData() const override
Prints the data of the rectangle.
Definition: Rect.cpp:36
+
Vector2Df getRadius() const
Gets the radii of the rectangle.
Definition: Rect.cpp:20
+
float getHeight() const
Gets the height of the rectangle.
Definition: Rect.cpp:16
+
std::string getClass() const override
Gets the type of the shape.
Definition: Rect.cpp:8
+
void printData() const override
Prints the data of the rectangle.
Definition: Rect.cpp:22
Vector2Df radius
Radii of the rectangle in the x and y directions.
Definition: Rect.hpp:17
float width
Width of the rectangle.
Definition: Rect.hpp:15
-
void setHeight(float height)
Sets the height of the rectangle.
Definition: Rect.cpp:24
-
float getWidth() const
Gets the width of the rectangle.
Definition: Rect.cpp:22
+
void setHeight(float height)
Sets the height of the rectangle.
Definition: Rect.cpp:14
+
float getWidth() const
Gets the width of the rectangle.
Definition: Rect.cpp:12
Rect(float width, float height, Vector2Df position, Vector2Df radius, const mColor &fill, const mColor &stroke, float stroke_width)
Constructs a Rect object.
Definition: Rect.cpp:3
-
void setWidth(float width)
Sets the width of the rectangle.
Definition: Rect.cpp:16
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
-
Vector2Df position
Position of the shape.
Definition: SVGElement.hpp:172
+
void setWidth(float width)
Sets the width of the rectangle.
Definition: Rect.cpp:10
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
+
Vector2Df position
Position of the shape.
Definition: SVGElement.hpp:225
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/Renderer_8cpp_source.html b/docs/Renderer_8cpp_source.html new file mode 100644 index 00000000..dd460a98 --- /dev/null +++ b/docs/Renderer_8cpp_source.html @@ -0,0 +1,936 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/Renderer.cpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Renderer.cpp
+
+
+
1 #include "Renderer.hpp"
+
2 
+
3 #include <algorithm>
+
4 #include <codecvt>
+
5 #include <locale>
+
6 
+ +
8 
+ +
10 
+ +
12  if (instance == nullptr) {
+
13  instance = new Renderer();
+
14  }
+
15  return instance;
+
16 }
+
17 
+
18 std::pair< float, float > getTranslate(std::string transform_value) {
+
19  float trans_x = 0, trans_y = 0;
+
20  if (transform_value.find(",") != std::string::npos) {
+
21  sscanf(transform_value.c_str(), "translate(%f, %f)", &trans_x,
+
22  &trans_y);
+
23  } else {
+
24  sscanf(transform_value.c_str(), "translate(%f %f)", &trans_x, &trans_y);
+
25  }
+
26  return std::pair< float, float >(trans_x, trans_y);
+
27 }
+
28 
+
29 float getRotate(std::string transform_value) {
+
30  float degree = 0;
+
31  sscanf(transform_value.c_str(), "rotate(%f)", &degree);
+
32  return degree;
+
33 }
+
34 
+
35 float getScale(std::string transform_value) {
+
36  float scale = 0;
+
37  sscanf(transform_value.c_str(), "scale(%f)", &scale);
+
38  return scale;
+
39 }
+
40 
+
41 std::pair< float, float > getScaleXY(std::string transform_value) {
+
42  float scale_x = 0, scale_y = 0;
+
43  if (transform_value.find(",") != std::string::npos)
+
44  sscanf(transform_value.c_str(), "scale(%f, %f)", &scale_x, &scale_y);
+
45  else
+
46  sscanf(transform_value.c_str(), "scale(%f %f)", &scale_x, &scale_y);
+
47  return std::pair< float, float >(scale_x, scale_y);
+
48 }
+
49 
+
50 void Renderer::applyTransform(std::vector< std::string > transform_order,
+
51  Gdiplus::Graphics& graphics) const {
+
52  for (auto type : transform_order) {
+
53  if (type.find("translate") != std::string::npos) {
+
54  float trans_x = getTranslate(type).first,
+
55  trans_y = getTranslate(type).second;
+
56  graphics.TranslateTransform(trans_x, trans_y);
+
57  } else if (type.find("rotate") != std::string::npos) {
+
58  float degree = getRotate(type);
+
59  graphics.RotateTransform(degree);
+
60  } else if (type.find("scale") != std::string::npos) {
+
61  if (type.find(",") != std::string::npos) {
+
62  float scale_x = getScaleXY(type).first,
+
63  scale_y = getScaleXY(type).second;
+
64  graphics.ScaleTransform(scale_x, scale_y);
+
65  } else {
+
66  float scale = getScale(type);
+
67  graphics.ScaleTransform(scale, scale);
+
68  }
+
69  }
+
70  }
+
71 }
+
72 
+
73 void Renderer::draw(Gdiplus::Graphics& graphics, Group* group) const {
+
74  for (auto shape : group->getElements()) {
+
75  Gdiplus::Matrix original;
+
76  graphics.GetTransform(&original);
+
77  applyTransform(shape->getTransforms(), graphics);
+
78  if (shape->getClass() == "Group") {
+
79  Group* group = dynamic_cast< Group* >(shape);
+
80  draw(graphics, group);
+
81  } else if (shape->getClass() == "Polyline") {
+
82  Plyline* polyline = dynamic_cast< Plyline* >(shape);
+
83  drawPolyline(graphics, polyline);
+
84  } else if (shape->getClass() == "Text") {
+
85  Text* text = dynamic_cast< Text* >(shape);
+
86  drawText(graphics, text);
+
87  } else if (shape->getClass() == "Rect") {
+
88  Rect* rectangle = dynamic_cast< Rect* >(shape);
+
89  drawRectangle(graphics, rectangle);
+
90  } else if (shape->getClass() == "Circle") {
+
91  Circle* circle = dynamic_cast< Circle* >(shape);
+
92  drawCircle(graphics, circle);
+
93  } else if (shape->getClass() == "Ellipse") {
+
94  Ell* ellipse = dynamic_cast< Ell* >(shape);
+
95  drawEllipse(graphics, ellipse);
+
96  } else if (shape->getClass() == "Line") {
+
97  Line* line = dynamic_cast< Line* >(shape);
+
98  drawLine(graphics, line);
+
99  } else if (shape->getClass() == "Polygon") {
+
100  Plygon* polygon = dynamic_cast< Plygon* >(shape);
+
101  drawPolygon(graphics, polygon);
+
102  } else if (shape->getClass() == "Path") {
+
103  Path* path = dynamic_cast< Path* >(shape);
+
104  drawPath(graphics, path);
+
105  }
+
106  graphics.SetTransform(&original);
+
107  }
+
108 }
+
109 
+
110 void Renderer::drawLine(Gdiplus::Graphics& graphics, Line* line) const {
+
111  mColor color = line->getOutlineColor();
+
112  Gdiplus::Pen linePen(Gdiplus::Color(color.a, color.r, color.g, color.b),
+
113  line->getOutlineThickness());
+
114  Gdiplus::PointF startPoint(line->getPosition().x, line->getPosition().y);
+
115  Gdiplus::PointF endPoint(line->getDirection().x, line->getDirection().y);
+
116  graphics.DrawLine(&linePen, startPoint, endPoint);
+
117 }
+
118 
+
119 void Renderer::drawRectangle(Gdiplus::Graphics& graphics,
+
120  Rect* rectangle) const {
+
121  float x = rectangle->getPosition().x;
+
122  float y = rectangle->getPosition().y;
+
123  float width = rectangle->getWidth();
+
124  float height = rectangle->getHeight();
+
125  mColor outline_color = rectangle->getOutlineColor();
+
126  Gdiplus::Pen rect_outline(Gdiplus::Color(outline_color.a, outline_color.r,
+
127  outline_color.g, outline_color.b),
+
128  rectangle->getOutlineThickness());
+
129  Gdiplus::RectF bound(x, y, width, height);
+
130  Gdiplus::Brush* rect_fill = getBrush(rectangle, bound);
+
131  if (rectangle->getRadius().x != 0 || rectangle->getRadius().y != 0) {
+
132  float dx = rectangle->getRadius().x * 2;
+
133  float dy = rectangle->getRadius().y * 2;
+
134  Gdiplus::GraphicsPath path;
+
135  path.AddArc(x, y, dx, dy, 180, 90);
+
136  path.AddArc(x + width - dx, y, dx, dy, 270, 90);
+
137  path.AddArc(x + width - dx, y + height - dy, dx, dy, 0, 90);
+
138  path.AddArc(x, y + height - dy, dx, dy, 90, 90);
+
139  path.CloseFigure();
+
140  if (Gdiplus::PathGradientBrush* brush =
+
141  dynamic_cast< Gdiplus::PathGradientBrush* >(rect_fill)) {
+
142  mColor color =
+
143  rectangle->getGradient()->getStops().back().getColor();
+
144  Gdiplus::SolidBrush corner_fill(
+
145  Gdiplus::Color(color.a, color.r, color.g, color.b));
+
146  graphics.FillPath(&corner_fill, &path);
+
147  }
+
148  graphics.FillPath(rect_fill, &path);
+
149  graphics.DrawPath(&rect_outline, &path);
+
150  } else {
+
151  if (Gdiplus::PathGradientBrush* brush =
+
152  dynamic_cast< Gdiplus::PathGradientBrush* >(rect_fill)) {
+
153  mColor color =
+
154  rectangle->getGradient()->getStops().back().getColor();
+
155  Gdiplus::SolidBrush corner_fill(
+
156  Gdiplus::Color(color.a, color.r, color.g, color.b));
+
157  graphics.FillRectangle(&corner_fill, x, y, width, height);
+
158  }
+
159  graphics.FillRectangle(rect_fill, x, y, width, height);
+
160  graphics.DrawRectangle(&rect_outline, x, y, width, height);
+
161  }
+
162  delete rect_fill;
+
163 }
+
164 
+
165 void Renderer::drawCircle(Gdiplus::Graphics& graphics, Circle* circle) const {
+
166  mColor outline_color = circle->getOutlineColor();
+
167  Gdiplus::Pen circle_outline(
+
168  Gdiplus::Color(outline_color.a, outline_color.r, outline_color.g,
+
169  outline_color.b),
+
170  circle->getOutlineThickness());
+
171  Vector2Df min_bound = circle->getMinBound();
+
172  Vector2Df max_bound = circle->getMaxBound();
+
173  Gdiplus::RectF bound(min_bound.x, min_bound.y, max_bound.x - min_bound.x,
+
174  max_bound.y - min_bound.y);
+
175  Gdiplus::Brush* circle_fill = getBrush(circle, bound);
+
176  if (Gdiplus::PathGradientBrush* brush =
+
177  dynamic_cast< Gdiplus::PathGradientBrush* >(circle_fill)) {
+
178  mColor color = circle->getGradient()->getStops().back().getColor();
+
179  Gdiplus::SolidBrush corner_fill(
+
180  Gdiplus::Color(color.a, color.r, color.g, color.b));
+
181  graphics.FillEllipse(
+
182  &corner_fill, circle->getPosition().x - circle->getRadius().x,
+
183  circle->getPosition().y - circle->getRadius().y,
+
184  circle->getRadius().x * 2, circle->getRadius().y * 2);
+
185  }
+
186  graphics.FillEllipse(circle_fill,
+
187  circle->getPosition().x - circle->getRadius().x,
+
188  circle->getPosition().y - circle->getRadius().y,
+
189  circle->getRadius().x * 2, circle->getRadius().y * 2);
+
190  graphics.DrawEllipse(&circle_outline,
+
191  circle->getPosition().x - circle->getRadius().x,
+
192  circle->getPosition().y - circle->getRadius().y,
+
193  circle->getRadius().x * 2, circle->getRadius().x * 2);
+
194  delete circle_fill;
+
195 }
+
196 
+
197 void Renderer::drawEllipse(Gdiplus::Graphics& graphics, Ell* ellipse) const {
+
198  mColor outline_color = ellipse->getOutlineColor();
+
199  Gdiplus::Pen ellipse_outline(
+
200  Gdiplus::Color(outline_color.a, outline_color.r, outline_color.g,
+
201  outline_color.b),
+
202  ellipse->getOutlineThickness());
+
203  Vector2Df min_bound = ellipse->getMinBound();
+
204  Vector2Df max_bound = ellipse->getMaxBound();
+
205  Gdiplus::RectF bound(min_bound.x, min_bound.y, max_bound.x - min_bound.x,
+
206  max_bound.y - min_bound.y);
+
207  Gdiplus::Brush* ellipse_fill = getBrush(ellipse, bound);
+
208  if (Gdiplus::PathGradientBrush* brush =
+
209  dynamic_cast< Gdiplus::PathGradientBrush* >(ellipse_fill)) {
+
210  mColor color = ellipse->getGradient()->getStops().back().getColor();
+
211  Gdiplus::SolidBrush corner_fill(
+
212  Gdiplus::Color(color.a, color.r, color.g, color.b));
+
213  graphics.FillEllipse(
+
214  &corner_fill, ellipse->getPosition().x - ellipse->getRadius().x,
+
215  ellipse->getPosition().y - ellipse->getRadius().y,
+
216  ellipse->getRadius().x * 2, ellipse->getRadius().y * 2);
+
217  }
+
218  graphics.FillEllipse(
+
219  ellipse_fill, ellipse->getPosition().x - ellipse->getRadius().x,
+
220  ellipse->getPosition().y - ellipse->getRadius().y,
+
221  ellipse->getRadius().x * 2, ellipse->getRadius().y * 2);
+
222  graphics.DrawEllipse(
+
223  &ellipse_outline, ellipse->getPosition().x - ellipse->getRadius().x,
+
224  ellipse->getPosition().y - ellipse->getRadius().y,
+
225  ellipse->getRadius().x * 2, ellipse->getRadius().y * 2);
+
226  delete ellipse_fill;
+
227 }
+
228 
+
229 void Renderer::drawPolygon(Gdiplus::Graphics& graphics, Plygon* polygon) const {
+
230  mColor outline_color = polygon->getOutlineColor();
+
231  Gdiplus::Pen polygon_outline(
+
232  Gdiplus::Color(outline_color.a, outline_color.r, outline_color.g,
+
233  outline_color.b),
+
234  polygon->getOutlineThickness());
+
235 
+
236  Gdiplus::PointF* points = new Gdiplus::PointF[polygon->getPoints().size()];
+
237  int idx = 0;
+
238  const std::vector< Vector2Df >& vertices = polygon->getPoints();
+
239  for (const Vector2Df vertex : vertices) {
+
240  points[idx++] = Gdiplus::PointF(vertex.x, vertex.y);
+
241  }
+
242 
+
243  Gdiplus::FillMode fill_mode;
+
244  if (polygon->getFillRule() == "evenodd") {
+
245  fill_mode = Gdiplus::FillModeAlternate;
+
246  } else if (polygon->getFillRule() == "nonzero") {
+
247  fill_mode = Gdiplus::FillModeWinding;
+
248  }
+
249  Vector2Df min_bound = polygon->getMinBound();
+
250  Vector2Df max_bound = polygon->getMaxBound();
+
251  Gdiplus::RectF bound(min_bound.x, min_bound.y, max_bound.x - min_bound.x,
+
252  max_bound.y - min_bound.y);
+
253  Gdiplus::Brush* polygon_fill = getBrush(polygon, bound);
+
254  if (Gdiplus::PathGradientBrush* brush =
+
255  dynamic_cast< Gdiplus::PathGradientBrush* >(polygon_fill)) {
+
256  mColor color = polygon->getGradient()->getStops().back().getColor();
+
257  Gdiplus::SolidBrush corner_fill(
+
258  Gdiplus::Color(color.a, color.r, color.g, color.b));
+
259  graphics.FillPolygon(&corner_fill, points, idx, fill_mode);
+
260  }
+
261  graphics.FillPolygon(polygon_fill, points, idx, fill_mode);
+
262  graphics.DrawPolygon(&polygon_outline, points, idx);
+
263  delete[] points;
+
264  delete polygon_fill;
+
265 }
+
266 
+
267 void Renderer::drawText(Gdiplus::Graphics& graphics, Text* text) const {
+
268  mColor outline_color = text->getOutlineColor();
+
269  graphics.SetTextRenderingHint(Gdiplus::TextRenderingHintAntiAliasGridFit);
+
270 
+
271  Gdiplus::Pen text_outline(Gdiplus::Color(outline_color.a, outline_color.r,
+
272  outline_color.g, outline_color.b),
+
273  text->getOutlineThickness());
+
274 
+
275  Gdiplus::FontFamily font_family(L"Times New Roman");
+
276 
+
277  Gdiplus::PointF position(text->getPosition().x, text->getPosition().y);
+
278  Gdiplus::GraphicsPath path;
+
279 
+
280  std::wstring_convert< std::codecvt_utf8_utf16< wchar_t > > converter;
+
281  std::wstring wide_content = converter.from_bytes(text->getContent());
+
282  Gdiplus::StringFormat string_format;
+
283  if (text->getAnchor() == "middle") {
+
284  string_format.SetAlignment(Gdiplus::StringAlignmentCenter);
+
285  position.X += 7;
+
286  } else if (text->getAnchor() == "end") {
+
287  string_format.SetAlignment(Gdiplus::StringAlignmentFar);
+
288  position.X += 14;
+
289  } else {
+
290  string_format.SetAlignment(Gdiplus::StringAlignmentNear);
+
291  }
+
292  Gdiplus::FontStyle font_style = Gdiplus::FontStyleRegular;
+
293  if (text->getFontStyle() == "italic" || text->getFontStyle() == "oblique") {
+
294  font_style = Gdiplus::FontStyleItalic;
+
295  position.Y -= 1;
+
296  }
+
297 
+
298  path.AddString(wide_content.c_str(), wide_content.size(), &font_family,
+
299  font_style, text->getFontSize(), position, &string_format);
+
300  Gdiplus::RectF bound;
+
301  path.GetBounds(&bound);
+
302  Gdiplus::Brush* text_fill = getBrush(text, bound);
+
303  if (Gdiplus::PathGradientBrush* brush =
+
304  dynamic_cast< Gdiplus::PathGradientBrush* >(text_fill)) {
+
305  mColor color = text->getGradient()->getStops().back().getColor();
+
306  Gdiplus::SolidBrush corner_fill(
+
307  Gdiplus::Color(color.a, color.r, color.g, color.b));
+
308  graphics.FillPath(&corner_fill, &path);
+
309  }
+
310  graphics.FillPath(text_fill, &path);
+
311  if (text->getOutlineColor().a != 0 &&
+
312  text->getOutlineColor().a == text->getFillColor().a) {
+
313  text_outline.SetColor(Gdiplus::Color(255, 255, 255, 255));
+
314  graphics.DrawPath(&text_outline, &path);
+
315  text_outline.SetColor(Gdiplus::Color(outline_color.a, outline_color.r,
+
316  outline_color.g, outline_color.b));
+
317  }
+
318  graphics.DrawPath(&text_outline, &path);
+
319  delete text_fill;
+
320 }
+
321 
+
322 void Renderer::drawPolyline(Gdiplus::Graphics& graphics,
+
323  Plyline* polyline) const {
+
324  mColor outline_color = polyline->getOutlineColor();
+
325  Gdiplus::Pen polyline_outline(
+
326  Gdiplus::Color(outline_color.a, outline_color.r, outline_color.g,
+
327  outline_color.b),
+
328  polyline->getOutlineThickness());
+
329 
+
330  Gdiplus::FillMode fill_mode;
+
331  if (polyline->getFillRule() == "evenodd") {
+
332  fill_mode = Gdiplus::FillModeAlternate;
+
333  } else if (polyline->getFillRule() == "nonzero") {
+
334  fill_mode = Gdiplus::FillModeWinding;
+
335  }
+
336  Gdiplus::GraphicsPath path(fill_mode);
+
337  const std::vector< Vector2Df >& points = polyline->getPoints();
+
338  if (points.size() < 2) {
+
339  return;
+
340  }
+
341 
+
342  path.StartFigure();
+
343  path.AddLine(points[0].x, points[0].y, points[1].x, points[1].y);
+
344  for (size_t i = 2; i < points.size(); ++i) {
+
345  path.AddLine(points[i - 1].x, points[i - 1].y, points[i].x,
+
346  points[i].y);
+
347  }
+
348  Vector2Df min_bound = polyline->getMinBound();
+
349  Vector2Df max_bound = polyline->getMaxBound();
+
350  Gdiplus::RectF bound(min_bound.x, min_bound.y, max_bound.x - min_bound.x,
+
351  max_bound.y - min_bound.y);
+
352  Gdiplus::Brush* polyline_fill = getBrush(polyline, bound);
+
353  if (Gdiplus::PathGradientBrush* brush =
+
354  dynamic_cast< Gdiplus::PathGradientBrush* >(polyline_fill)) {
+
355  mColor color = polyline->getGradient()->getStops().back().getColor();
+
356  Gdiplus::SolidBrush corner_fill(
+
357  Gdiplus::Color(color.a, color.r, color.g, color.b));
+
358  graphics.FillPath(&corner_fill, &path);
+
359  }
+
360  graphics.FillPath(polyline_fill, &path);
+
361  graphics.DrawPath(&polyline_outline, &path);
+
362  delete polyline_fill;
+
363 }
+
364 
+
365 void Renderer::drawPath(Gdiplus::Graphics& graphics, Path* path) const {
+
366  mColor outline_color = path->getOutlineColor();
+
367  Gdiplus::Pen path_outline(Gdiplus::Color(outline_color.a, outline_color.r,
+
368  outline_color.g, outline_color.b),
+
369  path->getOutlineThickness());
+
370 
+
371  Gdiplus::FillMode fill_mode;
+
372  if (path->getFillRule() == "evenodd") {
+
373  fill_mode = Gdiplus::FillModeAlternate;
+
374  } else if (path->getFillRule() == "nonzero") {
+
375  fill_mode = Gdiplus::FillModeWinding;
+
376  }
+
377  Gdiplus::GraphicsPath gdi_path(fill_mode);
+
378 
+
379  const std::vector< PathPoint >& points = path->getPoints();
+
380  int n = points.size();
+
381  Vector2Df first_point{0, 0}, cur_point{0, 0};
+
382 
+
383  for (int i = 0; i < n; ++i) {
+
384  if (points[i].tc == 'm') {
+
385  first_point = points[i].point;
+
386  gdi_path.StartFigure();
+
387  cur_point = first_point;
+
388  } else if (points[i].tc == 'l' || points[i].tc == 'h' ||
+
389  points[i].tc == 'v') {
+
390  gdi_path.AddLine(cur_point.x, cur_point.y, points[i].point.x,
+
391  points[i].point.y);
+
392  cur_point = points[i].point;
+
393  } else if (points[i].tc == 'c') {
+
394  if (i + 2 < n) {
+
395  Vector2Df control_point1 = points[i].point;
+
396  Vector2Df control_point2 = points[i + 1].point;
+
397  Vector2Df control_point3 = points[i + 2].point;
+
398  gdi_path.AddBezier(cur_point.x, cur_point.y, control_point1.x,
+
399  control_point1.y, control_point2.x,
+
400  control_point2.y, control_point3.x,
+
401  control_point3.y);
+
402  i += 2;
+
403  cur_point = control_point3;
+
404  }
+
405  } else if (points[i].tc == 'z') {
+
406  gdi_path.CloseFigure();
+
407  cur_point = first_point;
+
408  } else if (points[i].tc == 's') {
+
409  if (i + 1 < n) {
+
410  Vector2Df auto_control_point;
+
411  if (i > 0 &&
+
412  (points[i - 1].tc == 'c' || points[i - 1].tc == 's')) {
+
413  auto_control_point.x =
+
414  cur_point.x * 2 - points[i - 2].point.x;
+
415  auto_control_point.y =
+
416  cur_point.y * 2 - points[i - 2].point.y;
+
417  } else {
+
418  auto_control_point = cur_point;
+
419  }
+
420  Vector2Df control_point2 = points[i].point;
+
421  Vector2Df control_point3 = points[i + 1].point;
+
422  gdi_path.AddBezier(cur_point.x, cur_point.y,
+
423  auto_control_point.x, auto_control_point.y,
+
424  control_point2.x, control_point2.y,
+
425  control_point3.x, control_point3.y);
+
426  i += 1;
+
427  cur_point = control_point3;
+
428  }
+
429  } else if (points[i].tc == 'q') {
+
430  if (i + 1 < n) {
+
431  Vector2Df control_point = points[i].point;
+
432  Vector2Df end_point = points[i + 1].point;
+
433 
+
434  Gdiplus::PointF q_points[3];
+
435  q_points[0] = Gdiplus::PointF{cur_point.x, cur_point.y};
+
436  q_points[1] = Gdiplus::PointF{control_point.x, control_point.y};
+
437  q_points[2] = Gdiplus::PointF{end_point.x, end_point.y};
+
438  gdi_path.AddCurve(q_points, 3);
+
439  cur_point = points[i + 1].point;
+
440  i += 1;
+
441  }
+
442  } else if (points[i].tc == 't') {
+
443  Vector2Df auto_control_point;
+
444  if (i > 0 && (points[i - 1].tc == 'q' || points[i - 1].tc == 't')) {
+
445  auto_control_point.x = cur_point.x * 2 - points[i - 2].point.x;
+
446  auto_control_point.y = cur_point.y * 2 - points[i - 2].point.y;
+
447  } else {
+
448  auto_control_point = cur_point;
+
449  }
+
450  Vector2Df end_point = points[i].point;
+
451  Gdiplus::PointF t_points[3];
+
452  t_points[0] = Gdiplus::PointF{cur_point.x, cur_point.y};
+
453  t_points[1] =
+
454  Gdiplus::PointF{auto_control_point.x, auto_control_point.y};
+
455  t_points[2] = Gdiplus::PointF{end_point.x, end_point.y};
+
456  gdi_path.AddCurve(t_points, 3);
+
457  cur_point = points[i].point;
+
458  } else if (points[i].tc == 'a') {
+
459  float rx = points[i].radius.x;
+
460  float ry = points[i].radius.y;
+
461  if (rx == 0 || ry == 0) {
+
462  gdi_path.AddLine(cur_point.x, cur_point.y, points[i].point.x,
+
463  points[i].point.y);
+
464  cur_point = points[i].point;
+
465  continue;
+
466  }
+
467  if (rx < 0) {
+
468  rx = std::fabs(rx);
+
469  }
+
470  if (ry < 0) {
+
471  ry = std::fabs(ry);
+
472  }
+
473 
+
474  float x_axis_rotation = points[i].x_axis_rotation;
+
475  bool large_arc_flag = points[i].large_arc_flag;
+
476  bool sweep_flag = points[i].sweep_flag;
+
477  Vector2Df end_point{points[i].point.x, points[i].point.y};
+
478 
+
479  float angle = x_axis_rotation * acos(-1) / 180.0;
+
480  float cosAngle = cos(angle);
+
481  float sinAngle = sin(angle);
+
482 
+
483  Vector2Df point1;
+
484  float X = (cur_point.x - end_point.x) / 2.0;
+
485  float Y = (cur_point.y - end_point.y) / 2.0;
+
486  point1.x = (cosAngle * cosAngle + sinAngle * sinAngle) * X;
+
487  point1.y = (cosAngle * cosAngle + sinAngle * sinAngle) * Y;
+
488 
+
489  float radii_check = (point1.x * point1.x) / (rx * rx) +
+
490  (point1.y * point1.y) / (ry * ry);
+
491  if (radii_check > 1.0) {
+
492  rx = std::sqrt(radii_check) * rx;
+
493  ry = std::sqrt(radii_check) * ry;
+
494  }
+
495 
+
496  float sign = (large_arc_flag == sweep_flag ? -1.0 : 1.0);
+
497  Vector2Df point2;
+
498  float numo = (rx * rx) * (ry * ry) -
+
499  (rx * rx) * (point1.y * point1.y) -
+
500  (ry * ry) * (point1.x * point1.x);
+
501  float deno = (rx * rx) * (point1.y * point1.y) +
+
502  (ry * ry) * (point1.x * point1.x);
+
503 
+
504  if (numo < 0) {
+
505  numo = std::fabs(numo);
+
506  }
+
507 
+
508  point2.x = sign * std::sqrt(numo / deno) * ((rx * point1.y) / ry);
+
509  point2.y = sign * std::sqrt(numo / deno) * ((-ry * point1.x) / rx);
+
510 
+
511  Vector2Df center;
+
512  X = (cur_point.x + end_point.x) / 2.0;
+
513  Y = (cur_point.y + end_point.y) / 2.0;
+
514  center.x =
+
515  (cosAngle * cosAngle + sinAngle * sinAngle) * point2.x + X;
+
516  center.y =
+
517  (cosAngle * cosAngle + sinAngle * sinAngle) * point2.y + Y;
+
518 
+
519  float start_angle =
+
520  atan2((point1.y - point2.y) / ry, (point1.x - point2.x) / rx);
+
521  float end_angle =
+
522  atan2((-point1.y - point2.y) / ry, (-point1.x - point2.x) / rx);
+
523 
+
524  float delta_angle = end_angle - start_angle;
+
525 
+
526  if (sweep_flag && delta_angle < 0) {
+
527  delta_angle += 2.0 * acos(-1);
+
528  } else if (!sweep_flag && delta_angle > 0) {
+
529  delta_angle -= 2.0 * acos(-1);
+
530  }
+
531 
+
532  float start_angle_degree =
+
533  std::fmod((start_angle * 180.0) / acos(-1), 360);
+
534  float delta_angle_degree =
+
535  std::fmod((delta_angle * 180.0) / acos(-1), 360);
+
536 
+
537  gdi_path.AddArc(center.x - rx, center.y - ry, 2.0 * rx, 2.0 * ry,
+
538  start_angle_degree, delta_angle_degree);
+
539 
+
540  cur_point = end_point;
+
541  }
+
542  }
+
543 
+
544  Gdiplus::RectF bound;
+
545  gdi_path.GetBounds(&bound);
+
546  Gdiplus::Brush* path_fill = getBrush(path, bound);
+
547  Gdiplus::Region region(&gdi_path);
+
548  if (Gdiplus::PathGradientBrush* brush =
+
549  dynamic_cast< Gdiplus::PathGradientBrush* >(path_fill)) {
+
550  mColor color = path->getGradient()->getStops().back().getColor();
+
551  Gdiplus::SolidBrush corner_fill(
+
552  Gdiplus::Color(color.a, color.r, color.g, color.b));
+
553  if (path->getGradient()->getUnits() == "userSpaceOnUse") {
+
554  float cx = path->getGradient()->getPoints().first.x;
+
555  float cy = path->getGradient()->getPoints().first.y;
+
556  float r = dynamic_cast< RadialGradient* >(path->getGradient())
+
557  ->getRadius()
+
558  .x;
+
559  Gdiplus::GraphicsPath fill_path(fill_mode);
+
560  fill_path.AddEllipse(cx - r, cy - r, 2 * r, 2 * r);
+
561  for (auto type : path->getGradient()->getTransforms()) {
+
562  if (type.find("matrix") != std::string::npos) {
+
563  float a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
+
564  if (type.find(",") != std::string::npos) {
+
565  type.erase(std::remove(type.begin(), type.end(), ','),
+
566  type.end());
+
567  }
+
568  sscanf(type.c_str(), "matrix(%f %f %f %f %f %f)", &a, &b,
+
569  &c, &d, &e, &f);
+
570  Gdiplus::Matrix matrix(a, b, c, d, e, f);
+
571  fill_path.Transform(&matrix);
+
572  }
+
573  }
+
574  region.Exclude(&fill_path);
+
575  }
+
576  graphics.FillRegion(&corner_fill, &region);
+
577  }
+
578  graphics.FillPath(path_fill, &gdi_path);
+
579  graphics.DrawPath(&path_outline, &gdi_path);
+
580  delete path_fill;
+
581 }
+
582 
+
583 Gdiplus::Brush* Renderer::getBrush(SVGElement* shape,
+
584  Gdiplus::RectF bound) const {
+
585  Gradient* gradient = shape->getGradient();
+
586  if (gradient != NULL) {
+
587  std::pair< Vector2Df, Vector2Df > points = gradient->getPoints();
+
588  std::vector< Stop > stops = gradient->getStops();
+
589  int stop_size = stops.size() + 2;
+
590  Gdiplus::Color* colors = new Gdiplus::Color[stop_size];
+
591  float* offsets = new float[stop_size];
+
592  if (gradient->getClass() == "LinearGradient") {
+
593  if (gradient->getUnits() == "objectBoundingBox") {
+
594  points.first.x = bound.X;
+
595  points.first.y = bound.Y;
+
596  points.second.x = bound.X + bound.Width;
+
597  points.second.y = bound.Y + bound.Height;
+
598  }
+
599  offsets[0] = 0;
+
600  offsets[stop_size - 1] = 1;
+
601  colors[0] =
+
602  Gdiplus::Color(stops[0].getColor().a, stops[0].getColor().r,
+
603  stops[0].getColor().g, stops[0].getColor().b);
+
604  colors[stop_size - 1] =
+
605  Gdiplus::Color(stops[stop_size - 3].getColor().a,
+
606  stops[stop_size - 3].getColor().r,
+
607  stops[stop_size - 3].getColor().g,
+
608  stops[stop_size - 3].getColor().b);
+
609  for (size_t i = 1; i < stop_size - 1; ++i) {
+
610  colors[i] = Gdiplus::Color(
+
611  stops[i - 1].getColor().a, stops[i - 1].getColor().r,
+
612  stops[i - 1].getColor().g, stops[i - 1].getColor().b);
+
613  offsets[i] = stops[i - 1].getOffset();
+
614  }
+
615  Gdiplus::LinearGradientBrush* fill =
+
616  new Gdiplus::LinearGradientBrush(
+
617  Gdiplus::PointF(points.first.x, points.first.y),
+
618  Gdiplus::PointF(points.second.x, points.second.y),
+
619  colors[0], colors[stop_size - 1]);
+
620  fill->SetWrapMode(Gdiplus::WrapModeTileFlipX);
+
621  fill->SetInterpolationColors(colors, offsets, stop_size);
+
622  applyTransformsOnBrush(gradient->getTransforms(), fill);
+
623  delete[] colors;
+
624  delete[] offsets;
+
625  return fill;
+
626  } else if (gradient->getClass() == "RadialGradient") {
+
627  RadialGradient* radial_gradient =
+
628  dynamic_cast< RadialGradient* >(gradient);
+
629  Vector2Df radius = radial_gradient->getRadius();
+
630  if (gradient->getUnits() == "userSpaceOnUse") {
+
631  bound.X = points.first.x - radius.x;
+
632  bound.Y = points.first.y - radius.x;
+
633  bound.Width = radius.x * 2;
+
634  bound.Height = radius.x * 2;
+
635  }
+
636  Gdiplus::GraphicsPath path;
+
637  path.AddEllipse(bound);
+
638  Gdiplus::PathGradientBrush* fill =
+
639  new Gdiplus::PathGradientBrush(&path);
+
640  offsets[0] = 0;
+
641  offsets[stop_size - 1] = 1;
+
642  colors[0] = Gdiplus::Color(stops[stop_size - 3].getColor().a,
+
643  stops[stop_size - 3].getColor().r,
+
644  stops[stop_size - 3].getColor().g,
+
645  stops[stop_size - 3].getColor().b);
+
646  colors[stop_size - 1] =
+
647  Gdiplus::Color(stops[0].getColor().a, stops[0].getColor().r,
+
648  stops[0].getColor().g, stops[0].getColor().b);
+
649 
+
650  for (size_t i = 1; i < stop_size - 1; ++i) {
+
651  colors[i] =
+
652  Gdiplus::Color(stops[stop_size - 2 - i].getColor().a,
+
653  stops[stop_size - 2 - i].getColor().r,
+
654  stops[stop_size - 2 - i].getColor().g,
+
655  stops[stop_size - 2 - i].getColor().b);
+
656  offsets[i] = 1 - stops[stop_size - 2 - i].getOffset();
+
657  }
+
658  fill->SetInterpolationColors(colors, offsets, stop_size);
+
659  applyTransformsOnBrush(gradient->getTransforms(), fill);
+
660  delete[] colors;
+
661  delete[] offsets;
+
662  return fill;
+
663  }
+
664  } else {
+
665  mColor color = shape->getFillColor();
+
666  Gdiplus::SolidBrush* fill = new Gdiplus::SolidBrush(
+
667  Gdiplus::Color(color.a, color.r, color.g, color.b));
+
668  return fill;
+
669  }
+
670  return nullptr;
+
671 }
+
672 
+ +
674  std::vector< std::string > transform_order,
+
675  Gdiplus::LinearGradientBrush*& brush) const {
+
676  for (auto type : transform_order) {
+
677  if (type.find("translate") != std::string::npos) {
+
678  float trans_x = getTranslate(type).first,
+
679  trans_y = getTranslate(type).second;
+
680  brush->TranslateTransform(trans_x, trans_y);
+
681  } else if (type.find("rotate") != std::string::npos) {
+
682  float degree = getRotate(type);
+
683  brush->RotateTranform(degree);
+
684  } else if (type.find("scale") != std::string::npos) {
+
685  if (type.find(",") != std::string::npos) {
+
686  float scale_x = getScaleXY(type).first,
+
687  scale_y = getScaleXY(type).second;
+
688  brush->ScaleTransform(scale_x, scale_y);
+
689  } else {
+
690  float scale = getScale(type);
+
691  brush->ScaleTransform(scale, scale);
+
692  }
+
693  } else if (type.find("matrix") != std::string::npos) {
+
694  float a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
+
695  if (type.find(",") != std::string::npos) {
+
696  type.erase(std::remove(type.begin(), type.end(), ','),
+
697  type.end());
+
698  }
+
699  sscanf(type.c_str(), "matrix(%f %f %f %f %f %f)", &a, &b, &c, &d,
+
700  &e, &f);
+
701  Gdiplus::Matrix matrix(a, b, c, d, e, f);
+
702  brush->SetTransform(&matrix);
+
703  }
+
704  }
+
705 }
+
706 
+ +
708  std::vector< std::string > transform_order,
+
709  Gdiplus::PathGradientBrush*& brush) const {
+
710  for (auto type : transform_order) {
+
711  if (type.find("translate") != std::string::npos) {
+
712  float trans_x = getTranslate(type).first,
+
713  trans_y = getTranslate(type).second;
+
714  brush->TranslateTransform(trans_x, trans_y);
+
715  } else if (type.find("rotate") != std::string::npos) {
+
716  float degree = getRotate(type);
+
717  brush->RotateTransform(degree);
+
718  } else if (type.find("scale") != std::string::npos) {
+
719  if (type.find(",") != std::string::npos) {
+
720  float scale_x = getScaleXY(type).first,
+
721  scale_y = getScaleXY(type).second;
+
722  brush->ScaleTransform(scale_x, scale_y);
+
723  } else {
+
724  float scale = getScale(type);
+
725  brush->ScaleTransform(scale, scale);
+
726  }
+
727  } else if (type.find("matrix") != std::string::npos) {
+
728  float a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
+
729  if (type.find(",") != std::string::npos) {
+
730  type.erase(std::remove(type.begin(), type.end(), ','),
+
731  type.end());
+
732  }
+
733  sscanf(type.c_str(), "matrix(%f %f %f %f %f %f)", &a, &b, &c, &d,
+
734  &e, &f);
+
735  Gdiplus::Matrix matrix(a, b, c, d, e, f);
+
736  brush->SetTransform(&matrix);
+
737  }
+
738  }
+
739 }
+
Represents a circle in 2D space.
Definition: Circle.hpp:13
+
Represents an ellipse in 2D space.
Definition: Ellipse.hpp:12
+
Vector2Df getRadius() const
Gets the radius of the ellipse.
Definition: Ellipse.cpp:13
+
Vector2Df getMaxBound() const override
Gets the maximum bounding box of the shape.
Definition: Ellipse.cpp:20
+
Vector2Df getMinBound() const override
Gets the minimum bounding box of the shape.
Definition: Ellipse.cpp:15
+
A class that represents a gradient.
Definition: Gradient.hpp:18
+
std::vector< Stop > getStops() const
Gets the stops of the gradient.
Definition: Gradient.cpp:7
+
std::string getUnits() const
Gets the units of the gradient.
Definition: Gradient.cpp:13
+
std::pair< Vector2Df, Vector2Df > getPoints() const
Gets the start and end points of the gradient.
Definition: Gradient.cpp:9
+
virtual std::string getClass() const =0
Gets the type of the gradient.
+
std::vector< std::string > getTransforms() const
Gets the transforms of the gradient.
Definition: Gradient.cpp:19
+
A composite class that contains a vector of shape pointers (polymorphic).
Definition: Group.hpp:19
+
std::vector< SVGElement * > getElements() const
Gets the vector of shapes in the composite group.
Definition: Group.cpp:22
+
Represents a line in 2D space.
Definition: Line.hpp:12
+
Vector2Df getDirection() const
Gets the direction of the line.
Definition: Line.cpp:16
+
Represents a path element in 2D space.
Definition: Path.hpp:28
+
std::string getFillRule() const
Gets the current fill rule of the path.
Definition: Path.cpp:14
+
std::vector< PathPoint > getPoints() const
Gets the vector of points in the path.
Definition: Path.cpp:10
+
Represents a polygon in 2D space.
Definition: Polygon.hpp:12
+
Represents a polyline in 2D space.
Definition: Polyline.hpp:12
+
Vector2Df getMinBound() const override
Gets the minimum bounding box of the shape.
Definition: PolyShape.cpp:17
+
const std::vector< Vector2Df > & getPoints() const
Gets the total number of vertices representing the shape.
Definition: PolyShape.cpp:9
+
Vector2Df getMaxBound() const override
Gets the maximum bounding box of the shape.
Definition: PolyShape.cpp:27
+
std::string getFillRule() const
Gets the fill rule of the polyshape.
Definition: PolyShape.cpp:15
+
A class that represents a radial gradient.
+
Vector2Df getRadius() const
Gets the radius of the gradient.
+
Represents a rectangle in 2D space.
Definition: Rect.hpp:13
+
Vector2Df getRadius() const
Gets the radii of the rectangle.
Definition: Rect.cpp:20
+
float getHeight() const
Gets the height of the rectangle.
Definition: Rect.cpp:16
+
float getWidth() const
Gets the width of the rectangle.
Definition: Rect.cpp:12
+
Singleton class responsible for rendering shapes using GDI+.
Definition: Renderer.hpp:24
+
void draw(Gdiplus::Graphics &graphics, Group *group) const
Draws a shape using Gdiplus::Graphics based on its type.
Definition: Renderer.cpp:73
+
void drawPolygon(Gdiplus::Graphics &graphics, Plygon *polygon) const
Draws a polygon shape using Gdiplus::Graphics.
Definition: Renderer.cpp:229
+
void applyTransformsOnBrush(std::vector< std::string > transform_order, Gdiplus::LinearGradientBrush *&brush) const
Utility function to apply a series of transformations to the brush object.
Definition: Renderer.cpp:673
+
void drawPolyline(Gdiplus::Graphics &graphics, Plyline *polyline) const
Draws a polyline shape using Gdiplus::Graphics.
Definition: Renderer.cpp:322
+
void drawPath(Gdiplus::Graphics &graphics, Path *path) const
Draws a path shape using Gdiplus::Graphics.
Definition: Renderer.cpp:365
+
static Renderer * instance
Singleton instance of the Renderer class.
Definition: Renderer.hpp:165
+
Gdiplus::Brush * getBrush(SVGElement *shape, Gdiplus::RectF bound) const
Gets the Gdiplus::brush object for the shape fill.
Definition: Renderer.cpp:583
+
Renderer()
Private constructor for the Renderer class.
Definition: Renderer.cpp:9
+
void drawText(Gdiplus::Graphics &graphics, Text *text) const
Draws text using Gdiplus::Graphics.
Definition: Renderer.cpp:267
+
void applyTransform(std::vector< std::string > transform_order, Gdiplus::Graphics &graphics) const
Utility function to apply a series of transformations to the graphics context.
Definition: Renderer.cpp:50
+
void drawCircle(Gdiplus::Graphics &graphics, Circle *circle) const
Draws a circle shape using Gdiplus::Graphics.
Definition: Renderer.cpp:165
+
void drawLine(Gdiplus::Graphics &graphics, Line *line) const
Draws a line shape using Gdiplus::Graphics.
Definition: Renderer.cpp:110
+
void drawRectangle(Gdiplus::Graphics &graphics, Rect *rectangle) const
Draws a rectangle shape using Gdiplus::Graphics.
Definition: Renderer.cpp:119
+
static Renderer * getInstance()
Gets the singleton instance of the Renderer class.
Definition: Renderer.cpp:11
+
void drawEllipse(Gdiplus::Graphics &graphics, Ell *ellipse) const
Draws an ellipse shape using Gdiplus::Graphics.
Definition: Renderer.cpp:197
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
float getOutlineThickness() const
Gets the outline thickness of the shape.
Definition: SVGElement.cpp:30
+
Vector2Df getPosition() const
Get the current position of the shape.
Definition: SVGElement.cpp:41
+
const mColor & getOutlineColor() const
Gets the outline color of the shape.
Definition: SVGElement.cpp:24
+
Gradient * getGradient() const
Gets the gradient of the shape.
Definition: SVGElement.cpp:81
+
const mColor & getFillColor() const
Gets the fill color of the shape.
Definition: SVGElement.cpp:20
+
Represents text in 2D space.
Definition: Text.hpp:12
+
std::string getAnchor() const
Gets the anchor of the text.
Definition: Text.cpp:20
+
float getFontSize() const
Gets the font size of the text.
Definition: Text.cpp:12
+
std::string getFontStyle() const
Gets the style of the text.
Definition: Text.cpp:24
+
std::string getContent() const
Gets the string of the text.
Definition: Text.cpp:16
+ +
T x
X coordinate of the vector.
Definition: Vector2D.hpp:45
+
T y
Y coordinate of the vector.
Definition: Vector2D.hpp:46
+
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
+
int g
Green component.
Definition: Color.hpp:61
+
int r
Red component.
Definition: Color.hpp:60
+
int a
Alpha (opacity) component.
Definition: Color.hpp:63
+
int b
Blue component.
Definition: Color.hpp:62
+
+
+ + + \ No newline at end of file diff --git a/docs/html/Renderer_8hpp_source.html b/docs/Renderer_8hpp_source.html similarity index 84% rename from docs/html/Renderer_8hpp_source.html rename to docs/Renderer_8hpp_source.html index 1cde977e..844b3601 100644 --- a/docs/html/Renderer_8hpp_source.html +++ b/docs/Renderer_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -161,36 +161,47 @@
119 
126  void drawPath(Gdiplus::Graphics& graphics, Path* path) const;
127 
-
131  Renderer();
-
132 
-
133  static Renderer* instance;
-
134 };
-
135 
-
136 #endif
+
135  Gdiplus::Brush* getBrush(SVGElement* shape, Gdiplus::RectF bound) const;
+
136 
+
145  void applyTransformsOnBrush(std::vector< std::string > transform_order,
+
146  Gdiplus::LinearGradientBrush*& brush) const;
+
147 
+
157  void applyTransformsOnBrush(std::vector< std::string > transform_order,
+
158  Gdiplus::PathGradientBrush*& brush) const;
+
159 
+
163  Renderer();
+
164 
+
165  static Renderer* instance;
+
166 };
+
167 
+
168 #endif
Represents a circle in 2D space.
Definition: Circle.hpp:13
Represents an ellipse in 2D space.
Definition: Ellipse.hpp:12
A composite class that contains a vector of shape pointers (polymorphic).
Definition: Group.hpp:19
Represents a line in 2D space.
Definition: Line.hpp:12
-
Represents a path element in 2D space.
Definition: Path.hpp:24
+
Represents a path element in 2D space.
Definition: Path.hpp:28
Represents a polygon in 2D space.
Definition: Polygon.hpp:12
Represents a polyline in 2D space.
Definition: Polyline.hpp:12
Represents a rectangle in 2D space.
Definition: Rect.hpp:13
Singleton class responsible for rendering shapes using GDI+.
Definition: Renderer.hpp:24
-
void draw(Gdiplus::Graphics &graphics, Group *group) const
Draws a shape using Gdiplus::Graphics based on its type.
Definition: Renderer.cpp:69
-
void drawPolygon(Gdiplus::Graphics &graphics, Plygon *polygon) const
Draws a polygon shape using Gdiplus::Graphics.
Definition: Renderer.cpp:182
-
void drawPolyline(Gdiplus::Graphics &graphics, Plyline *polyline) const
Draws a polyline shape using Gdiplus::Graphics.
Definition: Renderer.cpp:254
-
void drawPath(Gdiplus::Graphics &graphics, Path *path) const
Draws a path shape using Gdiplus::Graphics.
Definition: Renderer.cpp:286
-
static Renderer * instance
Singleton instance of the Renderer class.
Definition: Renderer.hpp:133
-
Renderer()
Private constructor for the Renderer class.
Definition: Renderer.cpp:5
-
void drawText(Gdiplus::Graphics &graphics, Text *text) const
Draws text using Gdiplus::Graphics.
Definition: Renderer.cpp:212
+
void draw(Gdiplus::Graphics &graphics, Group *group) const
Draws a shape using Gdiplus::Graphics based on its type.
Definition: Renderer.cpp:73
+
void drawPolygon(Gdiplus::Graphics &graphics, Plygon *polygon) const
Draws a polygon shape using Gdiplus::Graphics.
Definition: Renderer.cpp:229
+
void applyTransformsOnBrush(std::vector< std::string > transform_order, Gdiplus::LinearGradientBrush *&brush) const
Utility function to apply a series of transformations to the brush object.
Definition: Renderer.cpp:673
+
void drawPolyline(Gdiplus::Graphics &graphics, Plyline *polyline) const
Draws a polyline shape using Gdiplus::Graphics.
Definition: Renderer.cpp:322
+
void drawPath(Gdiplus::Graphics &graphics, Path *path) const
Draws a path shape using Gdiplus::Graphics.
Definition: Renderer.cpp:365
+
static Renderer * instance
Singleton instance of the Renderer class.
Definition: Renderer.hpp:165
+
Gdiplus::Brush * getBrush(SVGElement *shape, Gdiplus::RectF bound) const
Gets the Gdiplus::brush object for the shape fill.
Definition: Renderer.cpp:583
+
Renderer()
Private constructor for the Renderer class.
Definition: Renderer.cpp:9
+
void drawText(Gdiplus::Graphics &graphics, Text *text) const
Draws text using Gdiplus::Graphics.
Definition: Renderer.cpp:267
Renderer(const Renderer &)=delete
Deleted copy constructor to enforce the singleton pattern.
-
void applyTransform(std::vector< std::string > transform_order, Gdiplus::Graphics &graphics) const
Utility function to apply a series of transformations to the graphics context.
Definition: Renderer.cpp:46
-
void drawCircle(Gdiplus::Graphics &graphics, Circle *circle) const
Draws a circle shape using Gdiplus::Graphics.
Definition: Renderer.cpp:145
+
void applyTransform(std::vector< std::string > transform_order, Gdiplus::Graphics &graphics) const
Utility function to apply a series of transformations to the graphics context.
Definition: Renderer.cpp:50
+
void drawCircle(Gdiplus::Graphics &graphics, Circle *circle) const
Draws a circle shape using Gdiplus::Graphics.
Definition: Renderer.cpp:165
void operator=(const Renderer &)=delete
Deleted copy assignment operator to enforce the singleton pattern.
-
void drawLine(Gdiplus::Graphics &graphics, Line *line) const
Draws a line shape using Gdiplus::Graphics.
Definition: Renderer.cpp:106
-
void drawRectangle(Gdiplus::Graphics &graphics, Rect *rectangle) const
Draws a rectangle shape using Gdiplus::Graphics.
Definition: Renderer.cpp:115
-
static Renderer * getInstance()
Gets the singleton instance of the Renderer class.
Definition: Renderer.cpp:7
-
void drawEllipse(Gdiplus::Graphics &graphics, Ell *ellipse) const
Draws an ellipse shape using Gdiplus::Graphics.
Definition: Renderer.cpp:163
+
void drawLine(Gdiplus::Graphics &graphics, Line *line) const
Draws a line shape using Gdiplus::Graphics.
Definition: Renderer.cpp:110
+
void drawRectangle(Gdiplus::Graphics &graphics, Rect *rectangle) const
Draws a rectangle shape using Gdiplus::Graphics.
Definition: Renderer.cpp:119
+
static Renderer * getInstance()
Gets the singleton instance of the Renderer class.
Definition: Renderer.cpp:11
+
void drawEllipse(Gdiplus::Graphics &graphics, Ell *ellipse) const
Draws an ellipse shape using Gdiplus::Graphics.
Definition: Renderer.cpp:197
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
Represents text in 2D space.
Definition: Text.hpp:12
diff --git a/docs/html/SVGElement_8cpp_source.html b/docs/SVGElement_8cpp_source.html similarity index 66% rename from docs/html/SVGElement_8cpp_source.html rename to docs/SVGElement_8cpp_source.html index ecd965b4..9b5ff220 100644 --- a/docs/html/SVGElement_8cpp_source.html +++ b/docs/SVGElement_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -126,83 +126,115 @@
3 #include <iostream>
4 
-
6  : fill(mColor::Black), stroke(mColor::Transparent), stroke_width(1) {}
-
7 
-
8 void SVGElement::setFillColor(const mColor& color) { fill = color; }
-
9 
-
10 const mColor& SVGElement::getFillColor() const { return fill; }
-
11 
-
12 void SVGElement::setOutlineColor(const mColor& color) { stroke = color; }
-
13 
-
14 const mColor& SVGElement::getOutlineColor() const { return stroke; }
-
15 
-
16 void SVGElement::setOutlineThickness(float thickness) {
-
17  stroke_width = thickness;
-
18 }
+
6  : fill(mColor::Black), stroke(mColor::Transparent), stroke_width(1),
+
7  gradient(NULL) {}
+
8 
+
9 SVGElement::SVGElement(const mColor& fill, const mColor& stroke,
+
10  float stroke_width)
+
11  : fill(fill), stroke(stroke), stroke_width(stroke_width), gradient(NULL) {}
+
12 
+
13 SVGElement::SVGElement(const mColor& fill, const mColor& stroke,
+
14  float stroke_width, const Vector2Df& position)
+
15  : fill(fill), stroke(stroke), stroke_width(stroke_width),
+
16  position(position), gradient(NULL) {}
+
17 
+
18 void SVGElement::setFillColor(const mColor& color) { fill = color; }
19 
- +
20 const mColor& SVGElement::getFillColor() const { return fill; }
21 
-
22 void SVGElement::setPosition(float x, float y) {
-
23  position.x = x;
-
24  position.y = y;
-
25 }
-
26 
-
27 void SVGElement::setPosition(const Vector2Df& position) {
- -
29 }
-
30 
- -
32 
-
33 void SVGElement::printData() const {
-
34  std::cout << "Shape: " << getClass() << std::endl;
-
35  std::cout << "Fill: " << getFillColor() << std::endl;
-
36  std::cout << "Stroke: " << getOutlineColor() << std::endl;
-
37  std::cout << "Stroke width: " << getOutlineThickness() << std::endl;
-
38  std::cout << "Position: " << getPosition().x << " " << getPosition().y
-
39  << std::endl;
-
40  std::cout << "Transforms: ";
-
41  for (auto transform : transforms) {
-
42  std::cout << transform << " ";
-
43  }
-
44  std::cout << std::endl;
-
45 }
+
22 void SVGElement::setOutlineColor(const mColor& color) { stroke = color; }
+
23 
+
24 const mColor& SVGElement::getOutlineColor() const { return stroke; }
+
25 
+
26 void SVGElement::setOutlineThickness(float thickness) {
+
27  stroke_width = thickness;
+
28 }
+
29 
+ +
31 
+
32 void SVGElement::setPosition(float x, float y) {
+
33  position.x = x;
+
34  position.y = y;
+
35 }
+
36 
+
37 void SVGElement::setPosition(const Vector2Df& position) {
+ +
39 }
+
40 
+ +
42 
+ +
44 
+
46 
-
47 void SVGElement::setTransforms(const std::vector< std::string >& transforms) {
-
48  this->transforms = transforms;
-
49 }
-
50 
-
51 std::vector< std::string > SVGElement::getTransforms() const {
-
52  return transforms;
-
53 }
-
54 
-
55 void SVGElement::setParent(SVGElement* parent) { this->parent = parent; }
-
56 
- -
58 
- -
Represents an element in an SVG file.
Definition: SVGElement.hpp:17
-
void setTransforms(const std::vector< std::string > &transforms)
Sets the transformations of the shape.
Definition: SVGElement.cpp:47
-
SVGElement * getParent() const
Parent pointer getter.
Definition: SVGElement.cpp:57
-
float getOutlineThickness() const
Gets the outline thickness of the shape.
Definition: SVGElement.cpp:20
-
void setParent(SVGElement *parent)
Parent pointer setter to make the composite design pattern.
Definition: SVGElement.cpp:55
-
Vector2Df getPosition() const
Get the current position of the shape.
Definition: SVGElement.cpp:31
-
std::vector< std::string > getTransforms() const
Gets the transformations of the shape.
Definition: SVGElement.cpp:51
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
void setPosition(float x, float y)
Sets the position of the shape.
Definition: SVGElement.cpp:22
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
void setOutlineThickness(float thickness)
Sets the outline thickness of the shape.
Definition: SVGElement.cpp:16
-
const mColor & getOutlineColor() const
Gets the outline color of the shape.
Definition: SVGElement.cpp:14
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
-
const mColor & getFillColor() const
Gets the fill color of the shape.
Definition: SVGElement.cpp:10
-
void setFillColor(const mColor &color)
Sets the fill color of the shape.
Definition: SVGElement.cpp:8
-
void setOutlineColor(const mColor &color)
Sets the outline color of the shape.
Definition: SVGElement.cpp:12
-
Vector2Df position
Position of the shape.
Definition: SVGElement.hpp:172
+
47 void SVGElement::printData() const {
+
48  std::cout << "Shape: " << getClass() << std::endl;
+
49  std::cout << "Fill: " << getFillColor() << std::endl;
+
50  std::cout << "Stroke: " << getOutlineColor() << std::endl;
+
51  std::cout << "Stroke width: " << getOutlineThickness() << std::endl;
+
52  std::cout << "Position: " << getPosition().x << " " << getPosition().y
+
53  << std::endl;
+
54  std::cout << "Transforms: ";
+
55  for (auto transform : transforms) {
+
56  std::cout << transform << " ";
+
57  }
+
58  std::cout << std::endl;
+
59  if (gradient != NULL)
+
60  std::cout << "Gradient: " << gradient->getClass() << " "
+
61  << gradient->getPoints().first.x << " "
+
62  << gradient->getPoints().first.y << " "
+
63  << gradient->getPoints().second.x << " "
+
64  << gradient->getPoints().second.y << std::endl;
+
65 }
+
66 
+
67 void SVGElement::setTransforms(const std::vector< std::string >& transforms) {
+
68  this->transforms = transforms;
+
69 }
+
70 
+
71 std::vector< std::string > SVGElement::getTransforms() const {
+
72  return transforms;
+
73 }
+
74 
+
75 void SVGElement::setParent(SVGElement* parent) { this->parent = parent; }
+
76 
+ +
78 
+
79 void SVGElement::setGradient(Gradient* gradient) { this->gradient = gradient; }
+
80 
+ +
82 
+ +
A class that represents a gradient.
Definition: Gradient.hpp:18
+
std::pair< Vector2Df, Vector2Df > getPoints() const
Gets the start and end points of the gradient.
Definition: Gradient.cpp:9
+
virtual std::string getClass() const =0
Gets the type of the gradient.
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
void setTransforms(const std::vector< std::string > &transforms)
Sets the transformations of the shape.
Definition: SVGElement.cpp:67
+
virtual Vector2Df getMaxBound() const
Gets the maximum bound of the shape.
Definition: SVGElement.cpp:45
+
virtual Vector2Df getMinBound() const
Gets the minimum bound of the shape.
Definition: SVGElement.cpp:43
+
SVGElement * getParent() const
Parent pointer getter.
Definition: SVGElement.cpp:77
+
float getOutlineThickness() const
Gets the outline thickness of the shape.
Definition: SVGElement.cpp:30
+
void setGradient(Gradient *gradient)
Sets the gradient of the shape.
Definition: SVGElement.cpp:79
+
void setParent(SVGElement *parent)
Parent pointer setter to make the composite design pattern.
Definition: SVGElement.cpp:75
+
Vector2Df getPosition() const
Get the current position of the shape.
Definition: SVGElement.cpp:41
+
std::vector< std::string > getTransforms() const
Gets the transformations of the shape.
Definition: SVGElement.cpp:71
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
void setPosition(float x, float y)
Sets the position of the shape.
Definition: SVGElement.cpp:32
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
void setOutlineThickness(float thickness)
Sets the outline thickness of the shape.
Definition: SVGElement.cpp:26
+
const mColor & getOutlineColor() const
Gets the outline color of the shape.
Definition: SVGElement.cpp:24
+
Gradient * getGradient() const
Gets the gradient of the shape.
Definition: SVGElement.cpp:81
+
Gradient * gradient
Pointer to the gradient that contains the shape.
Definition: SVGElement.hpp:227
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
+
const mColor & getFillColor() const
Gets the fill color of the shape.
Definition: SVGElement.cpp:20
+
void setFillColor(const mColor &color)
Sets the fill color of the shape.
Definition: SVGElement.cpp:18
+
void setOutlineColor(const mColor &color)
Sets the outline color of the shape.
Definition: SVGElement.cpp:22
+
Vector2Df position
Position of the shape.
Definition: SVGElement.hpp:225
SVGElement()
Constructs a Shape object.
Definition: SVGElement.cpp:5
-
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:33
+
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:47
virtual std::string getClass() const =0
Gets the type of the shape.
-
SVGElement * parent
Pointer to the group that contains the shape.
Definition: SVGElement.hpp:166
-
std::vector< std::string > transforms
List of transformations.
Definition: SVGElement.hpp:173
-
virtual void addElement(SVGElement *element)
Adds a shape to the composite group.
Definition: SVGElement.cpp:59
+
SVGElement * parent
Pointer to the group that contains the shape.
Definition: SVGElement.hpp:219
+
std::vector< std::string > transforms
List of transformations.
Definition: SVGElement.hpp:226
+
virtual void addElement(SVGElement *element)
Adds a shape to the composite group.
Definition: SVGElement.cpp:83
T x
X coordinate of the vector.
Definition: Vector2D.hpp:45
T y
Y coordinate of the vector.
Definition: Vector2D.hpp:46
diff --git a/docs/html/SVGElement_8hpp_source.html b/docs/SVGElement_8hpp_source.html similarity index 66% rename from docs/html/SVGElement_8hpp_source.html rename to docs/SVGElement_8hpp_source.html index fda9973f..b3ad07d7 100644 --- a/docs/html/SVGElement_8hpp_source.html +++ b/docs/SVGElement_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -127,82 +127,103 @@
4 #include <vector>
5 
6 #include "Color.hpp"
-
7 #include "Vector2D.hpp"
-
8 
-
17 class SVGElement {
-
18 public:
-
22  virtual ~SVGElement() = default;
-
23 
-
33  virtual std::string getClass() const = 0;
-
34 
-
40  void setFillColor(const mColor& color);
-
41 
-
47  void setOutlineColor(const mColor& color);
-
48 
-
59  void setOutlineThickness(float thickness);
-
60 
-
68  void setPosition(float x, float y);
-
69 
-
77  void setPosition(const Vector2Df& position);
-
78 
-
84  const mColor& getFillColor() const;
-
85 
-
91  const mColor& getOutlineColor() const;
-
92 
-
98  float getOutlineThickness() const;
-
99 
-
106  Vector2Df getPosition() const;
-
107 
-
114  virtual void printData() const;
+
7 #include "Gradient.hpp"
+
8 #include "Vector2D.hpp"
+
9 
+
18 class SVGElement {
+
19 public:
+
23  virtual ~SVGElement() = default;
+
24 
+
34  virtual std::string getClass() const = 0;
+
35 
+
41  void setFillColor(const mColor& color);
+
42 
+
48  void setOutlineColor(const mColor& color);
+
49 
+
60  void setOutlineThickness(float thickness);
+
61 
+
69  void setPosition(float x, float y);
+
70 
+
78  void setPosition(const Vector2Df& position);
+
79 
+
85  const mColor& getFillColor() const;
+
86 
+
92  const mColor& getOutlineColor() const;
+
93 
+
99  float getOutlineThickness() const;
+
100 
+
107  Vector2Df getPosition() const;
+
108 
+
114  virtual Vector2Df getMinBound() const;
115 
-
123  void setTransforms(const std::vector< std::string >& transforms);
-
124 
-
132  std::vector< std::string > getTransforms() const;
-
133 
-
140  void setParent(SVGElement* parent);
-
141 
-
148  SVGElement* getParent() const;
-
149 
-
156  virtual void addElement(SVGElement* element);
-
157 
-
158 protected:
-
164  SVGElement();
-
165 
- -
167 
-
168 private:
- - -
171  float stroke_width;
- -
173  std::vector< std::string > transforms;
-
174 };
-
175 
-
176 #endif // SVG_ELEMENT_HPP_
-
Represents an element in an SVG file.
Definition: SVGElement.hpp:17
-
void setTransforms(const std::vector< std::string > &transforms)
Sets the transformations of the shape.
Definition: SVGElement.cpp:47
-
SVGElement * getParent() const
Parent pointer getter.
Definition: SVGElement.cpp:57
-
float getOutlineThickness() const
Gets the outline thickness of the shape.
Definition: SVGElement.cpp:20
-
void setParent(SVGElement *parent)
Parent pointer setter to make the composite design pattern.
Definition: SVGElement.cpp:55
-
Vector2Df getPosition() const
Get the current position of the shape.
Definition: SVGElement.cpp:31
+
121  virtual Vector2Df getMaxBound() const;
+
122 
+
129  virtual void printData() const;
+
130 
+
138  void setTransforms(const std::vector< std::string >& transforms);
+
139 
+
147  std::vector< std::string > getTransforms() const;
+
148 
+
155  void setParent(SVGElement* parent);
+
156 
+
163  SVGElement* getParent() const;
+
164 
+ +
172 
+
179  Gradient* getGradient() const;
+
180 
+
187  virtual void addElement(SVGElement* element);
+
188 
+
189 protected:
+
195  SVGElement();
+
196 
+
205  SVGElement(const mColor& fill, const mColor& stroke, float stroke_width);
+
206 
+
216  SVGElement(const mColor& fill, const mColor& stroke, float stroke_width,
+
217  const Vector2Df& position);
+
218 
+ +
220 
+
221 private:
+ + +
224  float stroke_width;
+ +
226  std::vector< std::string > transforms;
+ +
228 };
+
229 
+
230 #endif // SVG_ELEMENT_HPP_
+
A class that represents a gradient.
Definition: Gradient.hpp:18
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
void setTransforms(const std::vector< std::string > &transforms)
Sets the transformations of the shape.
Definition: SVGElement.cpp:67
+
virtual Vector2Df getMaxBound() const
Gets the maximum bound of the shape.
Definition: SVGElement.cpp:45
+
virtual Vector2Df getMinBound() const
Gets the minimum bound of the shape.
Definition: SVGElement.cpp:43
+
SVGElement * getParent() const
Parent pointer getter.
Definition: SVGElement.cpp:77
+
float getOutlineThickness() const
Gets the outline thickness of the shape.
Definition: SVGElement.cpp:30
+
void setGradient(Gradient *gradient)
Sets the gradient of the shape.
Definition: SVGElement.cpp:79
+
void setParent(SVGElement *parent)
Parent pointer setter to make the composite design pattern.
Definition: SVGElement.cpp:75
+
Vector2Df getPosition() const
Get the current position of the shape.
Definition: SVGElement.cpp:41
virtual ~SVGElement()=default
Virtual constructor.
-
std::vector< std::string > getTransforms() const
Gets the transformations of the shape.
Definition: SVGElement.cpp:51
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
void setPosition(float x, float y)
Sets the position of the shape.
Definition: SVGElement.cpp:22
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
void setOutlineThickness(float thickness)
Sets the outline thickness of the shape.
Definition: SVGElement.cpp:16
-
const mColor & getOutlineColor() const
Gets the outline color of the shape.
Definition: SVGElement.cpp:14
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
-
const mColor & getFillColor() const
Gets the fill color of the shape.
Definition: SVGElement.cpp:10
-
void setFillColor(const mColor &color)
Sets the fill color of the shape.
Definition: SVGElement.cpp:8
-
void setOutlineColor(const mColor &color)
Sets the outline color of the shape.
Definition: SVGElement.cpp:12
-
Vector2Df position
Position of the shape.
Definition: SVGElement.hpp:172
+
std::vector< std::string > getTransforms() const
Gets the transformations of the shape.
Definition: SVGElement.cpp:71
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
void setPosition(float x, float y)
Sets the position of the shape.
Definition: SVGElement.cpp:32
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
void setOutlineThickness(float thickness)
Sets the outline thickness of the shape.
Definition: SVGElement.cpp:26
+
const mColor & getOutlineColor() const
Gets the outline color of the shape.
Definition: SVGElement.cpp:24
+
Gradient * getGradient() const
Gets the gradient of the shape.
Definition: SVGElement.cpp:81
+
Gradient * gradient
Pointer to the gradient that contains the shape.
Definition: SVGElement.hpp:227
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
+
const mColor & getFillColor() const
Gets the fill color of the shape.
Definition: SVGElement.cpp:20
+
void setFillColor(const mColor &color)
Sets the fill color of the shape.
Definition: SVGElement.cpp:18
+
void setOutlineColor(const mColor &color)
Sets the outline color of the shape.
Definition: SVGElement.cpp:22
+
Vector2Df position
Position of the shape.
Definition: SVGElement.hpp:225
SVGElement()
Constructs a Shape object.
Definition: SVGElement.cpp:5
-
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:33
+
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:47
virtual std::string getClass() const =0
Gets the type of the shape.
-
SVGElement * parent
Pointer to the group that contains the shape.
Definition: SVGElement.hpp:166
-
std::vector< std::string > transforms
List of transformations.
Definition: SVGElement.hpp:173
-
virtual void addElement(SVGElement *element)
Adds a shape to the composite group.
Definition: SVGElement.cpp:59
+
SVGElement * parent
Pointer to the group that contains the shape.
Definition: SVGElement.hpp:219
+
std::vector< std::string > transforms
List of transformations.
Definition: SVGElement.hpp:226
+
virtual void addElement(SVGElement *element)
Adds a shape to the composite group.
Definition: SVGElement.cpp:83
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/html/Shape_8cpp_source.html b/docs/Shape_8cpp_source.html similarity index 100% rename from docs/html/Shape_8cpp_source.html rename to docs/Shape_8cpp_source.html diff --git a/docs/html/Shape_8hpp_source.html b/docs/Shape_8hpp_source.html similarity index 100% rename from docs/html/Shape_8hpp_source.html rename to docs/Shape_8hpp_source.html diff --git a/docs/Stop_8cpp_source.html b/docs/Stop_8cpp_source.html new file mode 100644 index 00000000..93a56a78 --- /dev/null +++ b/docs/Stop_8cpp_source.html @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/graphics/Stop.cpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Stop.cpp
+
+
+
1 #include "Stop.hpp"
+
2 
+
3 Stop::Stop(const mColor& color, float offset) : color(color), offset(offset) {}
+
4 
+
5 mColor Stop::getColor() const { return color; }
+
6 
+
7 float Stop::getOffset() const { return offset; }
+
mColor getColor() const
Gets the color of the stop.
Definition: Stop.cpp:5
+
float offset
The offset of the stop.
Definition: Stop.hpp:37
+
Stop(const mColor &color, float offset)
Constructs a Stop object.
Definition: Stop.cpp:3
+
float getOffset() const
Gets the offset of the stop.
Definition: Stop.cpp:7
+
mColor color
The color of the stop.
Definition: Stop.hpp:36
+
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
+
+
+ + + \ No newline at end of file diff --git a/docs/Stop_8hpp_source.html b/docs/Stop_8hpp_source.html new file mode 100644 index 00000000..072759e6 --- /dev/null +++ b/docs/Stop_8hpp_source.html @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + +svg-reader: src/graphics/Stop.hpp Source File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Stop.hpp
+
+
+
1 #ifndef STOP_HPP_
+
2 #define STOP_HPP_
+
3 
+
4 #include "Color.hpp"
+
5 
+
11 class Stop {
+
12 public:
+
19  Stop(const mColor& color, float offset);
+
20 
+
26  mColor getColor() const;
+
27 
+
33  float getOffset() const;
+
34 
+
35 private:
+ +
37  float offset;
+
38 };
+
39 
+
40 #endif
+
A class that represents a stop.
Definition: Stop.hpp:11
+
mColor getColor() const
Gets the color of the stop.
Definition: Stop.cpp:5
+
float offset
The offset of the stop.
Definition: Stop.hpp:37
+
Stop(const mColor &color, float offset)
Constructs a Stop object.
Definition: Stop.cpp:3
+
float getOffset() const
Gets the offset of the stop.
Definition: Stop.cpp:7
+
mColor color
The color of the stop.
Definition: Stop.hpp:36
+
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
+
+
+ + + \ No newline at end of file diff --git a/docs/html/Text_8cpp_source.html b/docs/Text_8cpp_source.html similarity index 76% rename from docs/html/Text_8cpp_source.html rename to docs/Text_8cpp_source.html index 38ce2570..02a5666b 100644 --- a/docs/html/Text_8cpp_source.html +++ b/docs/Text_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -125,59 +125,49 @@
2 
3 Text::Text(Vector2Df pos, std::string text, float font_size, const mColor &fill,
4  const mColor &stroke, float stroke_width)
-
5  : content(text), font_size(font_size) {
- - - -
9  setPosition(pos);
-
10 }
+
5  : SVGElement(fill, stroke, stroke_width, pos), content(text),
+
6  font_size(font_size) {}
+
7 
+
8 std::string Text::getClass() const { return "Text"; }
+
9 
+
10 void Text::setFontSize(float font_size) { this->font_size = font_size; }
11 
-
12 std::string Text::getClass() const { return "Text"; }
+
12 float Text::getFontSize() const { return font_size; }
13 
-
14 void Text::setFontSize(float font_size) { this->font_size = font_size; }
+
14 void Text::setContent(std::string content) { this->content = content; }
15 
-
16 float Text::getFontSize() const { return font_size; }
+
16 std::string Text::getContent() const { return content; }
17 
-
18 void Text::setContent(std::string content) { this->content = content; }
+
18 void Text::setAnchor(std::string anchor) { this->anchor = anchor; }
19 
-
20 std::string Text::getContent() const { return content; }
+
20 std::string Text::getAnchor() const { return anchor; }
21 
-
22 void Text::setAnchor(std::string anchor) { this->anchor = anchor; }
+
22 void Text::setFontStyle(std::string font_style) { this->style = font_style; }
23 
-
24 std::string Text::getAnchor() const { return anchor; }
+
24 std::string Text::getFontStyle() const { return style; }
25 
-
26 void Text::setFontStyle(std::string font_style) { this->style = font_style; }
-
27 
-
28 std::string Text::getFontStyle() const { return style; }
-
29 
-
30 void Text::printData() const {
- -
32  std::cout << "Content: " << getContent() << std::endl;
-
33  std::cout << "Font size: " << getFontSize() << std::endl;
-
34 }
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
void setPosition(float x, float y)
Sets the position of the shape.
Definition: SVGElement.cpp:22
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
void setOutlineThickness(float thickness)
Sets the outline thickness of the shape.
Definition: SVGElement.cpp:16
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
-
void setFillColor(const mColor &color)
Sets the fill color of the shape.
Definition: SVGElement.cpp:8
-
void setOutlineColor(const mColor &color)
Sets the outline color of the shape.
Definition: SVGElement.cpp:12
-
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:33
-
void setContent(std::string content)
Sets the string of the text.
Definition: Text.cpp:18
+
26 void Text::printData() const {
+ +
28  std::cout << "Content: " << getContent() << std::endl;
+
29  std::cout << "Font size: " << getFontSize() << std::endl;
+
30 }
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:47
+
void setContent(std::string content)
Sets the string of the text.
Definition: Text.cpp:14
std::string style
Style of the text.
Definition: Text.hpp:17
std::string anchor
Anchor of the text.
Definition: Text.hpp:16
-
std::string getClass() const override
Gets the type of the shape.
Definition: Text.cpp:12
-
void printData() const override
Prints the data of the text.
Definition: Text.cpp:30
-
std::string getAnchor() const
Gets the anchor of the text.
Definition: Text.cpp:24
-
void setFontStyle(std::string style)
Sets the style of the text.
Definition: Text.cpp:26
-
void setFontSize(float font_size)
Sets the font size of the text.
Definition: Text.cpp:14
-
float getFontSize() const
Gets the font size of the text.
Definition: Text.cpp:16
+
std::string getClass() const override
Gets the type of the shape.
Definition: Text.cpp:8
+
void printData() const override
Prints the data of the text.
Definition: Text.cpp:26
+
std::string getAnchor() const
Gets the anchor of the text.
Definition: Text.cpp:20
+
void setFontStyle(std::string style)
Sets the style of the text.
Definition: Text.cpp:22
+
void setFontSize(float font_size)
Sets the font size of the text.
Definition: Text.cpp:10
+
float getFontSize() const
Gets the font size of the text.
Definition: Text.cpp:12
float font_size
Font size of the text.
Definition: Text.hpp:15
-
std::string getFontStyle() const
Gets the style of the text.
Definition: Text.cpp:28
+
std::string getFontStyle() const
Gets the style of the text.
Definition: Text.cpp:24
Text(Vector2Df pos, std::string text, float font_size, const mColor &fill, const mColor &stroke, float stroke_width)
Constructs a Text object.
Definition: Text.cpp:3
std::string content
Text element.
Definition: Text.hpp:14
-
void setAnchor(std::string anchor)
Sets the anchor of the text.
Definition: Text.cpp:22
-
std::string getContent() const
Gets the string of the text.
Definition: Text.cpp:20
+
void setAnchor(std::string anchor)
Sets the anchor of the text.
Definition: Text.cpp:18
+
std::string getContent() const
Gets the string of the text.
Definition: Text.cpp:16
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/html/Text_8hpp_source.html b/docs/Text_8hpp_source.html similarity index 88% rename from docs/html/Text_8hpp_source.html rename to docs/Text_8hpp_source.html index 03dab97d..2268a2b3 100644 --- a/docs/html/Text_8hpp_source.html +++ b/docs/Text_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -139,53 +139,46 @@
30 
36  std::string getClass() const override;
37 
-
38  // /**
-
39  // * @brief Renders the shape using the given renderer.
-
40  // *
-
41  // * @param renderer The renderer to be used for rendering the shape.
-
42  // */
-
43  // void render(Renderer &renderer) const override;
+
43  void setContent(std::string content);
44 
-
50  void setContent(std::string content);
+
50  std::string getContent() const;
51 
-
57  std::string getContent() const;
+
57  void setFontSize(float font_size);
58 
-
64  void setFontSize(float font_size);
+
64  float getFontSize() const;
65 
-
71  float getFontSize() const;
+
71  void setAnchor(std::string anchor);
72 
-
78  void setAnchor(std::string anchor);
+
78  std::string getAnchor() const;
79 
-
85  std::string getAnchor() const;
+
85  void setFontStyle(std::string style);
86 
-
92  void setFontStyle(std::string style);
+
92  std::string getFontStyle() const;
93 
-
99  std::string getFontStyle() const;
-
100 
-
104  void printData() const override;
-
105 };
-
106 
-
107 #endif // TEXT_HPP_
-
Represents an element in an SVG file.
Definition: SVGElement.hpp:17
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
+
97  void printData() const override;
+
98 };
+
99 
+
100 #endif // TEXT_HPP_
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
Represents text in 2D space.
Definition: Text.hpp:12
-
void setContent(std::string content)
Sets the string of the text.
Definition: Text.cpp:18
+
void setContent(std::string content)
Sets the string of the text.
Definition: Text.cpp:14
std::string style
Style of the text.
Definition: Text.hpp:17
std::string anchor
Anchor of the text.
Definition: Text.hpp:16
-
std::string getClass() const override
Gets the type of the shape.
Definition: Text.cpp:12
-
void printData() const override
Prints the data of the text.
Definition: Text.cpp:30
-
std::string getAnchor() const
Gets the anchor of the text.
Definition: Text.cpp:24
-
void setFontStyle(std::string style)
Sets the style of the text.
Definition: Text.cpp:26
-
void setFontSize(float font_size)
Sets the font size of the text.
Definition: Text.cpp:14
-
float getFontSize() const
Gets the font size of the text.
Definition: Text.cpp:16
+
std::string getClass() const override
Gets the type of the shape.
Definition: Text.cpp:8
+
void printData() const override
Prints the data of the text.
Definition: Text.cpp:26
+
std::string getAnchor() const
Gets the anchor of the text.
Definition: Text.cpp:20
+
void setFontStyle(std::string style)
Sets the style of the text.
Definition: Text.cpp:22
+
void setFontSize(float font_size)
Sets the font size of the text.
Definition: Text.cpp:10
+
float getFontSize() const
Gets the font size of the text.
Definition: Text.cpp:12
float font_size
Font size of the text.
Definition: Text.hpp:15
-
std::string getFontStyle() const
Gets the style of the text.
Definition: Text.cpp:28
+
std::string getFontStyle() const
Gets the style of the text.
Definition: Text.cpp:24
Text(Vector2Df pos, std::string text, float font_size, const mColor &fill, const mColor &stroke, float stroke_width)
Constructs a Text object.
Definition: Text.cpp:3
std::string content
Text element.
Definition: Text.hpp:14
-
void setAnchor(std::string anchor)
Sets the anchor of the text.
Definition: Text.cpp:22
-
std::string getContent() const
Gets the string of the text.
Definition: Text.cpp:20
+
void setAnchor(std::string anchor)
Sets the anchor of the text.
Definition: Text.cpp:18
+
std::string getContent() const
Gets the string of the text.
Definition: Text.cpp:16
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
diff --git a/docs/html/Vector2D_8hpp_source.html b/docs/Vector2D_8hpp_source.html similarity index 99% rename from docs/html/Vector2D_8hpp_source.html rename to docs/Vector2D_8hpp_source.html index 8bbfe4b2..c762dd15 100644 --- a/docs/html/Vector2D_8hpp_source.html +++ b/docs/Vector2D_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
diff --git a/docs/html/Viewer_8cpp_source.html b/docs/Viewer_8cpp_source.html similarity index 90% rename from docs/html/Viewer_8cpp_source.html rename to docs/Viewer_8cpp_source.html index 0b4c42c3..4ba4abdc 100644 --- a/docs/html/Viewer_8cpp_source.html +++ b/docs/Viewer_8cpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -222,22 +222,33 @@
99  break;
100  }
101 }
+
102 
+
103 void Viewer::getWindowSize(HWND hWnd) const {
+
104  RECT rect;
+
105  GetClientRect(hWnd, &rect);
+
106  instance->window_size.x = static_cast< float >(rect.right - rect.left);
+
107  instance->window_size.y = static_cast< float >(rect.bottom - rect.top);
+
108 }
+
T x
X coordinate of the vector.
Definition: Vector2D.hpp:45
+
T y
Y coordinate of the vector.
Definition: Vector2D.hpp:46
Represents a viewer for rendering and interacting with a scene.
Definition: Viewer.hpp:16
void handleLeftButtonDown(LPARAM lParam)
Handles the left button down event for initiating dragging.
Definition: Viewer.cpp:74
float offset_y
Y-coordinate offset of the viewer.
Definition: Viewer.hpp:19
~Viewer()
Destructor for the Viewer class.
Definition: Viewer.cpp:19
float offset_x
X-coordinate offset of the viewer.
Definition: Viewer.hpp:18
-
bool is_dragging
Flag indicating whether the mouse is being dragged.
Definition: Viewer.hpp:74
+
bool is_dragging
Flag indicating whether the mouse is being dragged.
Definition: Viewer.hpp:82
float zoom_factor
Zoom factor for scaling the view.
Definition: Viewer.hpp:20
-
static Viewer * instance
Singleton instance of the Viewer class.
Definition: Viewer.hpp:55
+
static Viewer * instance
Singleton instance of the Viewer class.
Definition: Viewer.hpp:63
bool needs_repaint
Definition: Viewer.hpp:22
void handleKeyEvent(WPARAM wParam)
Handles keyboard events.
Definition: Viewer.cpp:47
-
POINT last_mouse_pos
Last recorded mouse position.
Definition: Viewer.hpp:75
+
POINT last_mouse_pos
Last recorded mouse position.
Definition: Viewer.hpp:83
void handleMouseMove(LPARAM lParam)
Handles the mouse move event for panning.
Definition: Viewer.cpp:59
static Viewer * getInstance()
Gets the singleton instance of the Viewer class.
Definition: Viewer.cpp:4
float rotate_angle
Rotation angle of the view.
Definition: Viewer.hpp:21
void handleKeyDown(WPARAM wParam)
Handles the key down event for rotating.
Definition: Viewer.cpp:90
void handleMouseWheel(WPARAM wParam)
Handles the mouse wheel event for zooming.
Definition: Viewer.cpp:49
+
Vector2Df window_size
Size of the window.
Definition: Viewer.hpp:24
+
void getWindowSize(HWND hWnd) const
Get the current window size.
Definition: Viewer.cpp:103
Viewer()
Private constructor for the Viewer class.
Definition: Viewer.cpp:11
void handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam)
Handles mouse events, such as wheel, move, left button down, and left button up.
Definition: Viewer.cpp:26
void handleLeftButtonUp()
Handles the left button up event for ending dragging.
Definition: Viewer.cpp:81
diff --git a/docs/html/Viewer_8hpp_source.html b/docs/Viewer_8hpp_source.html similarity index 81% rename from docs/html/Viewer_8hpp_source.html rename to docs/Viewer_8hpp_source.html index f24da9b5..74c26a2f 100644 --- a/docs/html/Viewer_8hpp_source.html +++ b/docs/Viewer_8hpp_source.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -128,61 +128,67 @@
5 
16 class Viewer {
17 public:
-
18  float offset_x;
-
19  float offset_y;
-
20  float zoom_factor;
-
21  float rotate_angle;
- -
24 
-
30  static Viewer* getInstance();
-
31 
-
35  ~Viewer();
-
36 
-
45  void handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam);
-
46 
-
52  void handleKeyEvent(WPARAM wParam);
-
53 
-
54 private:
-
55  static Viewer* instance;
-
56 
-
60  Viewer();
+
18  float offset_x;
+
19  float offset_y;
+
20  float zoom_factor;
+
21  float rotate_angle;
+ + +
25 
+
31  static Viewer* getInstance();
+
32 
+
36  ~Viewer();
+
37 
+
46  void handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam);
+
47 
+
53  void handleKeyEvent(WPARAM wParam);
+
54 
+
60  void getWindowSize(HWND hWnd) const;
61 
-
66  Viewer(const Viewer&) = delete;
-
67 
-
72  void operator=(const Viewer&) = delete;
-
73 
-
74  bool is_dragging;
- -
76 
-
82  void handleMouseWheel(WPARAM wParam);
-
83 
-
89  void handleMouseMove(LPARAM lParam);
-
90 
-
96  void handleLeftButtonDown(LPARAM lParam);
-
97 
-
101  void handleLeftButtonUp();
-
102 
-
108  void handleKeyDown(WPARAM wParam);
-
109 };
+
62 private:
+
63  static Viewer* instance;
+
64 
+
68  Viewer();
+
69 
+
74  Viewer(const Viewer&) = delete;
+
75 
+
80  void operator=(const Viewer&) = delete;
+
81 
+
82  bool is_dragging;
+ +
84 
+
90  void handleMouseWheel(WPARAM wParam);
+
91 
+
97  void handleMouseMove(LPARAM lParam);
+
98 
+
104  void handleLeftButtonDown(LPARAM lParam);
+
105 
+
109  void handleLeftButtonUp();
110 
-
111 #endif // VIEWER_HPP_
+
116  void handleKeyDown(WPARAM wParam);
+
117 };
+
118 
+
119 #endif // VIEWER_HPP_
+
Represents a viewer for rendering and interacting with a scene.
Definition: Viewer.hpp:16
void handleLeftButtonDown(LPARAM lParam)
Handles the left button down event for initiating dragging.
Definition: Viewer.cpp:74
float offset_y
Y-coordinate offset of the viewer.
Definition: Viewer.hpp:19
~Viewer()
Destructor for the Viewer class.
Definition: Viewer.cpp:19
void operator=(const Viewer &)=delete
Copy assignment operator for the Viewer class (deleted to enforce singleton pattern).
float offset_x
X-coordinate offset of the viewer.
Definition: Viewer.hpp:18
-
bool is_dragging
Flag indicating whether the mouse is being dragged.
Definition: Viewer.hpp:74
+
bool is_dragging
Flag indicating whether the mouse is being dragged.
Definition: Viewer.hpp:82
float zoom_factor
Zoom factor for scaling the view.
Definition: Viewer.hpp:20
-
static Viewer * instance
Singleton instance of the Viewer class.
Definition: Viewer.hpp:55
+
static Viewer * instance
Singleton instance of the Viewer class.
Definition: Viewer.hpp:63
bool needs_repaint
Definition: Viewer.hpp:22
void handleKeyEvent(WPARAM wParam)
Handles keyboard events.
Definition: Viewer.cpp:47
-
POINT last_mouse_pos
Last recorded mouse position.
Definition: Viewer.hpp:75
+
POINT last_mouse_pos
Last recorded mouse position.
Definition: Viewer.hpp:83
void handleMouseMove(LPARAM lParam)
Handles the mouse move event for panning.
Definition: Viewer.cpp:59
static Viewer * getInstance()
Gets the singleton instance of the Viewer class.
Definition: Viewer.cpp:4
float rotate_angle
Rotation angle of the view.
Definition: Viewer.hpp:21
void handleKeyDown(WPARAM wParam)
Handles the key down event for rotating.
Definition: Viewer.cpp:90
void handleMouseWheel(WPARAM wParam)
Handles the mouse wheel event for zooming.
Definition: Viewer.cpp:49
+
Vector2Df window_size
Size of the window.
Definition: Viewer.hpp:24
+
void getWindowSize(HWND hWnd) const
Get the current window size.
Definition: Viewer.cpp:103
Viewer()
Private constructor for the Viewer class.
Definition: Viewer.cpp:11
Viewer(const Viewer &)=delete
Copy constructor for the Viewer class (deleted to enforce singleton pattern).
void handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam)
Handles mouse events, such as wheel, move, left button down, and left button up.
Definition: Viewer.cpp:26
diff --git a/docs/html/annotated.html b/docs/annotated.html similarity index 83% rename from docs/html/annotated.html rename to docs/annotated.html index 7084426f..b04e34b9 100644 --- a/docs/html/annotated.html +++ b/docs/annotated.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -125,21 +125,25 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
 CCircleRepresents a circle in 2D space
 CEllRepresents an ellipse in 2D space
 CGroupA composite class that contains a vector of shape pointers (polymorphic)
 CLineRepresents a line in 2D space
 CmColorUtility class for manipulating RGBA mColors
 CParserTo manipulate and parse an SVG file
 CPathRepresents a path element in 2D space
 CPathPointA struct that contains a point and a type of point
 CPlygonRepresents a polygon in 2D space
 CPlylineRepresents a polyline in 2D space
 CPolyShapeAbstract base class for polygon and polyline shapes in 2D space
 CRectRepresents a rectangle in 2D space
 CRendererSingleton class responsible for rendering shapes using GDI+
 CSVGElementRepresents an element in an SVG file
 CTextRepresents text in 2D space
 CVector2DUtility template class for manipulating 2-dimensional vectors
 CViewerRepresents a viewer for rendering and interacting with a scene
 CGradientA class that represents a gradient
 CGroupA composite class that contains a vector of shape pointers (polymorphic)
 CLineRepresents a line in 2D space
 CLinearGradientA class that represents a linear gradient
 CmColorUtility class for manipulating RGBA mColors
 CParserTo manipulate and parse an SVG file
 CPathRepresents a path element in 2D space
 CPathPointA struct that contains a point and a type of point
 CPlygonRepresents a polygon in 2D space
 CPlylineRepresents a polyline in 2D space
 CPolyShapeAbstract base class for polygon and polyline shapes in 2D space
 CRadialGradientA class that represents a radial gradient
 CRectRepresents a rectangle in 2D space
 CRendererSingleton class responsible for rendering shapes using GDI+
 CStopA class that represents a stop
 CSVGElementRepresents an element in an SVG file
 CTextRepresents text in 2D space
 CVector2DUtility template class for manipulating 2-dimensional vectors
 CViewerRepresents a viewer for rendering and interacting with a scene
diff --git a/docs/html/annotated_dup.js b/docs/annotated_dup.js similarity index 78% rename from docs/html/annotated_dup.js rename to docs/annotated_dup.js index cc3828f3..1387628c 100644 --- a/docs/html/annotated_dup.js +++ b/docs/annotated_dup.js @@ -2,8 +2,10 @@ var annotated_dup = [ [ "Circle", "classCircle.html", "classCircle" ], [ "Ell", "classEll.html", "classEll" ], + [ "Gradient", "classGradient.html", "classGradient" ], [ "Group", "classGroup.html", "classGroup" ], [ "Line", "classLine.html", "classLine" ], + [ "LinearGradient", "classLinearGradient.html", "classLinearGradient" ], [ "mColor", "classmColor.html", "classmColor" ], [ "Parser", "classParser.html", "classParser" ], [ "Path", "classPath.html", "classPath" ], @@ -11,8 +13,10 @@ var annotated_dup = [ "Plygon", "classPlygon.html", "classPlygon" ], [ "Plyline", "classPlyline.html", "classPlyline" ], [ "PolyShape", "classPolyShape.html", "classPolyShape" ], + [ "RadialGradient", "classRadialGradient.html", "classRadialGradient" ], [ "Rect", "classRect.html", "classRect" ], [ "Renderer", "classRenderer.html", "classRenderer" ], + [ "Stop", "classStop.html", "classStop" ], [ "SVGElement", "classSVGElement.html", "classSVGElement" ], [ "Text", "classText.html", "classText" ], [ "Vector2D", "classVector2D.html", "classVector2D" ], diff --git a/docs/html/bc_s.png b/docs/bc_s.png similarity index 100% rename from docs/html/bc_s.png rename to docs/bc_s.png diff --git a/docs/html/bdwn.png b/docs/bdwn.png similarity index 100% rename from docs/html/bdwn.png rename to docs/bdwn.png diff --git a/docs/html/classEll-members.html b/docs/classCircle-members.html similarity index 73% rename from docs/html/classEll-members.html rename to docs/classCircle-members.html index a28533f7..c6112f2c 100644 --- a/docs/html/classEll-members.html +++ b/docs/classCircle-members.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -98,7 +98,7 @@
@@ -118,28 +118,34 @@
-
Ell Member List
+
Circle Member List
-

This is the complete list of members for Ell, including all inherited members.

+

This is the complete list of members for Circle, including all inherited members.

- - - - + + + + + + + + - - - - - + + + + + + + @@ -150,6 +156,8 @@ + +
addElement(SVGElement *element)SVGElementvirtual
Ell(const Vector2Df &radius, const Vector2Df &center, mColor fill, mColor stroke, float stroke_width)Ell
fillSVGElementprivate
getClass() const overrideEllvirtual
getFillColor() constSVGElement
Circle(float radius, const Vector2Df &center, mColor fill, mColor stroke, float stroke_width)Circle
Ell(const Vector2Df &radius, const Vector2Df &center, mColor fill, mColor stroke, float stroke_width)Ell
fillSVGElementprivate
getClass() const overrideCirclevirtual
getFillColor() constSVGElement
getGradient() constSVGElement
getMaxBound() const overrideEllvirtual
getMinBound() const overrideEllvirtual
getOutlineColor() constSVGElement
getOutlineThickness() constSVGElement
getParent() constSVGElement
getPosition() constSVGElement
getRadius() constEll
getTransforms() constSVGElement
parentSVGElementprotected
positionSVGElementprivate
printData() const overrideEllvirtual
radiusEllprivate
setFillColor(const mColor &color)SVGElement
gradientSVGElementprivate
parentSVGElementprotected
positionSVGElementprivate
printData() const overrideEllvirtual
radiusEllprivate
setFillColor(const mColor &color)SVGElement
setGradient(Gradient *gradient)SVGElement
setOutlineColor(const mColor &color)SVGElement
setOutlineThickness(float thickness)SVGElement
setParent(SVGElement *parent)SVGElement
strokeSVGElementprivate
stroke_widthSVGElementprivate
SVGElement()SVGElementprotected
SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)SVGElementprotected
SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)SVGElementprotected
transformsSVGElementprivate
~SVGElement()=defaultSVGElementvirtual
diff --git a/docs/html/classCircle.html b/docs/classCircle.html similarity index 86% rename from docs/html/classCircle.html rename to docs/classCircle.html index 116aa6ad..52d9c32e 100644 --- a/docs/html/classCircle.html +++ b/docs/classCircle.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -137,7 +137,8 @@
Collaboration diagram for Circle:
-
+
+
[legend]
+ + + + + + @@ -208,6 +215,12 @@ + + + + + + @@ -218,6 +231,12 @@ + + + + + + @@ -290,9 +309,9 @@

Ell(const Vector2Df &radius, const Vector2Df &center, mColor fill, mColor stroke, float stroke_width)
Constructs an Ellipse object.
Definition: Ellipse.cpp:5
Vector2Df radius
Radii of the ellipse in the x and y directions.
Definition: Ellipse.hpp:14
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
diff --git a/docs/html/classCircle.js b/docs/classCircle.js similarity index 100% rename from docs/html/classCircle.js rename to docs/classCircle.js diff --git a/docs/classCircle__coll__graph.map b/docs/classCircle__coll__graph.map new file mode 100644 index 00000000..8bfec849 --- /dev/null +++ b/docs/classCircle__coll__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/classCircle__coll__graph.md5 b/docs/classCircle__coll__graph.md5 new file mode 100644 index 00000000..1d81256a --- /dev/null +++ b/docs/classCircle__coll__graph.md5 @@ -0,0 +1 @@ +dc7a97bc728dee7fc64f4ca5dacec54f \ No newline at end of file diff --git a/docs/html/classCircle__coll__graph.png b/docs/classCircle__coll__graph.png similarity index 100% rename from docs/html/classCircle__coll__graph.png rename to docs/classCircle__coll__graph.png diff --git a/docs/classCircle__coll__graph.svg b/docs/classCircle__coll__graph.svg new file mode 100644 index 00000000..afadbf42 --- /dev/null +++ b/docs/classCircle__coll__graph.svg @@ -0,0 +1,129 @@ + + + + + + +Circle + + +Node1 + + +Circle + + + + + +Node2 + + +Ell + + + + + +Node2->Node1 + + + + + +Node3 + + +SVGElement + + + + + +Node3->Node2 + + + + + +Node3->Node3 + + + parent + + + +Node4 + + +Vector2D< float > + + + + + +Node4->Node2 + + + radius + + + +Node4->Node3 + + + position + + + +Node5 + + +Gradient + + + + + +Node5->Node3 + + + gradient + + + +Node6 + + +mColor + + + + + +Node6->Node3 + + + fill +stroke + + + +Node6->Node6 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/html/classCircle__inherit__graph.map b/docs/classCircle__inherit__graph.map similarity index 100% rename from docs/html/classCircle__inherit__graph.map rename to docs/classCircle__inherit__graph.map diff --git a/docs/html/classCircle__inherit__graph.md5 b/docs/classCircle__inherit__graph.md5 similarity index 100% rename from docs/html/classCircle__inherit__graph.md5 rename to docs/classCircle__inherit__graph.md5 diff --git a/docs/html/classCircle__inherit__graph.png b/docs/classCircle__inherit__graph.png similarity index 100% rename from docs/html/classCircle__inherit__graph.png rename to docs/classCircle__inherit__graph.png diff --git a/docs/html/classCircle__inherit__graph.svg b/docs/classCircle__inherit__graph.svg similarity index 100% rename from docs/html/classCircle__inherit__graph.svg rename to docs/classCircle__inherit__graph.svg diff --git a/docs/html/classCircle-members.html b/docs/classEll-members.html similarity index 75% rename from docs/html/classCircle-members.html rename to docs/classEll-members.html index 5342e359..e1bd87a9 100644 --- a/docs/html/classCircle-members.html +++ b/docs/classEll-members.html @@ -60,7 +60,7 @@

@@ -98,7 +98,7 @@
@@ -118,29 +118,33 @@
-
Circle Member List
+
Ell Member List
-

This is the complete list of members for Circle, including all inherited members.

+

This is the complete list of members for Ell, including all inherited members.

@@ -161,6 +162,12 @@

Vector2Df getRadius () const
 Gets the radius of the ellipse. More...
 
Vector2Df getMinBound () const override
 Gets the minimum bounding box of the shape. More...
 
Vector2Df getMaxBound () const override
 Gets the maximum bounding box of the shape. More...
 
void printData () const override
 Prints the data of the shape. More...
 
SVGElementgetParent () const
 Parent pointer getter. More...
 
void setGradient (Gradient *gradient)
 Sets the gradient of the shape. More...
 
GradientgetGradient () const
 Gets the gradient of the shape. More...
 
virtual void addElement (SVGElement *element)
 Adds a shape to the composite group. More...
 
 SVGElement ()
 Constructs a Shape object. More...
 
 SVGElement (const mColor &fill, const mColor &stroke, float stroke_width)
 Constructs a Shape object. More...
 
 SVGElement (const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)
 Constructs a Shape object. More...
 
- Protected Attributes inherited from SVGElement
SVGElementparent
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
- - - - - + + + + + + + - - - - - + + + + + + + @@ -151,6 +155,8 @@ + +
addElement(SVGElement *element)SVGElementvirtual
Circle(float radius, const Vector2Df &center, mColor fill, mColor stroke, float stroke_width)Circle
Ell(const Vector2Df &radius, const Vector2Df &center, mColor fill, mColor stroke, float stroke_width)Ell
fillSVGElementprivate
getClass() const overrideCirclevirtual
getFillColor() constSVGElement
Ell(const Vector2Df &radius, const Vector2Df &center, mColor fill, mColor stroke, float stroke_width)Ell
fillSVGElementprivate
getClass() const overrideEllvirtual
getFillColor() constSVGElement
getGradient() constSVGElement
getMaxBound() const overrideEllvirtual
getMinBound() const overrideEllvirtual
getOutlineColor() constSVGElement
getOutlineThickness() constSVGElement
getParent() constSVGElement
getPosition() constSVGElement
getRadius() constEll
getTransforms() constSVGElement
parentSVGElementprotected
positionSVGElementprivate
printData() const overrideEllvirtual
radiusEllprivate
setFillColor(const mColor &color)SVGElement
gradientSVGElementprivate
parentSVGElementprotected
positionSVGElementprivate
printData() const overrideEllvirtual
radiusEllprivate
setFillColor(const mColor &color)SVGElement
setGradient(Gradient *gradient)SVGElement
setOutlineColor(const mColor &color)SVGElement
setOutlineThickness(float thickness)SVGElement
setParent(SVGElement *parent)SVGElement
strokeSVGElementprivate
stroke_widthSVGElementprivate
SVGElement()SVGElementprotected
SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)SVGElementprotected
SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)SVGElementprotected
transformsSVGElementprivate
~SVGElement()=defaultSVGElementvirtual
diff --git a/docs/html/classEll.html b/docs/classEll.html similarity index 75% rename from docs/html/classEll.html rename to docs/classEll.html index d2b78f34..0e49af51 100644 --- a/docs/html/classEll.html +++ b/docs/classEll.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -138,7 +138,8 @@
Collaboration diagram for Ell:
-
+
+
[legend]
+ + + + + + @@ -202,6 +209,12 @@ + + + + + + @@ -219,6 +232,12 @@ + + + + + + @@ -288,19 +307,11 @@

Definition at line 5 of file Ellipse.cpp.

-
7  : radius(radius) {
-
8  setPosition(center);
- - -
11  setOutlineThickness(stroke_thickness);
-
12 }
+
7  : SVGElement(fill, stroke, stroke_thickness, center), radius(radius) {}
Vector2Df radius
Radii of the ellipse in the x and y directions.
Definition: Ellipse.hpp:14
-
mColor fill
Fill color.
Definition: SVGElement.hpp:169
-
void setPosition(float x, float y)
Sets the position of the shape.
Definition: SVGElement.cpp:22
-
void setOutlineThickness(float thickness)
Sets the outline thickness of the shape.
Definition: SVGElement.cpp:16
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
-
void setFillColor(const mColor &color)
Sets the fill color of the shape.
Definition: SVGElement.cpp:8
-
void setOutlineColor(const mColor &color)
Sets the outline color of the shape.
Definition: SVGElement.cpp:12
+
mColor fill
Fill color.
Definition: SVGElement.hpp:222
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
+
SVGElement()
Constructs a Shape object.
Definition: SVGElement.cpp:5
@@ -334,8 +345,83 @@

SVGElement.

-

Definition at line 14 of file Ellipse.cpp.

-
14 { return "Ellipse"; }
+

Definition at line 9 of file Ellipse.cpp.

+
9 { return "Ellipse"; }
+
+
+ + +

◆ getMaxBound()

+ +
+
+

@@ -155,6 +156,12 @@

Vector2Df getRadius () const
 Gets the radius of the ellipse. More...
 
Vector2Df getMinBound () const override
 Gets the minimum bounding box of the shape. More...
 
Vector2Df getMaxBound () const override
 Gets the maximum bounding box of the shape. More...
 
void printData () const override
 Prints the data of the shape. More...
 
SVGElementgetParent () const
 Parent pointer getter. More...
 
void setGradient (Gradient *gradient)
 Sets the gradient of the shape. More...
 
GradientgetGradient () const
 Gets the gradient of the shape. More...
 
virtual void addElement (SVGElement *element)
 Adds a shape to the composite group. More...
 
 SVGElement ()
 Constructs a Shape object. More...
 
 SVGElement (const mColor &fill, const mColor &stroke, float stroke_width)
 Constructs a Shape object. More...
 
 SVGElement (const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)
 Constructs a Shape object. More...
 
- Protected Attributes inherited from SVGElement
SVGElementparent
+ + + + +
+ + + + + + + +
Vector2Df Ell::getMaxBound () const
+
+overridevirtual
+
+ +

Gets the maximum bounding box of the shape.

+
Returns
The maximum bounding box of the shape.
+ +

Reimplemented from SVGElement.

+ +

Definition at line 20 of file Ellipse.cpp.

+
20  {
+
21  return Vector2Df(getPosition().x + getRadius().x,
+
22  getPosition().y + getRadius().y);
+
23 }
+
Vector2Df getRadius() const
Gets the radius of the ellipse.
Definition: Ellipse.cpp:13
+
Vector2Df getPosition() const
Get the current position of the shape.
Definition: SVGElement.cpp:41
+ +
+
+ + +

◆ getMinBound()

+ +
+
+ + + + + +
+ + + + + + + +
Vector2Df Ell::getMinBound () const
+
+overridevirtual
+
+ +

Gets the minimum bounding box of the shape.

+
Returns
The minimum bounding box of the shape.
+ +

Reimplemented from SVGElement.

+ +

Definition at line 15 of file Ellipse.cpp.

+
15  {
+
16  return Vector2Df(getPosition().x - getRadius().x,
+
17  getPosition().y - getRadius().y);
+
18 }
@@ -357,8 +443,8 @@

Returns
The radius of the ellipse.
-

Definition at line 18 of file Ellipse.cpp.

-
18 { return radius; }
+

Definition at line 13 of file Ellipse.cpp.

+
13 { return radius; }
@@ -390,14 +476,13 @@

SVGElement.

-

Definition at line 20 of file Ellipse.cpp.

-
20  {
- -
22  std::cout << "Radius: " << getRadius().x << " " << getRadius().y
-
23  << std::endl;
-
24 }
-
Vector2Df getRadius() const
Gets the radius of the ellipse.
Definition: Ellipse.cpp:18
-
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:33
+

Definition at line 25 of file Ellipse.cpp.

+
25  {
+ +
27  std::cout << "Radius: " << getRadius().x << " " << getRadius().y
+
28  << std::endl;
+
29 }
+
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:47
T x
X coordinate of the vector.
Definition: Vector2D.hpp:45
T y
Y coordinate of the vector.
Definition: Vector2D.hpp:46
@@ -427,8 +512,8 @@

Definition at line 16 of file Ellipse.cpp.

-
16 { this->radius = radius; }
+

Definition at line 11 of file Ellipse.cpp.

+
11 { this->radius = radius; }

diff --git a/docs/html/classEll.js b/docs/classEll.js similarity index 74% rename from docs/html/classEll.js rename to docs/classEll.js index eb623fdc..8f8e5941 100644 --- a/docs/html/classEll.js +++ b/docs/classEll.js @@ -2,6 +2,8 @@ var classEll = [ [ "Ell", "classEll.html#a4a9956ca82cb9f957e993fa0c0faced6", null ], [ "getClass", "classEll.html#a0d0a2a70c06878c5769bd7d092277892", null ], + [ "getMaxBound", "classEll.html#a8a8dd2acc8c7be5580dd8e549d247525", null ], + [ "getMinBound", "classEll.html#ab79368df57ee08382916fc52b69afb85", null ], [ "getRadius", "classEll.html#a00d607a5238705b552ec61b4409b76c1", null ], [ "printData", "classEll.html#a1d6d60039d2405f2b7aa117206d128fb", null ], [ "setRadius", "classEll.html#a9f67131ba02c02fccf42c52f5f04525e", null ], diff --git a/docs/classEll__coll__graph.map b/docs/classEll__coll__graph.map new file mode 100644 index 00000000..d1453955 --- /dev/null +++ b/docs/classEll__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classEll__coll__graph.md5 b/docs/classEll__coll__graph.md5 new file mode 100644 index 00000000..ef0237f2 --- /dev/null +++ b/docs/classEll__coll__graph.md5 @@ -0,0 +1 @@ +bbd1ae0f69cc74f30ea1a7d363ee41b1 \ No newline at end of file diff --git a/docs/classEll__coll__graph.svg b/docs/classEll__coll__graph.svg new file mode 100644 index 00000000..b3e3334d --- /dev/null +++ b/docs/classEll__coll__graph.svg @@ -0,0 +1,114 @@ + + + + + + +Ell + + +Node1 + + +Ell + + + + + +Node2 + + +SVGElement + + + + + +Node2->Node1 + + + + + +Node2->Node2 + + + parent + + + +Node3 + + +Vector2D< float > + + + + + +Node3->Node1 + + + radius + + + +Node3->Node2 + + + position + + + +Node4 + + +Gradient + + + + + +Node4->Node2 + + + gradient + + + +Node5 + + +mColor + + + + + +Node5->Node2 + + + fill +stroke + + + +Node5->Node5 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/html/classEll__inherit__graph.map b/docs/classEll__inherit__graph.map similarity index 100% rename from docs/html/classEll__inherit__graph.map rename to docs/classEll__inherit__graph.map diff --git a/docs/html/classEll__inherit__graph.md5 b/docs/classEll__inherit__graph.md5 similarity index 100% rename from docs/html/classEll__inherit__graph.md5 rename to docs/classEll__inherit__graph.md5 diff --git a/docs/html/classEll__inherit__graph.svg b/docs/classEll__inherit__graph.svg similarity index 100% rename from docs/html/classEll__inherit__graph.svg rename to docs/classEll__inherit__graph.svg diff --git a/docs/html/classEllipse-members.html b/docs/classEllipse-members.html similarity index 100% rename from docs/html/classEllipse-members.html rename to docs/classEllipse-members.html diff --git a/docs/html/classEllipse.html b/docs/classEllipse.html similarity index 100% rename from docs/html/classEllipse.html rename to docs/classEllipse.html diff --git a/docs/html/classEllipse.js b/docs/classEllipse.js similarity index 100% rename from docs/html/classEllipse.js rename to docs/classEllipse.js diff --git a/docs/html/classEllipse__coll__graph.map b/docs/classEllipse__coll__graph.map similarity index 100% rename from docs/html/classEllipse__coll__graph.map rename to docs/classEllipse__coll__graph.map diff --git a/docs/html/classEllipse__coll__graph.md5 b/docs/classEllipse__coll__graph.md5 similarity index 100% rename from docs/html/classEllipse__coll__graph.md5 rename to docs/classEllipse__coll__graph.md5 diff --git a/docs/html/classEllipse__coll__graph.png b/docs/classEllipse__coll__graph.png similarity index 100% rename from docs/html/classEllipse__coll__graph.png rename to docs/classEllipse__coll__graph.png diff --git a/docs/html/classEllipse__coll__graph.svg b/docs/classEllipse__coll__graph.svg similarity index 100% rename from docs/html/classEllipse__coll__graph.svg rename to docs/classEllipse__coll__graph.svg diff --git a/docs/html/classEllipse__inherit__graph.map b/docs/classEllipse__inherit__graph.map similarity index 100% rename from docs/html/classEllipse__inherit__graph.map rename to docs/classEllipse__inherit__graph.map diff --git a/docs/html/classEllipse__inherit__graph.md5 b/docs/classEllipse__inherit__graph.md5 similarity index 100% rename from docs/html/classEllipse__inherit__graph.md5 rename to docs/classEllipse__inherit__graph.md5 diff --git a/docs/html/classEllipse__inherit__graph.png b/docs/classEllipse__inherit__graph.png similarity index 100% rename from docs/html/classEllipse__inherit__graph.png rename to docs/classEllipse__inherit__graph.png diff --git a/docs/html/classEllipse__inherit__graph.svg b/docs/classEllipse__inherit__graph.svg similarity index 100% rename from docs/html/classEllipse__inherit__graph.svg rename to docs/classEllipse__inherit__graph.svg diff --git a/docs/classGradient-members.html b/docs/classGradient-members.html new file mode 100644 index 00000000..6829c2b6 --- /dev/null +++ b/docs/classGradient-members.html @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Gradient Member List
+
+
+ +

This is the complete list of members for Gradient, including all inherited members.

+ + + + + + + + + + + + + + + +
addStop(Stop stop)Gradient
getClass() const =0Gradientpure virtual
getPoints() constGradient
getStops() constGradient
getTransforms() constGradient
getUnits() constGradient
Gradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)Gradient
pointsGradientprivate
setTransforms(std::vector< std::string > transforms)Gradient
setUnits(std::string units)Gradient
stopsGradientprivate
transformsGradientprivate
unitsGradientprivate
~Gradient()=defaultGradientvirtual
+
+ + + \ No newline at end of file diff --git a/docs/classGradient.html b/docs/classGradient.html new file mode 100644 index 00000000..8cd1b4f0 --- /dev/null +++ b/docs/classGradient.html @@ -0,0 +1,466 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Gradient Class Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Gradient Class Referenceabstract
+
+
+ +

A class that represents a gradient. + More...

+ +

#include <Gradient.hpp>

+
+Inheritance diagram for Gradient:
+
+
+
+
[legend]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 Gradient (std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)
 Constructs a Gradient object. More...
 
+virtual ~Gradient ()=default
 Destructs a Gradient object.
 
virtual std::string getClass () const =0
 Gets the type of the gradient. More...
 
std::vector< StopgetStops () const
 Gets the stops of the gradient. More...
 
std::pair< Vector2Df, Vector2DfgetPoints () const
 Gets the start and end points of the gradient. More...
 
void setUnits (std::string units)
 Gets the units of the gradient. More...
 
std::string getUnits () const
 Gets the units of the gradient. More...
 
void setTransforms (std::vector< std::string > transforms)
 Gets the transforms of the gradient. More...
 
std::vector< std::string > getTransforms () const
 Gets the transforms of the gradient. More...
 
void addStop (Stop stop)
 Adds a stop to the gradient. More...
 
+ + + + + + + + + + + + + +

+Private Attributes

+std::vector< Stopstops
 Stops of the gradient.
 
+std::pair< Vector2Df, Vector2Dfpoints
 Start and end points of the gradient.
 
+std::string units
 Units of the gradient.
 
+std::vector< std::string > transforms
 Transforms of the gradient.
 
+

Detailed Description

+

A class that represents a gradient.

+

The Gradient class is an abstract class that represents a gradient. It contains a vector of Stop objects that represent the stops of the gradient. It also contains a pair of Vector2D objects that represent the start and end points of the gradient.

+ +

Definition at line 18 of file Gradient.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Gradient()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Gradient::Gradient (std::vector< Stopstops,
std::pair< Vector2Df, Vector2Dfpoints,
std::string units 
)
+
+ +

Constructs a Gradient object.

+
Parameters
+ + + + +
stopsThe stops of the gradient.
pointsThe start and end points of the gradient.
unitsThe units of the gradient.
+
+
+ +

Definition at line 3 of file Gradient.cpp.

+
+
std::string units
Units of the gradient.
Definition: Gradient.hpp:95
+
std::vector< Stop > stops
Stops of the gradient.
Definition: Gradient.hpp:92
+
std::pair< Vector2Df, Vector2Df > points
Start and end points of the gradient.
Definition: Gradient.hpp:94
+
+
+
+

Member Function Documentation

+ +

◆ addStop()

+ +
+
+ + + + + + + + +
void Gradient::addStop (Stop stop)
+
+ +

Adds a stop to the gradient.

+
Parameters
+ + +
stopThe stop to be added to the gradient.
+
+
+ +

Definition at line 23 of file Gradient.cpp.

+
23 { stops.push_back(stop); }
+
+
+
+ +

◆ getClass()

+ +
+
+ + + + + +
+ + + + + + + +
virtual std::string Gradient::getClass () const
+
+pure virtual
+
+ +

Gets the type of the gradient.

+
Returns
The string that represents the type of the gradient.
+ +

Implemented in RadialGradient, and LinearGradient.

+ +
+
+ +

◆ getPoints()

+ +
+
+ + + + + + + +
std::pair< Vector2Df, Vector2Df > Gradient::getPoints () const
+
+ +

Gets the start and end points of the gradient.

+
Returns
The start and end points of the gradient.
+ +

Definition at line 9 of file Gradient.cpp.

+
9 { return points; }
+
+
+
+ +

◆ getStops()

+ +
+
+ + + + + + + +
std::vector< Stop > Gradient::getStops () const
+
+ +

Gets the stops of the gradient.

+
Returns
The stops of the gradient.
+ +

Definition at line 7 of file Gradient.cpp.

+
7 { return stops; }
+
+
+
+ +

◆ getTransforms()

+ +
+
+ + + + + + + +
std::vector< std::string > Gradient::getTransforms () const
+
+ +

Gets the transforms of the gradient.

+
Returns
The transforms of the gradient.
+ +

Definition at line 19 of file Gradient.cpp.

+
19  {
+
20  return transforms;
+
21 }
+
std::vector< std::string > transforms
Transforms of the gradient.
Definition: Gradient.hpp:96
+
+
+
+ +

◆ getUnits()

+ +
+
+ + + + + + + +
std::string Gradient::getUnits () const
+
+ +

Gets the units of the gradient.

+
Returns
The units of the gradient.
+ +

Definition at line 13 of file Gradient.cpp.

+
13 { return units; }
+
+
+
+ +

◆ setTransforms()

+ +
+
+ + + + + + + + +
void Gradient::setTransforms (std::vector< std::string > transforms)
+
+ +

Gets the transforms of the gradient.

+
Returns
The transforms of the gradient.
+ +

Definition at line 15 of file Gradient.cpp.

+
15  {
+
16  this->transforms = transforms;
+
17 }
+
+
+
+ +

◆ setUnits()

+ +
+
+ + + + + + + + +
void Gradient::setUnits (std::string units)
+
+ +

Gets the units of the gradient.

+
Returns
The units of the gradient.
+ +

Definition at line 11 of file Gradient.cpp.

+
11 { this->units = units; }
+
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + \ No newline at end of file diff --git a/docs/classGradient.js b/docs/classGradient.js new file mode 100644 index 00000000..5f3a58f7 --- /dev/null +++ b/docs/classGradient.js @@ -0,0 +1,17 @@ +var classGradient = +[ + [ "Gradient", "classGradient.html#aa27206a9cc0adb5309a6db6dbd9d0257", null ], + [ "~Gradient", "classGradient.html#a9332299756c51c99398ce09e584a8b42", null ], + [ "addStop", "classGradient.html#a44218bd3fb347f4c269f1f2795fb77d5", null ], + [ "getClass", "classGradient.html#adb86ee7c9171cb7294d1bb8956e97891", null ], + [ "getPoints", "classGradient.html#aced479d6a10d2aa53e6d363e1df5dc08", null ], + [ "getStops", "classGradient.html#a1125c4e5294389bb6698bf4fcb4f928d", null ], + [ "getTransforms", "classGradient.html#adf0e8b360f2b8e6edc1059002f85b1c1", null ], + [ "getUnits", "classGradient.html#a54cc5770c2dce46f1d56bcfb63285173", null ], + [ "setTransforms", "classGradient.html#ae2afa93bd9b6759f5fe625065301d3d9", null ], + [ "setUnits", "classGradient.html#a61dd624d452ab2afe913414158888165", null ], + [ "points", "classGradient.html#a8da859d1b12459800e763c31f18d0d41", null ], + [ "stops", "classGradient.html#a7831fa94135c818481ef7c85f792e1ca", null ], + [ "transforms", "classGradient.html#a1387db53f850dd8cc765fc837c6e97e8", null ], + [ "units", "classGradient.html#a592dda454dc4df897263212191d6e3cb", null ] +]; \ No newline at end of file diff --git a/docs/classGradient__inherit__graph.map b/docs/classGradient__inherit__graph.map new file mode 100644 index 00000000..39ce6039 --- /dev/null +++ b/docs/classGradient__inherit__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classGradient__inherit__graph.md5 b/docs/classGradient__inherit__graph.md5 new file mode 100644 index 00000000..2f1b3489 --- /dev/null +++ b/docs/classGradient__inherit__graph.md5 @@ -0,0 +1 @@ +6698f1b153c03687f27c8f2a672daaea \ No newline at end of file diff --git a/docs/classGradient__inherit__graph.svg b/docs/classGradient__inherit__graph.svg new file mode 100644 index 00000000..a1ec1218 --- /dev/null +++ b/docs/classGradient__inherit__graph.svg @@ -0,0 +1,51 @@ + + + + + + +Gradient + + +Node1 + + +Gradient + + + + + +Node2 + + +LinearGradient + + + + + +Node1->Node2 + + + + + +Node3 + + +RadialGradient + + + + + +Node1->Node3 + + + + + diff --git a/docs/html/classGroup-members.html b/docs/classGroup-members.html similarity index 68% rename from docs/html/classGroup-members.html rename to docs/classGroup-members.html index 217d1a0e..a1de8821 100644 --- a/docs/html/classGroup-members.html +++ b/docs/classGroup-members.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -131,30 +131,37 @@ getClass() const overrideGroupvirtual getElements() constGroup getFillColor() constSVGElement - getOutlineColor() constSVGElement - getOutlineThickness() constSVGElement - getParent() constSVGElement - getPosition() constSVGElement - getTransforms() constSVGElement - Group() (defined in Group)Group - Group(Attributes attributes) (defined in Group)Group + getGradient() constSVGElement + getMaxBound() constSVGElementvirtual + getMinBound() constSVGElementvirtual + getOutlineColor() constSVGElement + getOutlineThickness() constSVGElement + getParent() constSVGElement + getPosition() constSVGElement + getTransforms() constSVGElement + gradientSVGElementprivate + Group()Group + Group(Attributes attributes)Group parentSVGElementprotected positionSVGElementprivate printData() const overrideGroupvirtual setFillColor(const mColor &color)SVGElement - setOutlineColor(const mColor &color)SVGElement - setOutlineThickness(float thickness)SVGElement - setParent(SVGElement *parent)SVGElement - setPosition(float x, float y)SVGElement - setPosition(const Vector2Df &position)SVGElement - setTransforms(const std::vector< std::string > &transforms)SVGElement - shapesGroupprivate - strokeSVGElementprivate - stroke_widthSVGElementprivate - SVGElement()SVGElementprotected - transformsSVGElementprivate - ~Group() (defined in Group)Group - ~SVGElement()=defaultSVGElementvirtual + setGradient(Gradient *gradient)SVGElement + setOutlineColor(const mColor &color)SVGElement + setOutlineThickness(float thickness)SVGElement + setParent(SVGElement *parent)SVGElement + setPosition(float x, float y)SVGElement + setPosition(const Vector2Df &position)SVGElement + setTransforms(const std::vector< std::string > &transforms)SVGElement + shapesGroupprivate + strokeSVGElementprivate + stroke_widthSVGElementprivate + SVGElement()SVGElementprotected + SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)SVGElementprotected + SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)SVGElementprotected + transformsSVGElementprivate + ~Group()Group + ~SVGElement()=defaultSVGElementvirtual
+ +

Constructs a Group object.

+
Parameters
+ + +
attributesThe attributes of the group.
+
+
+ +

Definition at line 5 of file Group.cpp.

+
+
Attributes attributes
Attributes of the group.
Definition: Group.hpp:78
+
+
+ +

Member Function Documentation

◆ addElement()

@@ -274,8 +332,8 @@

18  shapes.push_back(shape);
19  shape->setParent(this);
20 }
-
std::vector< SVGElement * > shapes
Vector of shapes in the group.
Definition: Group.hpp:66
-
void setParent(SVGElement *parent)
Parent pointer setter to make the composite design pattern.
Definition: SVGElement.cpp:55
+
std::vector< SVGElement * > shapes
Vector of shapes in the group.
Definition: Group.hpp:77
+
void setParent(SVGElement *parent)
Parent pointer setter to make the composite design pattern.
Definition: SVGElement.cpp:75
@@ -300,7 +358,6 @@

Definition at line 15 of file Group.cpp.

15 { return attributes; }
-
Attributes attributes
Attributes of the group.
Definition: Group.hpp:67
diff --git a/docs/html/classGroup.js b/docs/classGroup.js similarity index 100% rename from docs/html/classGroup.js rename to docs/classGroup.js diff --git a/docs/classGroup__coll__graph.map b/docs/classGroup__coll__graph.map new file mode 100644 index 00000000..67325bb9 --- /dev/null +++ b/docs/classGroup__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classGroup__coll__graph.md5 b/docs/classGroup__coll__graph.md5 new file mode 100644 index 00000000..9b2a2b19 --- /dev/null +++ b/docs/classGroup__coll__graph.md5 @@ -0,0 +1 @@ +914a2f4a9e5fd43cfb26372d62a29825 \ No newline at end of file diff --git a/docs/classGroup__coll__graph.svg b/docs/classGroup__coll__graph.svg new file mode 100644 index 00000000..d9c645d6 --- /dev/null +++ b/docs/classGroup__coll__graph.svg @@ -0,0 +1,107 @@ + + + + + + +Group + + +Node1 + + +Group + + + + + +Node2 + + +SVGElement + + + + + +Node2->Node1 + + + + + +Node2->Node2 + + + parent + + + +Node3 + + +Vector2D< float > + + + + + +Node3->Node2 + + + position + + + +Node4 + + +Gradient + + + + + +Node4->Node2 + + + gradient + + + +Node5 + + +mColor + + + + + +Node5->Node2 + + + fill +stroke + + + +Node5->Node5 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/html/classGroup__inherit__graph.map b/docs/classGroup__inherit__graph.map similarity index 100% rename from docs/html/classGroup__inherit__graph.map rename to docs/classGroup__inherit__graph.map diff --git a/docs/html/classGroup__inherit__graph.md5 b/docs/classGroup__inherit__graph.md5 similarity index 100% rename from docs/html/classGroup__inherit__graph.md5 rename to docs/classGroup__inherit__graph.md5 diff --git a/docs/html/classGroup__inherit__graph.svg b/docs/classGroup__inherit__graph.svg similarity index 100% rename from docs/html/classGroup__inherit__graph.svg rename to docs/classGroup__inherit__graph.svg diff --git a/docs/html/classSVGElement-members.html b/docs/classLine-members.html similarity index 76% rename from docs/html/classSVGElement-members.html rename to docs/classLine-members.html index 33250df6..ef2cc485 100644 --- a/docs/html/classSVGElement-members.html +++ b/docs/classLine-members.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -98,7 +98,7 @@
@@ -118,25 +118,35 @@
-
SVGElement Member List
+
Line Member List
-

This is the complete list of members for SVGElement, including all inherited members.

+

This is the complete list of members for Line, including all inherited members.

- - + + + + + + + + + + - + + + @@ -146,6 +156,8 @@ + +
addElement(SVGElement *element)SVGElementvirtual
fillSVGElementprivate
getClass() const =0SVGElementpure virtual
directionLineprivate
fillSVGElementprivate
getClass() const overrideLinevirtual
getDirection() constLine
getFillColor() constSVGElement
getGradient() constSVGElement
getLength() constLine
getMaxBound() constSVGElementvirtual
getMinBound() constSVGElementvirtual
getOutlineColor() constSVGElement
getOutlineThickness() constSVGElement
getParent() constSVGElement
getPosition() constSVGElement
getTransforms() constSVGElement
gradientSVGElementprivate
Line(const Vector2Df &point1, const Vector2Df &point2, mColor stroke, float stroke_width)Line
parentSVGElementprotected
positionSVGElementprivate
printData() constSVGElementvirtual
setFillColor(const mColor &color)SVGElement
setDirection(const Vector2Df &direction)Line
setFillColor(const mColor &color)SVGElement
setGradient(Gradient *gradient)SVGElement
setOutlineColor(const mColor &color)SVGElement
setOutlineThickness(float thickness)SVGElement
setParent(SVGElement *parent)SVGElement
strokeSVGElementprivate
stroke_widthSVGElementprivate
SVGElement()SVGElementprotected
SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)SVGElementprotected
SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)SVGElementprotected
transformsSVGElementprivate
~SVGElement()=defaultSVGElementvirtual
diff --git a/docs/html/classLine.html b/docs/classLine.html similarity index 80% rename from docs/html/classLine.html rename to docs/classLine.html index db9f891d..55a3f882 100644 --- a/docs/html/classLine.html +++ b/docs/classLine.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -138,7 +138,8 @@
Collaboration diagram for Line:
-
+
+
[legend]
+ + + + + + @@ -205,6 +212,12 @@ + + + + + + @@ -222,6 +235,12 @@ + + + + + + @@ -284,17 +303,13 @@

Definition at line 5 of file Line.cpp.

-
7  : direction(point2) {
-
8  setPosition(point1);
- - -
11 }
+
+
8  direction(point2) {}
Vector2Df direction
Direction of the line.
Definition: Line.hpp:14
-
void setPosition(float x, float y)
Sets the position of the shape.
Definition: SVGElement.cpp:22
-
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:171
-
void setOutlineThickness(float thickness)
Sets the outline thickness of the shape.
Definition: SVGElement.cpp:16
-
mColor stroke
Outline color.
Definition: SVGElement.hpp:170
-
void setOutlineColor(const mColor &color)
Sets the outline color of the shape.
Definition: SVGElement.cpp:12
+
float stroke_width
Thickness of the shape's outline.
Definition: SVGElement.hpp:224
+
mColor stroke
Outline color.
Definition: SVGElement.hpp:223
+
SVGElement()
Constructs a Shape object.
Definition: SVGElement.cpp:5
+
static const mColor Transparent
Transparent (black) predefined color.
Definition: Color.hpp:58
@@ -327,8 +342,8 @@

SVGElement.

-

Definition at line 13 of file Line.cpp.

-
13 { return "Line"; }
+

Definition at line 10 of file Line.cpp.

+
10 { return "Line"; }
@@ -350,8 +365,8 @@

Returns
The direction of the line.
-

Definition at line 19 of file Line.cpp.

-
19 { return direction; }
+

Definition at line 16 of file Line.cpp.

+
16 { return direction; }
@@ -373,10 +388,10 @@

Returns
The length of the line.
-

Definition at line 21 of file Line.cpp.

-
21  {
-
22  return std::sqrt(std::pow(direction.x, 2) + std::pow(direction.y, 2));
-
23 }
+

Definition at line 18 of file Line.cpp.

+
18  {
+
19  return std::sqrt(direction.x * direction.x + direction.y * direction.y);
+
20 }
T x
X coordinate of the vector.
Definition: Vector2D.hpp:45
T y
Y coordinate of the vector.
Definition: Vector2D.hpp:46
@@ -406,10 +421,10 @@

Definition at line 15 of file Line.cpp.

-
15  {
-
16  this->direction = direction;
-
17 }
+

Definition at line 12 of file Line.cpp.

+
12  {
+
13  this->direction = direction;
+
14 }

diff --git a/docs/html/classLine.js b/docs/classLine.js similarity index 100% rename from docs/html/classLine.js rename to docs/classLine.js diff --git a/docs/classLine__coll__graph.map b/docs/classLine__coll__graph.map new file mode 100644 index 00000000..1308e351 --- /dev/null +++ b/docs/classLine__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classLine__coll__graph.md5 b/docs/classLine__coll__graph.md5 new file mode 100644 index 00000000..9eb0bf2f --- /dev/null +++ b/docs/classLine__coll__graph.md5 @@ -0,0 +1 @@ +049a901dd7e5e6b3958a3eac7f7acc76 \ No newline at end of file diff --git a/docs/html/classLine__coll__graph.png b/docs/classLine__coll__graph.png similarity index 100% rename from docs/html/classLine__coll__graph.png rename to docs/classLine__coll__graph.png diff --git a/docs/classLine__coll__graph.svg b/docs/classLine__coll__graph.svg new file mode 100644 index 00000000..c88bb0e5 --- /dev/null +++ b/docs/classLine__coll__graph.svg @@ -0,0 +1,114 @@ + + + + + + +Line + + +Node1 + + +Line + + + + + +Node2 + + +SVGElement + + + + + +Node2->Node1 + + + + + +Node2->Node2 + + + parent + + + +Node3 + + +Vector2D< float > + + + + + +Node3->Node1 + + + direction + + + +Node3->Node2 + + + position + + + +Node4 + + +Gradient + + + + + +Node4->Node2 + + + gradient + + + +Node5 + + +mColor + + + + + +Node5->Node2 + + + fill +stroke + + + +Node5->Node5 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/html/classLine__inherit__graph.map b/docs/classLine__inherit__graph.map similarity index 100% rename from docs/html/classLine__inherit__graph.map rename to docs/classLine__inherit__graph.map diff --git a/docs/html/classLine__inherit__graph.md5 b/docs/classLine__inherit__graph.md5 similarity index 100% rename from docs/html/classLine__inherit__graph.md5 rename to docs/classLine__inherit__graph.md5 diff --git a/docs/html/classLine__inherit__graph.png b/docs/classLine__inherit__graph.png similarity index 100% rename from docs/html/classLine__inherit__graph.png rename to docs/classLine__inherit__graph.png diff --git a/docs/html/classLine__inherit__graph.svg b/docs/classLine__inherit__graph.svg similarity index 100% rename from docs/html/classLine__inherit__graph.svg rename to docs/classLine__inherit__graph.svg diff --git a/docs/classLinearGradient-members.html b/docs/classLinearGradient-members.html new file mode 100644 index 00000000..a58fbf57 --- /dev/null +++ b/docs/classLinearGradient-members.html @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

@@ -190,6 +191,12 @@

Vector2Df getPosition () const
 Get the current position of the shape. More...
 
virtual Vector2Df getMinBound () const
 Gets the minimum bound of the shape. More...
 
virtual Vector2Df getMaxBound () const
 Gets the maximum bound of the shape. More...
 
virtual void printData () const
 Prints the data of the shape. More...
 
SVGElementgetParent () const
 Parent pointer getter. More...
 
void setGradient (Gradient *gradient)
 Sets the gradient of the shape. More...
 
GradientgetGradient () const
 Gets the gradient of the shape. More...
 
virtual void addElement (SVGElement *element)
 Adds a shape to the composite group. More...
 
 SVGElement ()
 Constructs a Shape object. More...
 
 SVGElement (const mColor &fill, const mColor &stroke, float stroke_width)
 Constructs a Shape object. More...
 
 SVGElement (const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)
 Constructs a Shape object. More...
 
- Protected Attributes inherited from SVGElement
SVGElementparent
+ + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+ + + + + + + + + +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
LinearGradient Member List
+
+
+ +

This is the complete list of members for LinearGradient, including all inherited members.

+ + + + + + + + + + + + + + + + +
addStop(Stop stop)Gradient
getClass() const overrideLinearGradientvirtual
getPoints() constGradient
getStops() constGradient
getTransforms() constGradient
getUnits() constGradient
Gradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)Gradient
LinearGradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)LinearGradient
pointsGradientprivate
setTransforms(std::vector< std::string > transforms)Gradient
setUnits(std::string units)Gradient
stopsGradientprivate
transformsGradientprivate
unitsGradientprivate
~Gradient()=defaultGradientvirtual
+
+ + + \ No newline at end of file diff --git a/docs/classLinearGradient.html b/docs/classLinearGradient.html new file mode 100644 index 00000000..8873d699 --- /dev/null +++ b/docs/classLinearGradient.html @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + +svg-reader: LinearGradient Class Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
LinearGradient Class Reference
+
+
+ +

A class that represents a linear gradient. + More...

+ +

#include <LinearGradient.hpp>

+
+Inheritance diagram for LinearGradient:
+
+
+
+
[legend]
+
+Collaboration diagram for LinearGradient:
+
+
+
+
[legend]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 LinearGradient (std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)
 Constructs a LinearGradient object. More...
 
std::string getClass () const override
 Gets the type of the gradient. More...
 
- Public Member Functions inherited from Gradient
 Gradient (std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)
 Constructs a Gradient object. More...
 
+virtual ~Gradient ()=default
 Destructs a Gradient object.
 
std::vector< StopgetStops () const
 Gets the stops of the gradient. More...
 
std::pair< Vector2Df, Vector2DfgetPoints () const
 Gets the start and end points of the gradient. More...
 
void setUnits (std::string units)
 Gets the units of the gradient. More...
 
std::string getUnits () const
 Gets the units of the gradient. More...
 
void setTransforms (std::vector< std::string > transforms)
 Gets the transforms of the gradient. More...
 
std::vector< std::string > getTransforms () const
 Gets the transforms of the gradient. More...
 
void addStop (Stop stop)
 Adds a stop to the gradient. More...
 
+

Detailed Description

+

A class that represents a linear gradient.

+

The LinearGradient class is derived from the Gradient class and represents a linear gradient. It contains a vector of Stop objects that represent the the stops of the gradient. It also contains a pair of Vector2D objects that represent the start and end points of the gradient.

+ +

Definition at line 14 of file LinearGradient.hpp.

+

Constructor & Destructor Documentation

+ +

◆ LinearGradient()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
LinearGradient::LinearGradient (std::vector< Stopstops,
std::pair< Vector2Df, Vector2Dfpoints,
std::string units 
)
+
+ +

Constructs a LinearGradient object.

+
Parameters
+ + + + +
stopsThe stops of the gradient.
pointsThe start and end points of the gradient.
unitsThe units of the gradient.
+
+
+ +

Definition at line 3 of file LinearGradient.cpp.

+
6  : Gradient(stops, points, units) {}
+
std::string units
Units of the gradient.
Definition: Gradient.hpp:95
+
std::vector< Stop > stops
Stops of the gradient.
Definition: Gradient.hpp:92
+
std::pair< Vector2Df, Vector2Df > points
Start and end points of the gradient.
Definition: Gradient.hpp:94
+
Gradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)
Constructs a Gradient object.
Definition: Gradient.cpp:3
+
+
+
+

Member Function Documentation

+ +

◆ getClass()

+ +
+
+ + + + + +
+ + + + + + + +
std::string LinearGradient::getClass () const
+
+overridevirtual
+
+ +

Gets the type of the gradient.

+
Returns
The string "LinearGradient".
+
Note
This function is used for determining the type of the gradient.
+ +

Implements Gradient.

+ +

Definition at line 8 of file LinearGradient.cpp.

+
8 { return "LinearGradient"; }
+
+
+
+
The documentation for this class was generated from the following files: +
+
+ + + \ No newline at end of file diff --git a/docs/classLinearGradient.js b/docs/classLinearGradient.js new file mode 100644 index 00000000..97b6bfed --- /dev/null +++ b/docs/classLinearGradient.js @@ -0,0 +1,5 @@ +var classLinearGradient = +[ + [ "LinearGradient", "classLinearGradient.html#aaa0260244d818cd9d1180cb2697cc83b", null ], + [ "getClass", "classLinearGradient.html#aa434164a18fa29e778cdb7fc96770b9a", null ] +]; \ No newline at end of file diff --git a/docs/classLinearGradient__coll__graph.map b/docs/classLinearGradient__coll__graph.map new file mode 100644 index 00000000..018334a4 --- /dev/null +++ b/docs/classLinearGradient__coll__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/classLinearGradient__coll__graph.md5 b/docs/classLinearGradient__coll__graph.md5 new file mode 100644 index 00000000..cf72ab77 --- /dev/null +++ b/docs/classLinearGradient__coll__graph.md5 @@ -0,0 +1 @@ +94c464e4b9f1c18021246c93bb5b89e0 \ No newline at end of file diff --git a/docs/classLinearGradient__coll__graph.svg b/docs/classLinearGradient__coll__graph.svg new file mode 100644 index 00000000..e0af6f43 --- /dev/null +++ b/docs/classLinearGradient__coll__graph.svg @@ -0,0 +1,36 @@ + + + + + + +LinearGradient + + +Node1 + + +LinearGradient + + + + + +Node2 + + +Gradient + + + + + +Node2->Node1 + + + + + diff --git a/docs/classLinearGradient__inherit__graph.map b/docs/classLinearGradient__inherit__graph.map new file mode 100644 index 00000000..018334a4 --- /dev/null +++ b/docs/classLinearGradient__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/classLinearGradient__inherit__graph.md5 b/docs/classLinearGradient__inherit__graph.md5 new file mode 100644 index 00000000..cf72ab77 --- /dev/null +++ b/docs/classLinearGradient__inherit__graph.md5 @@ -0,0 +1 @@ +94c464e4b9f1c18021246c93bb5b89e0 \ No newline at end of file diff --git a/docs/classLinearGradient__inherit__graph.svg b/docs/classLinearGradient__inherit__graph.svg new file mode 100644 index 00000000..e0af6f43 --- /dev/null +++ b/docs/classLinearGradient__inherit__graph.svg @@ -0,0 +1,36 @@ + + + + + + +LinearGradient + + +Node1 + + +LinearGradient + + + + + +Node2 + + +Gradient + + + + + +Node2->Node1 + + + + + diff --git a/docs/html/classParser-members.html b/docs/classParser-members.html similarity index 59% rename from docs/html/classParser-members.html rename to docs/classParser-members.html index 2af7b95b..052dbc6e 100644 --- a/docs/html/classParser-members.html +++ b/docs/classParser-members.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -124,29 +124,37 @@

This is the complete list of members for Parser, including all inherited members.

- - + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - + + + + +
getAttribute(xml_node<> *node, std::string name)Parserprivate
getFloatAttribute(xml_node<> *node, std::string name)Parserprivate
getAttribute(rapidxml::xml_node<> *node, std::string name)Parserprivate
getFloatAttribute(rapidxml::xml_node<> *node, std::string name)Parserprivate
GetGradients(rapidxml::xml_node<> *node)Parserprivate
getGradientStops(rapidxml::xml_node<> *node)Parserprivate
getInstance(const std::string &file_name)Parserstatic
getRoot()Parser
getTransformOrder(xml_node<> *node)Parserprivate
instanceParserprivatestatic
parseCircle(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parseColor(xml_node<> *node, std::string color)Parserprivate
parseElements(std::string file_name)Parserprivate
parseEllipse(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parseLine(xml_node<> *node, const mColor &stroke_color, float stroke_width)Parserprivate
parsePath(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parsePathPoints(xml_node<> *node)Parserprivate
parsePoints(xml_node<> *node)Parserprivate
parsePolygon(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parsePolyline(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
getTransformOrder(rapidxml::xml_node<> *node)Parserprivate
getViewBox() constParser
getViewPort() constParser
gradientsParserprivate
instanceParserprivatestatic
parseCircle(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parseColor(rapidxml::xml_node<> *node, std::string color, std::string &id)Parserprivate
parseElements(std::string file_name)Parserprivate
parseEllipse(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parseGradient(std::string id)Parserprivate
parseLine(rapidxml::xml_node<> *node, const mColor &stroke_color, float stroke_width)Parserprivate
parsePath(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parsePathPoints(rapidxml::xml_node<> *node)Parserprivate
parsePoints(rapidxml::xml_node<> *node)Parserprivate
parsePolygon(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parsePolyline(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
Parser(const Parser &)=deleteParser
Parser(const std::string &file_name)Parserprivate
parseRect(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parseShape(xml_node<> *node)Parserprivate
parseText(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parseRect(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
parseShape(rapidxml::xml_node<> *node)Parserprivate
parseText(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)Parserprivate
printShapesData()Parser
rootParserprivate
viewboxParserprivate
viewportParserprivate
~Parser()Parser
diff --git a/docs/classParser.html b/docs/classParser.html new file mode 100644 index 00000000..c0383c02 --- /dev/null +++ b/docs/classParser.html @@ -0,0 +1,2082 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Parser Class Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
svg-reader +  0.3 +
+
Parse and render SVG files, handle user interactions.
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ + +
+ +

To manipulate and parse an SVG file. + More...

+ +

#include <Parser.hpp>

+
+Collaboration diagram for Parser:
+
+
+
+
[legend]
+ + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

Parser (const Parser &)=delete
 Deleted copy constructor to enforce the singleton pattern.
 
~Parser ()
 Destructor for the Parser class.
 
GroupgetRoot ()
 Gets the root of the tree of SVGElements. More...
 
void printShapesData ()
 Prints the data of the shapes. More...
 
std::pair< Vector2Df, Vector2DfgetViewBox () const
 Gets the viewbox of the SVG file. More...
 
Vector2Df getViewPort () const
 Gets the viewport of the SVG file. More...
 
+ + + + +

+Static Public Member Functions

static ParsergetInstance (const std::string &file_name)
 Gets the singleton instance of the Parser class. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Private Member Functions

 Parser (const std::string &file_name)
 Construct a new Parser object. More...
 
SVGElementparseElements (std::string file_name)
 Parses the SVG file and creates a tree of SVGElements. More...
 
std::string getAttribute (rapidxml::xml_node<> *node, std::string name)
 Gets the attributes of a node. More...
 
float getFloatAttribute (rapidxml::xml_node<> *node, std::string name)
 Gets the floating point attributes of a node. More...
 
std::vector< StopgetGradientStops (rapidxml::xml_node<> *node)
 Gets the gradient stops of a node. More...
 
void GetGradients (rapidxml::xml_node<> *node)
 Gets the gradients of a node. More...
 
GradientparseGradient (std::string id)
 Gets the gradient of a node. More...
 
mColor parseColor (rapidxml::xml_node<> *node, std::string color, std::string &id)
 Gets the color attributes of a node. More...
 
std::vector< Vector2DfparsePoints (rapidxml::xml_node<> *node)
 Gets the points of the element. More...
 
std::vector< PathPointparsePathPoints (rapidxml::xml_node<> *node)
 Gets the points of the path element. More...
 
std::vector< std::string > getTransformOrder (rapidxml::xml_node<> *node)
 Gets the transform order of the element. More...
 
LineparseLine (rapidxml::xml_node<> *node, const mColor &stroke_color, float stroke_width)
 Parses the line element. More...
 
RectparseRect (rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
 Parses the rect element. More...
 
class PlylineparsePolyline (rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
 Parses the polyline element. More...
 
class PlygonparsePolygon (rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
 Parses the polygon element. More...
 
CircleparseCircle (rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
 Parses the circle element. More...
 
class EllparseEllipse (rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
 Parses the ellipse element. More...
 
PathparsePath (rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
 Parses the path element. More...
 
TextparseText (rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
 Parses the text element. More...
 
SVGElementparseShape (rapidxml::xml_node<> *node)
 Parses the group of elements. More...
 
+ + + + + + + + + + + + +

+Private Attributes

+SVGElementroot
 The root of the SVG file.
 
std::map< std::string, Gradient * > gradients
 
+std::pair< Vector2Df, Vector2Dfviewbox
 The viewbox of the SVG file.
 
+Vector2Df viewport
 The viewport of the SVG file.
 
+ + + + +

+Static Private Attributes

+static Parserinstance = nullptr
 The instance of the Parser.
 
+

Detailed Description

+

To manipulate and parse an SVG file.

+

The Parser class is a singleton class that is used to parse an SVG file and create a tree of SVGElements.

+ +

Definition at line 24 of file Parser.hpp.

+

Constructor & Destructor Documentation

+ +

◆ Parser()

+ +
+
+ + + + + +
+ + + + + + + + +
Parser::Parser (const std::string & file_name)
+
+private
+
+ +

Construct a new Parser object.

+
Parameters
+ + +
file_nameThe name of the file to be parsed.
+
+
+ +

Definition at line 165 of file Parser.cpp.

+
165  {
+
166  root = parseElements(file_name);
+
167 }
+
SVGElement * root
The root of the SVG file.
Definition: Parser.hpp:276
+
SVGElement * parseElements(std::string file_name)
Parses the SVG file and creates a tree of SVGElements.
Definition: Parser.cpp:181
+
+
+
+

Member Function Documentation

+ +

◆ getAttribute()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::string Parser::getAttribute (rapidxml::xml_node<> * node,
std::string name 
)
+
+private
+
+ +

Gets the attributes of a node.

+
Parameters
+ + + +
nodeThe node to be parsed.
nameThe name of tag to be parsed.
+
+
+
Returns
The attributes of the node.
+ +

Definition at line 296 of file Parser.cpp.

+
296  {
+
297  if (name == "text") return removeExtraSpaces(node->value());
+
298  std::string result;
+
299  if (node->first_attribute(name.c_str()) == NULL) {
+
300  if (name == "fill" || name == "stop-color")
+
301  result = "black";
+
302  else if (name == "stroke" || name == "transform" || name == "rotate" ||
+
303  name == "font-style")
+
304  result = "none";
+
305  else if (name == "text-anchor")
+
306  result = "start";
+
307  else if (name == "fill-rule")
+
308  result = "nonzero";
+
309  else if (name == "gradientUnits")
+
310  result = "objectBoundingBox";
+
311  } else {
+
312  result = node->first_attribute(name.c_str())->value();
+
313  }
+
314  return result;
+
315 }
+
+
+
+ +

◆ getFloatAttribute()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
float Parser::getFloatAttribute (rapidxml::xml_node<> * node,
std::string name 
)
+
+private
+
+ +

Gets the floating point attributes of a node.

+
Parameters
+ + + +
nodeThe node to be parsed.
nameThe name of tag to be parsed.
+
+
+
Returns
The floating point attributes of the node.
+ +

Definition at line 317 of file Parser.cpp.

+
317  {
+
318  float result;
+
319  if (node->first_attribute(name.c_str()) == NULL) {
+
320  if (std::string(node->name()).find("Gradient") != std::string::npos) {
+
321  if (name == "x1" || name == "y1" || name == "fr")
+
322  result = 0;
+
323  else if (name == "cx" || name == "cy")
+
324  result = name == "cx" ? 0.5 * this->viewbox.second.x
+
325  : 0.5 * this->viewbox.second.y;
+
326  else if (name == "r") {
+
327  result = sqrt((pow(this->viewbox.second.x, 2) +
+
328  pow(this->viewbox.second.y, 2)) /
+
329  2) /
+
330  2;
+
331  } else if (name == "fx" || name == "fy")
+
332  result = name == "fx" ? getFloatAttribute(node, "cx")
+
333  : getFloatAttribute(node, "cy");
+
334  else
+
335  result = name == "x2" ? this->viewbox.second.x
+
336  : this->viewbox.second.y;
+
337  } else {
+
338  if (name == "stroke-width" || name == "stroke-opacity" ||
+
339  name == "fill-opacity" || name == "opacity" ||
+
340  name == "stop-opacity")
+
341  result = 1;
+
342  else
+
343  result = 0;
+
344  }
+
345  } else {
+
346  if (name == "width" || name == "height") {
+
347  std::string value = node->first_attribute(name.c_str())->value();
+
348  if (value.find("%") != std::string::npos) {
+
349  result = std::stof(value.substr(0, value.find("%"))) *
+
350  this->viewbox.second.x / 100;
+
351  } else if (value.find("pt") != std::string::npos) {
+
352  result = std::stof(value.substr(0, value.find("pt"))) * 1.33;
+
353  } else {
+
354  result = std::stof(value);
+
355  }
+
356  } else
+
357  result = std::stof(node->first_attribute(name.c_str())->value());
+
358  }
+
359  return result;
+
360 }
+
std::pair< Vector2Df, Vector2Df > viewbox
The viewbox of the SVG file.
Definition: Parser.hpp:280
+
float getFloatAttribute(rapidxml::xml_node<> *node, std::string name)
Gets the floating point attributes of a node.
Definition: Parser.cpp:317
+
+
+
+ +

◆ GetGradients()

+ +
+
+ + + + + +
+ + + + + + + + +
void Parser::GetGradients (rapidxml::xml_node<> * node)
+
+private
+
+ +

Gets the gradients of a node.

+
Parameters
+ + +
nodeThe node to be parsed.
+
+
+ +

Definition at line 428 of file Parser.cpp.

+
428  {
+
429  rapidxml::xml_node<> *gradient_node = node->first_node();
+
430  while (gradient_node) {
+
431  if (std::string(gradient_node->name()).find("Gradient") !=
+
432  std::string::npos) {
+
433  Gradient *gradient;
+
434  std::string id = getAttribute(gradient_node, "id");
+
435  std::string units = getAttribute(gradient_node, "gradientUnits");
+
436  std::vector< Stop > stops = getGradientStops(gradient_node);
+
437  std::string href = getAttribute(gradient_node, "xlink:href");
+
438  int pos = href.find("#");
+
439  if (pos != std::string::npos) {
+
440  href = href.substr(pos + 1);
+
441  }
+
442  if (std::string(gradient_node->name()).find("linear") !=
+
443  std::string::npos) {
+
444  float x1 = getFloatAttribute(gradient_node, "x1");
+
445  float y1 = getFloatAttribute(gradient_node, "y1");
+
446  float x2 = getFloatAttribute(gradient_node, "x2");
+
447  float y2 = getFloatAttribute(gradient_node, "y2");
+
448  std::pair< Vector2Df, Vector2Df > points = {{x1, y1}, {x2, y2}};
+
449  gradient = new LinearGradient(stops, points, units);
+
450  if (this->gradients.find(id) == this->gradients.end())
+
451  this->gradients[id] = gradient;
+
452  } else if (std::string(gradient_node->name()).find("radial") !=
+
453  std::string::npos) {
+
454  float cx = getFloatAttribute(gradient_node, "cx");
+
455  float cy = getFloatAttribute(gradient_node, "cy");
+
456  float fx = getFloatAttribute(gradient_node, "fx");
+
457  float fy = getFloatAttribute(gradient_node, "fy");
+
458  float r = getFloatAttribute(gradient_node, "r");
+
459  float fr = getFloatAttribute(gradient_node, "fr");
+
460  std::pair< Vector2Df, Vector2Df > points = {{cx, cy}, {fx, fy}};
+
461  Vector2Df radius(r, fr);
+
462  gradient = new RadialGradient(stops, points, radius, units);
+
463  if (this->gradients.find(id) == this->gradients.end())
+
464  this->gradients[id] = gradient;
+
465  }
+
466  if (href != "") {
+
467  for (auto stop : parseGradient(href)->getStops()) {
+
468  gradient->addStop(stop);
+
469  }
+
470  }
+
471  if (gradient != NULL)
+
472  gradient->setTransforms(getTransformOrder(gradient_node));
+
473  }
+
474  gradient_node = gradient_node->next_sibling();
+
475  }
+
476 }
+
A class that represents a gradient.
Definition: Gradient.hpp:18
+
void addStop(Stop stop)
Adds a stop to the gradient.
Definition: Gradient.cpp:23
+
void setTransforms(std::vector< std::string > transforms)
Gets the transforms of the gradient.
Definition: Gradient.cpp:15
+
A class that represents a linear gradient.
+
std::string getAttribute(rapidxml::xml_node<> *node, std::string name)
Gets the attributes of a node.
Definition: Parser.cpp:296
+
std::map< std::string, Gradient * > gradients
Definition: Parser.hpp:277
+
std::vector< std::string > getTransformOrder(rapidxml::xml_node<> *node)
Gets the transform order of the element.
Definition: Parser.cpp:637
+
Gradient * parseGradient(std::string id)
Gets the gradient of a node.
Definition: Parser.cpp:404
+
std::vector< Stop > getGradientStops(rapidxml::xml_node<> *node)
Gets the gradient stops of a node.
Definition: Parser.cpp:412
+
A class that represents a radial gradient.
+ +
+
+
+ +

◆ getGradientStops()

+ +
+
+ + + + + +
+ + + + + + + + +
std::vector< Stop > Parser::getGradientStops (rapidxml::xml_node<> * node)
+
+private
+
+ +

Gets the gradient stops of a node.

+
Parameters
+ + +
nodeThe node to be parsed.
+
+
+
Returns
The gradient stops of the node.
+ +

Definition at line 412 of file Parser.cpp.

+
412  {
+
413  std::vector< Stop > stops;
+
414  rapidxml::xml_node<> *stop_node = node->first_node();
+
415  while (stop_node) {
+
416  if (std::string(stop_node->name()) == "stop") {
+
417  std::string id = "";
+
418  mColor color = parseColor(stop_node, "stop-color", id);
+
419  float offset = getFloatAttribute(stop_node, "offset");
+
420  if (offset > 1) offset /= 100;
+
421  stops.push_back(Stop(color, offset));
+
422  }
+
423  stop_node = stop_node->next_sibling();
+
424  }
+
425  return stops;
+
426 }
+
mColor parseColor(rapidxml::xml_node<> *node, std::string color, std::string &id)
Gets the color attributes of a node.
Definition: Parser.cpp:362
+
A class that represents a stop.
Definition: Stop.hpp:11
+
Utility class for manipulating RGBA mColors.
Definition: Color.hpp:11
+
+
+
+ +

◆ getInstance()

+ +
+
+ + + + + +
+ + + + + + + + +
Parser * Parser::getInstance (const std::string & file_name)
+
+static
+
+ +

Gets the singleton instance of the Parser class.

+
Parameters
+ + +
file_nameThe name of the file to be parsed.
+
+
+
Returns
The singleton instance of the Parser class.
+ +

Definition at line 158 of file Parser.cpp.

+
158  {
+
159  if (instance == nullptr) {
+
160  instance = new Parser(file_name);
+
161  }
+
162  return instance;
+
163 }
+
Parser(const Parser &)=delete
Deleted copy constructor to enforce the singleton pattern.
+
static Parser * instance
The instance of the Parser.
Definition: Parser.hpp:275
+
+
+
+ +

◆ getRoot()

+ +
+
+ + + + + + + +
Group * Parser::getRoot ()
+
+ +

Gets the root of the tree of SVGElements.

+
Returns
The root of the tree of SVGElements.
+ +

Definition at line 169 of file Parser.cpp.

+
169 { return dynamic_cast< Group * >(root); }
+
A composite class that contains a vector of shape pointers (polymorphic).
Definition: Group.hpp:19
+
+
+
+ +

◆ getTransformOrder()

+ +
+
+ + + + + +
+ + + + + + + + +
std::vector< std::string > Parser::getTransformOrder (rapidxml::xml_node<> * node)
+
+private
+
+ +

Gets the transform order of the element.

+
Parameters
+ + +
nodeThe node to be parsed.
+
+
+
Returns
The transform order of the element
+ +

Definition at line 637 of file Parser.cpp.

+
638  {
+
639  std::string transform_tag;
+
640  if (std::string(node->name()).find("Gradient") != std::string::npos)
+
641  transform_tag = getAttribute(node, "gradientTransform");
+
642  else
+
643  transform_tag = getAttribute(node, "transform");
+
644  std::vector< std::string > order;
+
645  std::stringstream ss(transform_tag);
+
646  std::string type;
+
647  while (ss >> type) {
+
648  if (type.find("translate") != std::string::npos ||
+
649  type.find("scale") != std::string::npos ||
+
650  type.find("rotate") != std::string::npos ||
+
651  type.find("matrix") != std::string::npos) {
+
652  while (type.find(")") == std::string::npos) {
+
653  std::string temp;
+
654  ss >> temp;
+
655  type += " " + temp;
+
656  }
+
657  std::string temp = type.substr(0, type.find("(") + 1);
+
658  temp.erase(std::remove(temp.begin(), temp.end(), ' '), temp.end());
+
659  type.erase(0, type.find("(") + 1);
+
660  type = temp + type;
+
661  order.push_back(type);
+
662  }
+
663  }
+
664  return order;
+
665 }
+
+
+
+ +

◆ getViewBox()

+ +
+
+ + + + + + + +
std::pair< Vector2Df, Vector2Df > Parser::getViewBox () const
+
+ +

Gets the viewbox of the SVG file.

+
Returns
The viewbox of the SVG file.
+ +

Definition at line 830 of file Parser.cpp.

+
830 { return viewbox; }
+
+
+
+ +

◆ getViewPort()

+ +
+
+ + + + + + + +
Vector2Df Parser::getViewPort () const
+
+ +

Gets the viewport of the SVG file.

+
Returns
The viewport of the SVG file.
+ +

Definition at line 832 of file Parser.cpp.

+
832 { return viewport; }
+
Vector2Df viewport
The viewport of the SVG file.
Definition: Parser.hpp:281
+
+
+
+ +

◆ parseCircle()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Circle * Parser::parseCircle (rapidxml::xml_node<> * node,
const mColorfill_color,
const mColorstroke_color,
float stroke_width 
)
+
+private
+
+ +

Parses the circle element.

+
Parameters
+ + + + + +
nodeThe node to be parsed.
fill_colorThe color of the fill
stroke_colorThe color of the stroke
stroke_widthThe width of the stroke
+
+
+
Returns
The circle element
+ +

Definition at line 732 of file Parser.cpp.

+
734  {
+
735  float cx = getFloatAttribute(node, "cx");
+
736  float cy = getFloatAttribute(node, "cy");
+
737  float radius = getFloatAttribute(node, "r");
+
738  Circle *shape = new Circle(radius, Vector2Df(cx, cy), fill_color,
+
739  stroke_color, stroke_width);
+
740  return shape;
+
741 }
+
Represents a circle in 2D space.
Definition: Circle.hpp:13
+
+
+
+ +

◆ parseColor()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
mColor Parser::parseColor (rapidxml::xml_node<> * node,
std::string color,
std::string & id 
)
+
+private
+
+ +

Gets the color attributes of a node.

+
Parameters
+ + + + +
nodeThe node to be parsed.
colorThe name of the color tag to be parsed.
idThe id to check if the color is a reference.
+
+
+
Returns
The color attributes of the node.
+ +

Definition at line 362 of file Parser.cpp.

+
363  {
+
364  std::string color = getAttribute(node, name);
+
365  color.erase(std::remove(color.begin(), color.end(), ' '), color.end());
+
366  if (color.find("url") == std::string::npos) {
+
367  for (auto &c : color) c = tolower(c);
+
368  }
+
369  if (color == "none")
+
370  return mColor::Transparent;
+
371  else {
+
372  mColor result;
+
373  if (color.find("url") != std::string::npos) {
+
374  if (color.find("'") != std::string::npos) {
+
375  id = color.substr(color.find("'") + 1);
+
376  id.erase(id.find("'"));
+
377  id.erase(id.find("#"), 1);
+
378  } else {
+
379  id = color.substr(color.find("#") + 1);
+
380  id.erase(id.find(")"));
+
381  }
+
382  result = mColor::Transparent;
+
383  } else if (color.find("#") != std::string::npos) {
+
384  result = getHexColor(color);
+
385  } else if (color.find("rgb") != std::string::npos) {
+
386  result = getRgbColor(color);
+
387  } else {
+
388  auto color_code = color_map.find(color);
+
389  if (color_code == color_map.end()) {
+
390  std::cout << "Color " << color << " not found" << std::endl;
+
391  exit(-1);
+
392  }
+
393  result = color_code->second;
+
394  }
+
395  if (name == "stop-color")
+
396  result.a = result.a * getFloatAttribute(node, "stop-opacity");
+
397  else
+
398  result.a = result.a * getFloatAttribute(node, name + "-opacity") *
+
399  getFloatAttribute(node, "opacity");
+
400  return result;
+
401  }
+
402 }
+
int a
Alpha (opacity) component.
Definition: Color.hpp:63
+
static const mColor Transparent
Transparent (black) predefined color.
Definition: Color.hpp:58
+
+
+
+ +

◆ parseElements()

+ +
+
+ + + + + +
+ + + + + + + + +
SVGElement * Parser::parseElements (std::string file_name)
+
+private
+
+ +

Parses the SVG file and creates a tree of SVGElements.

+
Parameters
+ + +
file_nameThe name of the file to be parsed.
+
+
+
Returns
The root of the tree of SVGElements.
+ +

Definition at line 181 of file Parser.cpp.

+
181  {
+
182  rapidxml::xml_document<> doc;
+
183  std::ifstream file(file_name);
+
184  std::vector< char > buffer((std::istreambuf_iterator< char >(file)),
+
185  std::istreambuf_iterator< char >());
+
186  buffer.push_back('\0');
+
187  doc.parse< 0 >(&buffer[0]);
+
188 
+
189  rapidxml::xml_node<> *svg = doc.first_node();
+
190  viewport.x = getFloatAttribute(svg, "width");
+
191  viewport.y = getFloatAttribute(svg, "height");
+
192  std::string viewbox = getAttribute(svg, "viewBox");
+
193  if (viewbox != "") {
+
194  std::stringstream ss(viewbox);
+
195  ss >> this->viewbox.first.x >> this->viewbox.first.y >>
+
196  this->viewbox.second.x >> this->viewbox.second.y;
+
197  }
+
198  rapidxml::xml_node<> *node = svg->first_node();
+
199  rapidxml::xml_node<> *prev = NULL;
+
200 
+
201  SVGElement *root = new Group();
+
202  SVGElement *current = root;
+
203 
+
204  while (node) {
+
205  if (std::string(node->name()) == "defs") {
+
206  GetGradients(node);
+
207  prev = node;
+
208  node = node->next_sibling();
+
209  } else if (std::string(node->name()) == "g") {
+
210  Group *group = dynamic_cast< Group * >(current);
+
211  for (auto group_attribute : group->getAttributes()) {
+
212  bool found = false;
+
213  for (auto attribute = node->first_attribute(); attribute;
+
214  attribute = attribute->next_attribute()) {
+
215  if (std::string(attribute->name()) ==
+
216  group_attribute.first) {
+
217  if (group_attribute.first == "opacity") {
+
218  std::string opacity = std::to_string(
+
219  std::stof(attribute->value()) *
+
220  std::stof(group_attribute.second));
+
221  char *value = doc.allocate_string(opacity.c_str());
+
222  attribute->value(value);
+
223  }
+
224  found = true;
+
225  break;
+
226  }
+
227  }
+
228  if (!found && group_attribute.first != "transform") {
+
229  char *name =
+
230  doc.allocate_string(group_attribute.first.c_str());
+
231  char *value =
+
232  doc.allocate_string(group_attribute.second.c_str());
+
233  rapidxml::xml_attribute<> *new_attribute =
+
234  doc.allocate_attribute(name, value);
+
235  node->append_attribute(new_attribute);
+
236  }
+
237  }
+
238  Group *new_group = new Group(xmlToString(node->first_attribute()));
+
239  new_group->setTransforms(getTransformOrder(node));
+
240  current->addElement(new_group);
+
241  current = new_group;
+
242  prev = node;
+
243  node = node->first_node();
+
244  } else {
+
245  Group *group = dynamic_cast< Group * >(current);
+
246  for (auto group_attribute : group->getAttributes()) {
+
247  bool found = false;
+
248  for (auto attribute = node->first_attribute(); attribute;
+
249  attribute = attribute->next_attribute()) {
+
250  if (std::string(attribute->name()) ==
+
251  group_attribute.first) {
+
252  if (group_attribute.first == "opacity") {
+
253  std::string opacity = std::to_string(
+
254  std::stof(attribute->value()) *
+
255  std::stof(group_attribute.second));
+
256  char *value = doc.allocate_string(opacity.c_str());
+
257  attribute->value(value);
+
258  }
+
259  found = true;
+
260  break;
+
261  }
+
262  }
+
263  if (!found && group_attribute.first != "transform") {
+
264  char *name =
+
265  doc.allocate_string(group_attribute.first.c_str());
+
266  char *value =
+
267  doc.allocate_string(group_attribute.second.c_str());
+
268  rapidxml::xml_attribute<> *new_attribute =
+
269  doc.allocate_attribute(name, value);
+
270  node->append_attribute(new_attribute);
+
271  }
+
272  }
+
273  SVGElement *shape = parseShape(node);
+
274  if (shape != NULL) current->addElement(shape);
+
275  prev = node;
+
276  node = node->next_sibling();
+
277  }
+
278  if (node == NULL && current != root) {
+
279  while (prev->parent()->next_sibling() == NULL) {
+
280  current = current->getParent();
+
281  prev = prev->parent();
+
282  if (prev == svg) {
+
283  break;
+
284  }
+
285  }
+
286  if (prev == svg) {
+
287  break;
+
288  }
+
289  current = current->getParent();
+
290  node = prev->parent()->next_sibling();
+
291  }
+
292  }
+
293  return root;
+
294 }
+
Attributes getAttributes() const
Gets the attributes of the shape.
Definition: Group.cpp:15
+
SVGElement * parseShape(rapidxml::xml_node<> *node)
Parses the group of elements.
Definition: Parser.cpp:667
+
void GetGradients(rapidxml::xml_node<> *node)
Gets the gradients of a node.
Definition: Parser.cpp:428
+
Represents an element in an SVG file.
Definition: SVGElement.hpp:18
+
void setTransforms(const std::vector< std::string > &transforms)
Sets the transformations of the shape.
Definition: SVGElement.cpp:67
+
SVGElement * getParent() const
Parent pointer getter.
Definition: SVGElement.cpp:77
+
SVGElement * parent
Pointer to the group that contains the shape.
Definition: SVGElement.hpp:219
+
virtual void addElement(SVGElement *element)
Adds a shape to the composite group.
Definition: SVGElement.cpp:83
+
T x
X coordinate of the vector.
Definition: Vector2D.hpp:45
+
T y
Y coordinate of the vector.
Definition: Vector2D.hpp:46
+
+
+
+ +

◆ parseEllipse()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Ell * Parser::parseEllipse (rapidxml::xml_node<> * node,
const mColorfill_color,
const mColorstroke_color,
float stroke_width 
)
+
+private
+
+ +

Parses the ellipse element.

+
Parameters
+ + + + + +
nodeThe node to be parsed.
fill_colorThe color of the fill
stroke_colorThe color of the stroke
stroke_widthThe width of the stroke
+
+
+
Returns
The ellipse element
+ +

Definition at line 743 of file Parser.cpp.

+
744  {
+
745  float radius_x = getFloatAttribute(node, "rx");
+
746  float radius_y = getFloatAttribute(node, "ry");
+
747  float cx = getFloatAttribute(node, "cx");
+
748  float cy = getFloatAttribute(node, "cy");
+
749  Ell *shape = new Ell(Vector2Df(radius_x, radius_y), Vector2Df(cx, cy),
+
750  fill_color, stroke_color, stroke_width);
+
751  return shape;
+
752 }
+
Represents an ellipse in 2D space.
Definition: Ellipse.hpp:12
+
+
+
+ +

◆ parseGradient()

+ +
+
+ + + + + +
+ + + + + + + + +
Gradient * Parser::parseGradient (std::string id)
+
+private
+
+ +

Gets the gradient of a node.

+
Parameters
+ + +
idThe id of the gradient to be parsed.
+
+
+
Returns
The gradient of the node.
+ +

Definition at line 404 of file Parser.cpp.

+
404  {
+
405  if (gradients.find(id) == gradients.end()) {
+
406  std::cout << "Gradient " << id << " not found" << std::endl;
+
407  exit(-1);
+
408  }
+
409  return gradients.at(id);
+
410 }
+
+
+
+ +

◆ parseLine()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Line * Parser::parseLine (rapidxml::xml_node<> * node,
const mColorstroke_color,
float stroke_width 
)
+
+private
+
+ +

Parses the line element.

+
Parameters
+ + + + +
nodeThe node to be parsed.
stroke_colorThe color of the stroke
stroke_widthThe width of the stroke
+
+
+
Returns
The line element
+ +

Definition at line 710 of file Parser.cpp.

+
711  {
+
712  Line *shape = new Line(
+
713  Vector2Df(getFloatAttribute(node, "x1"), getFloatAttribute(node, "y1")),
+
714  Vector2Df(getFloatAttribute(node, "x2"), getFloatAttribute(node, "y2")),
+
715  stroke_color, stroke_width);
+
716  return shape;
+
717 }
+
Represents a line in 2D space.
Definition: Line.hpp:12
+
+
+
+ +

◆ parsePath()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Path * Parser::parsePath (rapidxml::xml_node<> * node,
const mColorfill_color,
const mColorstroke_color,
float stroke_width 
)
+
+private
+
+ +

Parses the path element.

+
Parameters
+ + + + + +
nodeThe node to be parsed.
fill_colorThe color of the fill
stroke_colorThe color of the stroke
stroke_widthThe width of the stroke
+
+
+
Returns
The path element
+ +

Definition at line 807 of file Parser.cpp.

+
808  {
+
809  Path *shape = new Path(fill_color, stroke_color, stroke_width);
+
810  std::vector< PathPoint > points = parsePathPoints(node);
+
811  for (auto point : points) {
+
812  shape->addPoint(point);
+
813  }
+
814  std::string fill_rule = getAttribute(node, "fill-rule");
+
815  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
+
816  fill_rule.end());
+
817  shape->setFillRule(fill_rule);
+
818  return shape;
+
819 }
+
std::vector< PathPoint > parsePathPoints(rapidxml::xml_node<> *node)
Gets the points of the path element.
Definition: Parser.cpp:494
+
Represents a path element in 2D space.
Definition: Path.hpp:28
+
void setFillRule(std::string fill_rule)
Sets the fill rule of the path.
Definition: Path.cpp:12
+
void addPoint(PathPoint point)
Adds a point to the path.
Definition: Path.cpp:8
+
+
+
+ +

◆ parsePathPoints()

+ +
+
+ + + + + +
+ + + + + + + + +
std::vector< PathPoint > Parser::parsePathPoints (rapidxml::xml_node<> * node)
+
+private
+
+ +

Gets the points of the path element.

+
Parameters
+ + +
nodeThe node to be parsed.
+
+
+
Returns
The points of the path element
+ +

Definition at line 494 of file Parser.cpp.

+
494  {
+
495  std::vector< PathPoint > points;
+
496  std::string path_string = getAttribute(node, "d");
+
497 
+
498  formatSvgPathString(path_string);
+
499 
+
500  std::stringstream ss(path_string);
+
501  std::string element;
+
502  PathPoint pPoint{{0, 0}, 'M'};
+
503  while (ss >> element) {
+
504  if (std::isalpha(element[0])) {
+
505  pPoint.tc = element[0];
+
506  if (tolower(pPoint.tc) == 'm' || tolower(pPoint.tc) == 'l' ||
+
507  tolower(pPoint.tc) == 'c' || tolower(pPoint.tc) == 's' ||
+
508  tolower(pPoint.tc) == 'q' || tolower(pPoint.tc) == 't')
+
509  ss >> pPoint.point.x >> pPoint.point.y;
+
510  else if (tolower(pPoint.tc) == 'h') {
+
511  ss >> pPoint.point.x;
+
512  pPoint.point.y = 0;
+
513  } else if (tolower(pPoint.tc) == 'v') {
+
514  ss >> pPoint.point.y;
+
515  pPoint.point.x = 0;
+
516  } else if (tolower(pPoint.tc) == 'a') {
+
517  ss >> pPoint.radius.x >> pPoint.radius.y;
+
518  ss >> pPoint.x_axis_rotation;
+
519  ss >> pPoint.large_arc_flag >> pPoint.sweep_flag;
+
520  ss >> pPoint.point.x >> pPoint.point.y;
+
521  }
+
522  } else {
+
523  if (tolower(pPoint.tc) == 'm' || tolower(pPoint.tc) == 'l' ||
+
524  tolower(pPoint.tc) == 'c' || tolower(pPoint.tc) == 's' ||
+
525  tolower(pPoint.tc) == 'q' || tolower(pPoint.tc) == 't') {
+
526  if (tolower(pPoint.tc) == 'm') pPoint.tc = 'L';
+
527  pPoint.point.x = std::stof(element);
+
528  ss >> pPoint.point.y;
+
529  } else if (tolower(pPoint.tc) == 'h') {
+
530  pPoint.point.x = std::stof(element);
+
531  pPoint.point.y = 0;
+
532  } else if (tolower(pPoint.tc) == 'v') {
+
533  pPoint.point.y = std::stof(element);
+
534  pPoint.point.x = 0;
+
535  } else if (tolower(pPoint.tc) == 'a') {
+
536  pPoint.radius.x = std::stof(element);
+
537  ss >> pPoint.radius.y;
+
538  ss >> pPoint.x_axis_rotation;
+
539  ss >> pPoint.large_arc_flag >> pPoint.sweep_flag;
+
540  ss >> pPoint.point.x >> pPoint.point.y;
+
541  }
+
542  }
+
543  points.push_back(pPoint);
+
544  }
+
545 
+
546  std::vector< PathPoint > handle_points;
+
547 
+
548  Vector2Df first_point{0, 0}, cur_point{0, 0};
+
549  int n = points.size();
+
550  for (int i = 0; i < n; i++) {
+
551  if (tolower(points[i].tc) == 'm') {
+
552  first_point = points[i].point;
+
553  if (points[i].tc == 'm') {
+
554  first_point.x = cur_point.x + points[i].point.x;
+
555  first_point.y = cur_point.y + points[i].point.y;
+
556  }
+
557  cur_point = first_point;
+
558  handle_points.push_back({first_point, 'm'});
+
559  } else if (tolower(points[i].tc) == 'l' ||
+
560  tolower(points[i].tc) == 't') {
+
561  Vector2Df end_point{cur_point.x + points[i].point.x,
+
562  cur_point.y + points[i].point.y};
+
563  if (points[i].tc == 'L' || points[i].tc == 'T')
+
564  end_point = points[i].point;
+
565  cur_point = end_point;
+
566  char TC = tolower(points[i].tc);
+
567  handle_points.push_back({end_point, TC});
+
568  } else if (tolower(points[i].tc) == 'h') {
+
569  Vector2Df end_point{cur_point.x + points[i].point.x, cur_point.y};
+
570  if (points[i].tc == 'H')
+
571  end_point = Vector2Df{points[i].point.x, cur_point.y};
+
572  cur_point = end_point;
+
573  handle_points.push_back({end_point, 'h'});
+
574  } else if (tolower(points[i].tc) == 'v') {
+
575  Vector2Df end_point{cur_point.x, cur_point.y + points[i].point.y};
+
576  if (points[i].tc == 'V')
+
577  end_point = Vector2Df{cur_point.x, points[i].point.y};
+
578  cur_point = end_point;
+
579  handle_points.push_back({end_point, 'v'});
+
580  } else if (tolower(points[i].tc) == 'c') {
+
581  if (i + 2 < n) {
+
582  Vector2Df control_point1 =
+
583  Vector2Df{cur_point.x + points[i].point.x,
+
584  cur_point.y + points[i].point.y};
+
585  Vector2Df control_point2 =
+
586  Vector2Df{cur_point.x + points[i + 1].point.x,
+
587  cur_point.y + points[i + 1].point.y};
+
588  Vector2Df control_point3 =
+
589  Vector2Df{cur_point.x + points[i + 2].point.x,
+
590  cur_point.y + points[i + 2].point.y};
+
591  if (points[i].tc == 'C') {
+
592  control_point1 = points[i].point;
+
593  control_point2 = points[i + 1].point;
+
594  control_point3 = points[i + 2].point;
+
595  }
+
596  i += 2;
+
597  cur_point = control_point3;
+
598  handle_points.push_back({control_point1, 'c'});
+
599  handle_points.push_back({control_point2, 'c'});
+
600  handle_points.push_back({control_point3, 'c'});
+
601  }
+
602  } else if (tolower(points[i].tc) == 'z') {
+
603  cur_point = first_point;
+
604  handle_points.push_back({first_point, 'z'});
+
605  } else if (tolower(points[i].tc) == 's' ||
+
606  tolower(points[i].tc) == 'q') {
+
607  if (i + 1 < n) {
+
608  Vector2Df control_point1 =
+
609  Vector2Df{cur_point.x + points[i].point.x,
+
610  cur_point.y + points[i].point.y};
+
611  Vector2Df control_point2 =
+
612  Vector2Df{cur_point.x + points[i + 1].point.x,
+
613  cur_point.y + points[i + 1].point.y};
+
614  if (points[i].tc == 'S' || points[i].tc == 'Q') {
+
615  control_point1 = points[i].point;
+
616  control_point2 = points[i + 1].point;
+
617  }
+
618  i += 1;
+
619  cur_point = control_point2;
+
620  char TC = tolower(points[i].tc);
+
621  handle_points.push_back({control_point1, TC});
+
622  handle_points.push_back({control_point2, TC});
+
623  }
+
624  } else if (tolower(points[i].tc) == 'a') {
+
625  Vector2Df end_point{cur_point.x + points[i].point.x,
+
626  cur_point.y + points[i].point.y};
+
627  if (points[i].tc == 'A') end_point = points[i].point;
+
628  handle_points.push_back(
+
629  {end_point, 'a', points[i].radius, points[i].x_axis_rotation,
+
630  points[i].large_arc_flag, points[i].sweep_flag});
+
631  cur_point = end_point;
+
632  }
+
633  }
+
634  return handle_points;
+
635 }
+
A struct that contains a point and a type of point.
Definition: Path.hpp:10
+
+
+
+ +

◆ parsePoints()

+ +
+
+ + + + + +
+ + + + + + + + +
std::vector< Vector2Df > Parser::parsePoints (rapidxml::xml_node<> * node)
+
+private
+
+ +

Gets the points of the element.

+
Parameters
+ + +
nodeThe node to be parsed.
+
+
+
Returns
The points of the element
+ +

Definition at line 478 of file Parser.cpp.

+
478  {
+
479  std::vector< Vector2Df > points;
+
480  std::string points_string = getAttribute(node, "points");
+
481 
+
482  std::stringstream ss(points_string);
+
483  float x, y;
+
484 
+
485  while (ss >> x) {
+
486  if (ss.peek() == ',') ss.ignore();
+
487  ss >> y;
+
488  points.push_back(Vector2Df(x, y));
+
489  }
+
490 
+
491  return points;
+
492 }
+
+
+
+ +

◆ parsePolygon()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Plygon * Parser::parsePolygon (rapidxml::xml_node<> * node,
const mColorfill_color,
const mColorstroke_color,
float stroke_width 
)
+
+private
+
+ +

Parses the polygon element.

+
Parameters
+ + + + + +
nodeThe node to be parsed.
fill_colorThe color of the fill
stroke_colorThe color of the stroke
stroke_widthThe width of the stroke
+
+
+
Returns
The polygon element
+ +

Definition at line 754 of file Parser.cpp.

+
756  {
+
757  Plygon *shape = new Plygon(fill_color, stroke_color, stroke_width);
+
758  std::vector< Vector2Df > points = parsePoints(node);
+
759  for (auto point : points) {
+
760  shape->addPoint(point);
+
761  }
+
762  std::string fill_rule = getAttribute(node, "fill-rule");
+
763  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
+
764  fill_rule.end());
+
765  shape->setFillRule(fill_rule);
+
766  return shape;
+
767 }
+
std::vector< Vector2Df > parsePoints(rapidxml::xml_node<> *node)
Gets the points of the element.
Definition: Parser.cpp:478
+
Represents a polygon in 2D space.
Definition: Polygon.hpp:12
+
void setFillRule(std::string fill_rule)
Sets the fill rule of the polyshape.
Definition: PolyShape.cpp:11
+
virtual void addPoint(const Vector2Df &point)
Adds a vertex to the shape.
Definition: PolyShape.cpp:7
+
+
+
+ +

◆ parsePolyline()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Plyline * Parser::parsePolyline (rapidxml::xml_node<> * node,
const mColorfill_color,
const mColorstroke_color,
float stroke_width 
)
+
+private
+
+ +

Parses the polyline element.

+
Parameters
+ + + + + +
nodeThe node to be parsed.
fill_colorThe color of the fill
stroke_colorThe color of the stroke
stroke_widthThe width of the stroke
+
+
+
Returns
The polyline element
+ +

Definition at line 769 of file Parser.cpp.

+
771  {
+
772  Plyline *shape = new Plyline(fill_color, stroke_color, stroke_width);
+
773  std::vector< Vector2Df > points = parsePoints(node);
+
774  for (auto point : points) {
+
775  shape->addPoint(point);
+
776  }
+
777  std::string fill_rule = getAttribute(node, "fill-rule");
+
778  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
+
779  fill_rule.end());
+
780  shape->setFillRule(fill_rule);
+
781  return shape;
+
782 }
+
Represents a polyline in 2D space.
Definition: Polyline.hpp:12
+
+
+
+ +

◆ parseRect()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rect * Parser::parseRect (rapidxml::xml_node<> * node,
const mColorfill_color,
const mColorstroke_color,
float stroke_width 
)
+
+private
+
+ +

Parses the rect element.

+
Parameters
+ + + + + +
nodeThe node to be parsed.
fill_colorThe color of the fill
stroke_colorThe color of the stroke
stroke_widthThe width of the stroke
+
+
+
Returns
The rect element
+ +

Definition at line 719 of file Parser.cpp.

+
720  {
+
721  float x = getFloatAttribute(node, "x");
+
722  float y = getFloatAttribute(node, "y");
+
723  float rx = getFloatAttribute(node, "rx");
+
724  float ry = getFloatAttribute(node, "ry");
+
725  Rect *shape =
+
726  new Rect(getFloatAttribute(node, "width"),
+
727  getFloatAttribute(node, "height"), Vector2Df(x, y),
+
728  Vector2Df(rx, ry), fill_color, stroke_color, stroke_width);
+
729  return shape;
+
730 }
+
Represents a rectangle in 2D space.
Definition: Rect.hpp:13
+
+
+
+ +

◆ parseShape()

+ +
+
+ + + + + +
+ + + + + + + + +
SVGElement * Parser::parseShape (rapidxml::xml_node<> * node)
+
+private
+
+ +

Parses the group of elements.

+
Parameters
+ + +
nodeThe node to be parsed.
+
+
+
Returns
The group of elements
+ +

Definition at line 667 of file Parser.cpp.

+
667  {
+
668  SVGElement *shape = NULL;
+
669  std::string type = node->name();
+
670  std::string id = "";
+
671  mColor stroke_color = parseColor(node, "stroke", id);
+
672  mColor fill_color = parseColor(node, "fill", id);
+
673  float stroke_width = getFloatAttribute(node, "stroke-width");
+
674  if (type == "line") {
+
675  shape = parseLine(node, stroke_color, stroke_width);
+
676  } else if (type == "rect") {
+
677  shape = parseRect(node, fill_color, stroke_color, stroke_width);
+
678  } else if (type == "circle") {
+
679  shape = parseCircle(node, fill_color, stroke_color, stroke_width);
+
680  } else if (type == "ellipse") {
+
681  shape = parseEllipse(node, fill_color, stroke_color, stroke_width);
+
682  } else if (type == "polygon") {
+
683  shape = parsePolygon(node, fill_color, stroke_color, stroke_width);
+
684  } else if (type == "polyline") {
+
685  shape = parsePolyline(node, fill_color, stroke_color, stroke_width);
+
686  } else if (type == "path") {
+
687  shape = parsePath(node, fill_color, stroke_color, stroke_width);
+
688  } else if (type == "text") {
+
689  shape = parseText(node, fill_color, stroke_color, stroke_width);
+
690  }
+
691  if (shape != NULL) {
+
692  if (type == "text") {
+
693  float dx = getFloatAttribute(node, "dx");
+
694  float dy = getFloatAttribute(node, "dy");
+
695  std::string transform = "translate(" + std::to_string(dx) + " " +
+
696  std::to_string(dy) + ")";
+
697  std::vector< std::string > transform_order =
+
698  getTransformOrder(node);
+
699  transform_order.push_back(transform);
+
700  shape->setTransforms(transform_order);
+
701  } else
+
702  shape->setTransforms(getTransformOrder(node));
+
703  if (id != "") {
+
704  shape->setGradient(parseGradient(id));
+
705  }
+
706  }
+
707  return shape;
+
708 }
+
class Plyline * parsePolyline(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the polyline element.
Definition: Parser.cpp:769
+
class Ell * parseEllipse(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the ellipse element.
Definition: Parser.cpp:743
+
Rect * parseRect(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the rect element.
Definition: Parser.cpp:719
+
Text * parseText(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the text element.
Definition: Parser.cpp:784
+
Path * parsePath(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the path element.
Definition: Parser.cpp:807
+
class Plygon * parsePolygon(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the polygon element.
Definition: Parser.cpp:754
+
Line * parseLine(rapidxml::xml_node<> *node, const mColor &stroke_color, float stroke_width)
Parses the line element.
Definition: Parser.cpp:710
+
Circle * parseCircle(rapidxml::xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
Parses the circle element.
Definition: Parser.cpp:732
+
void setGradient(Gradient *gradient)
Sets the gradient of the shape.
Definition: SVGElement.cpp:79
+
+
+
+ +

◆ parseText()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Text * Parser::parseText (rapidxml::xml_node<> * node,
const mColorfill_color,
const mColorstroke_color,
float stroke_width 
)
+
+private
+
+ +

Parses the text element.

+
Parameters
+ + + + + +
nodeThe node to be parsed.
fill_colorThe color of the fill
stroke_colorThe color of the stroke
stroke_widthThe width of the stroke
+
+
+
Returns
The text element
+ +

Definition at line 784 of file Parser.cpp.

+
785  {
+
786  float x = getFloatAttribute(node, "x");
+
787  float y = getFloatAttribute(node, "y");
+
788  float font_size = getFloatAttribute(node, "font-size");
+
789  std::string text = getAttribute(node, "text");
+
790 
+
791  Text *shape =
+
792  new Text(Vector2Df(x - (font_size * 6.6 / 40),
+
793  y - font_size + (font_size * 4.4 / 40)),
+
794  text, font_size, fill_color, stroke_color, stroke_width);
+
795 
+
796  std::string anchor = getAttribute(node, "text-anchor");
+
797  anchor.erase(std::remove(anchor.begin(), anchor.end(), ' '), anchor.end());
+
798  shape->setAnchor(anchor);
+
799 
+
800  std::string style = getAttribute(node, "font-style");
+
801  style.erase(std::remove(style.begin(), style.end(), ' '), style.end());
+
802  shape->setFontStyle(style);
+
803 
+
804  return shape;
+
805 }
+
Represents text in 2D space.
Definition: Text.hpp:12
+
void setFontStyle(std::string style)
Sets the style of the text.
Definition: Text.cpp:22
+
void setAnchor(std::string anchor)
Sets the anchor of the text.
Definition: Text.cpp:18
+
+
+
+ +

◆ printShapesData()

+ +
+
+ + + + + + + +
void Parser::printShapesData ()
+
+ +

Prints the data of the shapes.

+
Note
This function is used for debugging.
+ +

Definition at line 828 of file Parser.cpp.

+
828 { root->printData(); }
+
virtual void printData() const
Prints the data of the shape.
Definition: SVGElement.cpp:47
+
+
+
+

Member Data Documentation

+ +

◆ gradients

+ +
+
+ + + + + +
+ + + + +
std::map< std::string, Gradient* > Parser::gradients
+
+private
+
+

The gradients of the SVG file.

+ +

Definition at line 277 of file Parser.hpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+
+ + + \ No newline at end of file diff --git a/docs/classParser.js b/docs/classParser.js new file mode 100644 index 00000000..882e1797 --- /dev/null +++ b/docs/classParser.js @@ -0,0 +1,35 @@ +var classParser = +[ + [ "Parser", "classParser.html#a48044a8caa14a251cb4dad9fb363658e", null ], + [ "~Parser", "classParser.html#a3e658b5917a93a3ef648050d060e3a93", null ], + [ "Parser", "classParser.html#a350fc3e35535c5891cd9e36e79ee546a", null ], + [ "getAttribute", "classParser.html#a63329a7accdf332feb3fba1bcc4deec6", null ], + [ "getFloatAttribute", "classParser.html#ab2b1df7c69830fafcbe36de5199dcd30", null ], + [ "GetGradients", "classParser.html#ac00eac6bf37c45c9160fa47700d2466f", null ], + [ "getGradientStops", "classParser.html#aca2ed5f466436a9e9f78618bb1e356fd", null ], + [ "getInstance", "classParser.html#a06952fa44f19fdb573c1355ac26454c5", null ], + [ "getRoot", "classParser.html#a59ed4455eaec306cde11939785c4e71a", null ], + [ "getTransformOrder", "classParser.html#a99df58e649089762bf434502173716d6", null ], + [ "getViewBox", "classParser.html#a4efa2342d694eff2ab6ba1d150c7bb69", null ], + [ "getViewPort", "classParser.html#a009fbe10a1b9b58a65be44634335a062", null ], + [ "parseCircle", "classParser.html#ab7776f740b7d63c388a086c8b8ecccd0", null ], + [ "parseColor", "classParser.html#a18d5a9aa35bd124023a060940486e183", null ], + [ "parseElements", "classParser.html#aaf9f19591ff93f0c0c2fd68955e4a4af", null ], + [ "parseEllipse", "classParser.html#a0af0085ee5e20739bdf23a5b685642b6", null ], + [ "parseGradient", "classParser.html#ac1e519500fce1b4192362ed1aa5ccbc3", null ], + [ "parseLine", "classParser.html#a95e84ae219109769fae08702381acf78", null ], + [ "parsePath", "classParser.html#a6f80728e7a771d2653baf1b453b655d9", null ], + [ "parsePathPoints", "classParser.html#aecea54d6bc1ff225a6ac450ccbb560c3", null ], + [ "parsePoints", "classParser.html#af408a2ef7b27ceed0547093d73e6b2eb", null ], + [ "parsePolygon", "classParser.html#a7afd52c648dc5983e596edfa7eb6bbb5", null ], + [ "parsePolyline", "classParser.html#a03766f0f9f6ebdead0474973d3ac50aa", null ], + [ "parseRect", "classParser.html#a20352ab58a59e61f6da1b4d20861907d", null ], + [ "parseShape", "classParser.html#abfd09c5dd46fb0dc9bcd9106857dbf5e", null ], + [ "parseText", "classParser.html#a539bda46a2832a22741105c9299c12cb", null ], + [ "printShapesData", "classParser.html#a3d8927f2e26abf6a63bd850c154b23c6", null ], + [ "gradients", "classParser.html#a7f085da78317baf2cc61e6e92b4b29c8", null ], + [ "instance", "classParser.html#ae3a28c02c18171f4e83fae54b9f21a90", null ], + [ "root", "classParser.html#a13a5e2fdac62670c1584de1edbba77f2", null ], + [ "viewbox", "classParser.html#a7eb24f4915ba9b7a652ca204c1edb2c7", null ], + [ "viewport", "classParser.html#a2872aff3bfb15fdb1df2dcdce2bd632a", null ] +]; \ No newline at end of file diff --git a/docs/classParser__coll__graph.map b/docs/classParser__coll__graph.map new file mode 100644 index 00000000..50863950 --- /dev/null +++ b/docs/classParser__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classParser__coll__graph.md5 b/docs/classParser__coll__graph.md5 new file mode 100644 index 00000000..f01d584f --- /dev/null +++ b/docs/classParser__coll__graph.md5 @@ -0,0 +1 @@ +05c158b829a8e9183f51bdd787bd2a08 \ No newline at end of file diff --git a/docs/html/classParser__coll__graph.png b/docs/classParser__coll__graph.png similarity index 100% rename from docs/html/classParser__coll__graph.png rename to docs/classParser__coll__graph.png diff --git a/docs/classParser__coll__graph.svg b/docs/classParser__coll__graph.svg new file mode 100644 index 00000000..1c61f4c2 --- /dev/null +++ b/docs/classParser__coll__graph.svg @@ -0,0 +1,122 @@ + + + + + + +Parser + + +Node1 + + +Parser + + + + + +Node1->Node1 + + + instance + + + +Node2 + + +Vector2D< float > + + + + + +Node2->Node1 + + + viewport + + + +Node3 + + +SVGElement + + + + + +Node2->Node3 + + + position + + + +Node3->Node1 + + + root + + + +Node3->Node3 + + + parent + + + +Node4 + + +Gradient + + + + + +Node4->Node3 + + + gradient + + + +Node5 + + +mColor + + + + + +Node5->Node3 + + + fill +stroke + + + +Node5->Node5 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/html/classPath-members.html b/docs/classPath-members.html similarity index 72% rename from docs/html/classPath-members.html rename to docs/classPath-members.html index ed0e9ff9..a02e49df 100644 --- a/docs/html/classPath-members.html +++ b/docs/classPath-members.html @@ -60,7 +60,7 @@
svg-reader -  0.2 +  0.3
Parse and render SVG files, handle user interactions.
@@ -131,12 +131,16 @@ getClass() const overridePathvirtual getFillColor() constSVGElement getFillRule() constPath - getOutlineColor() constSVGElement - getOutlineThickness() constSVGElement - getParent() constSVGElement - getPoints() constPath - getPosition() constSVGElement - getTransforms() constSVGElement + getGradient() constSVGElement + getMaxBound() constSVGElementvirtual + getMinBound() constSVGElementvirtual + getOutlineColor() constSVGElement + getOutlineThickness() constSVGElement + getParent() constSVGElement + getPoints() constPath + getPosition() constSVGElement + getTransforms() constSVGElement + gradientSVGElementprivate parentSVGElementprotected Path(const mColor &fill, const mColor &stroke, float stroke_width)Path pointsPathprivate @@ -144,17 +148,20 @@ printData() const overridePathvirtual setFillColor(const mColor &color)SVGElement setFillRule(std::string fill_rule)Path - setOutlineColor(const mColor &color)SVGElement - setOutlineThickness(float thickness)SVGElement - setParent(SVGElement *parent)SVGElement - setPosition(float x, float y)SVGElement - setPosition(const Vector2Df &position)SVGElement - setTransforms(const std::vector< std::string > &transforms)SVGElement - strokeSVGElementprivate - stroke_widthSVGElementprivate - SVGElement()SVGElementprotected - transformsSVGElementprivate - ~SVGElement()=defaultSVGElementvirtual + setGradient(Gradient *gradient)SVGElement + setOutlineColor(const mColor &color)SVGElement + setOutlineThickness(float thickness)SVGElement + setParent(SVGElement *parent)SVGElement + setPosition(float x, float y)SVGElement + setPosition(const Vector2Df &position)SVGElement + setTransforms(const std::vector< std::string > &transforms)SVGElement + strokeSVGElementprivate + stroke_widthSVGElementprivate + SVGElement()SVGElementprotected + SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)SVGElementprotected + SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)SVGElementprotected + transformsSVGElementprivate + ~SVGElement()=defaultSVGElementvirtual - -

◆ setFillRule()

- -
-
- - - - - - - - -
void Plygon::setFillRule (std::string fill_rule)
-
- -

Sets the fill rule of the polygon.

-
Parameters
- - -
fill_ruleThe new fill rule of the polygon.
-
-
- -

Definition at line 8 of file Polygon.cpp.

-
8 { this->fill_rule = fill_rule; }
-
-
-

The documentation for this class was generated from the following files:
  • src/graphics/Polygon.hpp
  • src/graphics/Polygon.cpp
  • diff --git a/docs/classPlygon.js b/docs/classPlygon.js new file mode 100644 index 00000000..1b7c07fb --- /dev/null +++ b/docs/classPlygon.js @@ -0,0 +1,5 @@ +var classPlygon = +[ + [ "Plygon", "classPlygon.html#ac3f4fb224f4f84c3bd6e41093cd847cd", null ], + [ "getClass", "classPlygon.html#aab00a0d0230ea320271e96c326c6b919", null ] +]; \ No newline at end of file diff --git a/docs/classPlygon__coll__graph.map b/docs/classPlygon__coll__graph.map new file mode 100644 index 00000000..71c0076f --- /dev/null +++ b/docs/classPlygon__coll__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/classPlygon__coll__graph.md5 b/docs/classPlygon__coll__graph.md5 new file mode 100644 index 00000000..5ab64650 --- /dev/null +++ b/docs/classPlygon__coll__graph.md5 @@ -0,0 +1 @@ +8536278a428191f058cbfd035fae0c5b \ No newline at end of file diff --git a/docs/classPlygon__coll__graph.svg b/docs/classPlygon__coll__graph.svg new file mode 100644 index 00000000..0eeeafd4 --- /dev/null +++ b/docs/classPlygon__coll__graph.svg @@ -0,0 +1,122 @@ + + + + + + +Plygon + + +Node1 + + +Plygon + + + + + +Node2 + + +PolyShape + + + + + +Node2->Node1 + + + + + +Node3 + + +SVGElement + + + + + +Node3->Node2 + + + + + +Node3->Node3 + + + parent + + + +Node4 + + +Vector2D< float > + + + + + +Node4->Node3 + + + position + + + +Node5 + + +Gradient + + + + + +Node5->Node3 + + + gradient + + + +Node6 + + +mColor + + + + + +Node6->Node3 + + + fill +stroke + + + +Node6->Node6 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/html/classPlygon__inherit__graph.map b/docs/classPlygon__inherit__graph.map similarity index 100% rename from docs/html/classPlygon__inherit__graph.map rename to docs/classPlygon__inherit__graph.map diff --git a/docs/html/classPlygon__inherit__graph.md5 b/docs/classPlygon__inherit__graph.md5 similarity index 100% rename from docs/html/classPlygon__inherit__graph.md5 rename to docs/classPlygon__inherit__graph.md5 diff --git a/docs/html/classPlygon__inherit__graph.svg b/docs/classPlygon__inherit__graph.svg similarity index 100% rename from docs/html/classPlygon__inherit__graph.svg rename to docs/classPlygon__inherit__graph.svg diff --git a/docs/html/classPlyline-members.html b/docs/classPlyline-members.html similarity index 67% rename from docs/html/classPlyline-members.html rename to docs/classPlyline-members.html index 93af446b..d14c0b11 100644 --- a/docs/html/classPlyline-members.html +++ b/docs/classPlyline-members.html @@ -60,7 +60,7 @@
    svg-reader -  0.2 +  0.3
    Parse and render SVG files, handle user interactions.
    @@ -127,16 +127,20 @@ addElement(SVGElement *element)SVGElementvirtual addPoint(const Vector2Df &point)PolyShapevirtual fillSVGElementprivate - fill_rulePlylineprivate + fill_rulePolyShapeprotected getClass() const overridePlylinevirtual getFillColor() constSVGElement - getFillRule() constPlyline - getOutlineColor() constSVGElement - getOutlineThickness() constSVGElement - getParent() constSVGElement - getPoints() constPolyShape - getPosition() constSVGElement - getTransforms() constSVGElement + getFillRule() constPolyShape + getGradient() constSVGElement + getMaxBound() const overridePolyShapevirtual + getMinBound() const overridePolyShapevirtual + getOutlineColor() constSVGElement + getOutlineThickness() constSVGElement + getParent() constSVGElement + getPoints() constPolyShape + getPosition() constSVGElement + getTransforms() constSVGElement + gradientSVGElementprivate parentSVGElementprotected Plyline(const mColor &fill, const mColor &stroke, float stroke_width)Plyline pointsPolyShapeprotected @@ -144,18 +148,21 @@ positionSVGElementprivate printData() const overridePolyShapevirtual setFillColor(const mColor &color)SVGElement - setFillRule(std::string fill_rule)Plyline - setOutlineColor(const mColor &color)SVGElement - setOutlineThickness(float thickness)SVGElement - setParent(SVGElement *parent)SVGElement - setPosition(float x, float y)SVGElement - setPosition(const Vector2Df &position)SVGElement - setTransforms(const std::vector< std::string > &transforms)SVGElement - strokeSVGElementprivate - stroke_widthSVGElementprivate - SVGElement()SVGElementprotected - transformsSVGElementprivate - ~SVGElement()=defaultSVGElementvirtual + setFillRule(std::string fill_rule)PolyShape + setGradient(Gradient *gradient)SVGElement + setOutlineColor(const mColor &color)SVGElement + setOutlineThickness(float thickness)SVGElement + setParent(SVGElement *parent)SVGElement + setPosition(float x, float y)SVGElement + setPosition(const Vector2Df &position)SVGElement + setTransforms(const std::vector< std::string > &transforms)SVGElement + strokeSVGElementprivate + stroke_widthSVGElementprivate + SVGElement()SVGElementprotected + SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)SVGElementprotected + SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)SVGElementprotected + transformsSVGElementprivate + ~SVGElement()=defaultSVGElementvirtual - -

    ◆ setFillRule()

    - -
    -
    - - - - - - - - -
    void Plyline::setFillRule (std::string fill_rule)
    -
    - -

    Sets the fill rule of the polyline.

    -
    Parameters
    - - -
    fill_ruleThe new fill rule of the polyline.
    -
    -
    - -

    Definition at line 8 of file Polyline.cpp.

    -
    8  {
    -
    9  this->fill_rule = fill_rule;
    -
    10 }
    -
    -
    -

    The documentation for this class was generated from the following files:
    • src/graphics/Polyline.hpp
    • src/graphics/Polyline.cpp
    • diff --git a/docs/classPlyline.js b/docs/classPlyline.js new file mode 100644 index 00000000..8281f55a --- /dev/null +++ b/docs/classPlyline.js @@ -0,0 +1,5 @@ +var classPlyline = +[ + [ "Plyline", "classPlyline.html#a8bf7677d7adb76f146607ef1aaa49bd3", null ], + [ "getClass", "classPlyline.html#a5b9d86c75604d329037cd47e8ba3d5b9", null ] +]; \ No newline at end of file diff --git a/docs/classPlyline__coll__graph.map b/docs/classPlyline__coll__graph.map new file mode 100644 index 00000000..01053f2f --- /dev/null +++ b/docs/classPlyline__coll__graph.map @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/classPlyline__coll__graph.md5 b/docs/classPlyline__coll__graph.md5 new file mode 100644 index 00000000..53602d57 --- /dev/null +++ b/docs/classPlyline__coll__graph.md5 @@ -0,0 +1 @@ +f0ed404981477147a32211aec4575635 \ No newline at end of file diff --git a/docs/classPlyline__coll__graph.svg b/docs/classPlyline__coll__graph.svg new file mode 100644 index 00000000..068048a4 --- /dev/null +++ b/docs/classPlyline__coll__graph.svg @@ -0,0 +1,122 @@ + + + + + + +Plyline + + +Node1 + + +Plyline + + + + + +Node2 + + +PolyShape + + + + + +Node2->Node1 + + + + + +Node3 + + +SVGElement + + + + + +Node3->Node2 + + + + + +Node3->Node3 + + + parent + + + +Node4 + + +Vector2D< float > + + + + + +Node4->Node3 + + + position + + + +Node5 + + +Gradient + + + + + +Node5->Node3 + + + gradient + + + +Node6 + + +mColor + + + + + +Node6->Node3 + + + fill +stroke + + + +Node6->Node6 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/html/classPlyline__inherit__graph.map b/docs/classPlyline__inherit__graph.map similarity index 100% rename from docs/html/classPlyline__inherit__graph.map rename to docs/classPlyline__inherit__graph.map diff --git a/docs/html/classPlyline__inherit__graph.md5 b/docs/classPlyline__inherit__graph.md5 similarity index 100% rename from docs/html/classPlyline__inherit__graph.md5 rename to docs/classPlyline__inherit__graph.md5 diff --git a/docs/html/classPlyline__inherit__graph.svg b/docs/classPlyline__inherit__graph.svg similarity index 100% rename from docs/html/classPlyline__inherit__graph.svg rename to docs/classPlyline__inherit__graph.svg diff --git a/docs/html/classPolyShape-members.html b/docs/classPolyShape-members.html similarity index 76% rename from docs/html/classPolyShape-members.html rename to docs/classPolyShape-members.html index 25bebfcf..b935adfc 100644 --- a/docs/html/classPolyShape-members.html +++ b/docs/classPolyShape-members.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -127,20 +127,28 @@ addElement(SVGElement *element)SVGElementvirtual addPoint(const Vector2Df &point)PolyShapevirtual fillSVGElementprivate - getClass() const =0PolyShapepure virtual - getFillColor() constSVGElement - getOutlineColor() constSVGElement - getOutlineThickness() constSVGElement - getParent() constSVGElement - getPoints() constPolyShape - getPosition() constSVGElement - getTransforms() constSVGElement + fill_rulePolyShapeprotected + getClass() const =0PolyShapepure virtual + getFillColor() constSVGElement + getFillRule() constPolyShape + getGradient() constSVGElement + getMaxBound() const overridePolyShapevirtual + getMinBound() const overridePolyShapevirtual + getOutlineColor() constSVGElement + getOutlineThickness() constSVGElement + getParent() constSVGElement + getPoints() constPolyShape + getPosition() constSVGElement + getTransforms() constSVGElement + gradientSVGElementprivate parentSVGElementprotected pointsPolyShapeprotected PolyShape(const mColor &fill, const mColor &stroke, float stroke_width)PolyShapeprotected positionSVGElementprivate printData() const overridePolyShapevirtual setFillColor(const mColor &color)SVGElement + setFillRule(std::string fill_rule)PolyShape + setGradient(Gradient *gradient)SVGElement setOutlineColor(const mColor &color)SVGElement setOutlineThickness(float thickness)SVGElement setParent(SVGElement *parent)SVGElement @@ -150,6 +158,8 @@ strokeSVGElementprivate stroke_widthSVGElementprivate SVGElement()SVGElementprotected + SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)SVGElementprotected + SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)SVGElementprotected transformsSVGElementprivate ~SVGElement()=defaultSVGElementvirtual diff --git a/docs/html/classPolyShape.html b/docs/classPolyShape.html similarity index 66% rename from docs/html/classPolyShape.html rename to docs/classPolyShape.html index 44e7d5de..ac41d52d 100644 --- a/docs/html/classPolyShape.html +++ b/docs/classPolyShape.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -134,12 +134,14 @@
      Inheritance diagram for PolyShape:
      -
      +
      +
      [legend]
      Collaboration diagram for PolyShape:
      -
      +
      +
      [legend]
      + + + + + + + + + + + + @@ -200,6 +214,12 @@ + + + + + + @@ -213,6 +233,12 @@ + + + + + +

      @@ -153,6 +155,18 @@

      const std::vector< Vector2Df > & getPoints () const
       Gets the total number of vertices representing the shape. More...
       
      void setFillRule (std::string fill_rule)
       Sets the fill rule of the polyshape. More...
       
      std::string getFillRule () const
       Gets the fill rule of the polyshape. More...
       
      Vector2Df getMinBound () const override
       Gets the minimum bounding box of the shape. More...
       
      Vector2Df getMaxBound () const override
       Gets the maximum bounding box of the shape. More...
       
      void printData () const override
       Prints the data of the shape. More...
       
      SVGElementgetParent () const
       Parent pointer getter. More...
       
      void setGradient (Gradient *gradient)
       Sets the gradient of the shape. More...
       
      GradientgetGradient () const
       Gets the gradient of the shape. More...
       
      virtual void addElement (SVGElement *element)
       Adds a shape to the composite group. More...
       
       SVGElement ()
       Constructs a Shape object. More...
       
       SVGElement (const mColor &fill, const mColor &stroke, float stroke_width)
       Constructs a Shape object. More...
       
       SVGElement (const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)
       Constructs a Shape object. More...
       
      @@ -220,6 +246,10 @@ std::vector< Vector2Df >  + + + @@ -283,17 +313,11 @@

      Definition at line 3 of file PolyShape.cpp.

      -
      4  {
      - - - -
      8 }
      -
      mColor fill
      Fill color.
      Definition: SVGElement.hpp:169
      -
      float stroke_width
      Thickness of the shape's outline.
      Definition: SVGElement.hpp:171
      -
      void setOutlineThickness(float thickness)
      Sets the outline thickness of the shape.
      Definition: SVGElement.cpp:16
      -
      mColor stroke
      Outline color.
      Definition: SVGElement.hpp:170
      -
      void setFillColor(const mColor &color)
      Sets the fill color of the shape.
      Definition: SVGElement.cpp:8
      -
      void setOutlineColor(const mColor &color)
      Sets the outline color of the shape.
      Definition: SVGElement.cpp:12
      +
      +
      mColor fill
      Fill color.
      Definition: SVGElement.hpp:222
      +
      float stroke_width
      Thickness of the shape's outline.
      Definition: SVGElement.hpp:224
      +
      mColor stroke
      Outline color.
      Definition: SVGElement.hpp:223
      +
      SVGElement()
      Constructs a Shape object.
      Definition: SVGElement.cpp:5
      @@ -330,8 +354,8 @@

      Definition at line 10 of file PolyShape.cpp.

      -
      10 { points.push_back(point); }
      +

      Definition at line 7 of file PolyShape.cpp.

      +
      7 { points.push_back(point); }
      std::vector< Vector2Df > points
      Vertices of the polyshape.
      Definition: PolyShape.hpp:14
      @@ -364,8 +388,115 @@

      SVGElement.

      -

      Implemented in Rect, Plyline, and Plygon.

      +

      Implemented in Plyline, and Plygon.

      + + + + +

      ◆ getFillRule()

      + +
      +
      +

      Protected Attributes

      points
       Vertices of the polyshape.
       
      +std::string fill_rule
       Fill rule of the polyshape.
       
      - Protected Attributes inherited from SVGElement
      SVGElementparent
      + + + + + + +
      std::string PolyShape::getFillRule () const
      +
      + +

      Gets the fill rule of the polyshape.

      +
      Returns
      The fill rule of the polyshape.
      + +

      Definition at line 15 of file PolyShape.cpp.

      +
      15 { return fill_rule; }
      +
      std::string fill_rule
      Fill rule of the polyshape.
      Definition: PolyShape.hpp:15
      +
      +
      + + +

      ◆ getMaxBound()

      + +
      +
      + + + + + +
      + + + + + + + +
      Vector2Df PolyShape::getMaxBound () const
      +
      +overridevirtual
      +
      + +

      Gets the maximum bounding box of the shape.

      +
      Returns
      The maximum bounding box of the shape.
      + +

      Reimplemented from SVGElement.

      + +

      Definition at line 27 of file PolyShape.cpp.

      +
      27  {
      +
      28  float max_x = points[0].x;
      +
      29  float max_y = points[0].y;
      +
      30  for (auto& point : points) {
      +
      31  max_x = std::max(max_x, point.x);
      +
      32  max_y = std::max(max_y, point.y);
      +
      33  }
      +
      34  return Vector2Df(max_x, max_y);
      +
      35 }
      + +
      +
      +
      + +

      ◆ getMinBound()

      + +
      +
      + + + + + +
      + + + + + + + +
      Vector2Df PolyShape::getMinBound () const
      +
      +overridevirtual
      +
      + +

      Gets the minimum bounding box of the shape.

      +
      Returns
      The minimum bounding box of the shape.
      +

      Reimplemented from SVGElement.

      + +

      Definition at line 17 of file PolyShape.cpp.

      +
      17  {
      +
      18  float min_x = points[0].x;
      +
      19  float min_y = points[0].y;
      +
      20  for (auto& point : points) {
      +
      21  min_x = std::min(min_x, point.x);
      +
      22  min_y = std::min(min_y, point.y);
      +
      23  }
      +
      24  return Vector2Df(min_x, min_y);
      +
      25 }
      +
      @@ -386,8 +517,8 @@

      Returns
      The number of vertices representing the shape.
      -

      Definition at line 12 of file PolyShape.cpp.

      -
      12 { return points; }
      +

      Definition at line 9 of file PolyShape.cpp.

      +
      9 { return points; }
      @@ -419,19 +550,48 @@

      SVGElement.

      -

      Reimplemented in Rect.

      - -

      Definition at line 14 of file PolyShape.cpp.

      -
      14  {
      - -
      16  std::cout << "Points: ";
      -
      17  for (auto& point : getPoints()) {
      -
      18  std::cout << point.x << "," << point.y << " ";
      -
      19  }
      -
      20  std::cout << std::endl;
      -
      21 }
      -
      const std::vector< Vector2Df > & getPoints() const
      Gets the total number of vertices representing the shape.
      Definition: PolyShape.cpp:12
      -
      virtual void printData() const
      Prints the data of the shape.
      Definition: SVGElement.cpp:33
      +

      Definition at line 37 of file PolyShape.cpp.

      +
      37  {
      + +
      39  std::cout << "Points: ";
      +
      40  for (auto& point : getPoints()) {
      +
      41  std::cout << point.x << "," << point.y << " ";
      +
      42  }
      +
      43  std::cout << std::endl;
      +
      44 }
      +
      const std::vector< Vector2Df > & getPoints() const
      Gets the total number of vertices representing the shape.
      Definition: PolyShape.cpp:9
      +
      virtual void printData() const
      Prints the data of the shape.
      Definition: SVGElement.cpp:47
      +
      +
      + + +

      ◆ setFillRule()

      + +
      +
      + + + + + + + + +
      void PolyShape::setFillRule (std::string fill_rule)
      +
      + +

      Sets the fill rule of the polyshape.

      +
      Parameters
      + + +
      fill_ruleThe new fill rule of the polyshape.
      +
      +
      + +

      Definition at line 11 of file PolyShape.cpp.

      +
      11  {
      +
      12  this->fill_rule = fill_rule;
      +
      13 }
      diff --git a/docs/html/classPolyShape.js b/docs/classPolyShape.js similarity index 54% rename from docs/html/classPolyShape.js rename to docs/classPolyShape.js index fc365c09..49587564 100644 --- a/docs/html/classPolyShape.js +++ b/docs/classPolyShape.js @@ -3,7 +3,12 @@ var classPolyShape = [ "PolyShape", "classPolyShape.html#a6fd054647bea080272ed79bbea7080ac", null ], [ "addPoint", "classPolyShape.html#a3a5e4952aff469f241ee1c9b92833f55", null ], [ "getClass", "classPolyShape.html#afc263d5407ca7ea50e30d641d779b73b", null ], + [ "getFillRule", "classPolyShape.html#acac99a28e69ee5020eed782175a5a355", null ], + [ "getMaxBound", "classPolyShape.html#a6ddda72dc27d7aade0ed444a52d7689f", null ], + [ "getMinBound", "classPolyShape.html#a0ad83e0129196572f99302830e0c9049", null ], [ "getPoints", "classPolyShape.html#a27704ef9fd50c041d1d233e9d99a4fd4", null ], [ "printData", "classPolyShape.html#a40a83ac567156de6da65adb1a4380c7c", null ], + [ "setFillRule", "classPolyShape.html#a0c918fe8d9df68573a1c0d6e18bc6c9a", null ], + [ "fill_rule", "classPolyShape.html#abd758b76bbc30e790602b1f37a814fe1", null ], [ "points", "classPolyShape.html#acbd1d536ad25e34b160e849a0fc12697", null ] ]; \ No newline at end of file diff --git a/docs/classPolyShape__coll__graph.map b/docs/classPolyShape__coll__graph.map new file mode 100644 index 00000000..7b5f923a --- /dev/null +++ b/docs/classPolyShape__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classPolyShape__coll__graph.md5 b/docs/classPolyShape__coll__graph.md5 new file mode 100644 index 00000000..ad241b37 --- /dev/null +++ b/docs/classPolyShape__coll__graph.md5 @@ -0,0 +1 @@ +1b3228cc01eb2b29188f8aa7284181bc \ No newline at end of file diff --git a/docs/classPolyShape__coll__graph.svg b/docs/classPolyShape__coll__graph.svg new file mode 100644 index 00000000..8667c738 --- /dev/null +++ b/docs/classPolyShape__coll__graph.svg @@ -0,0 +1,107 @@ + + + + + + +PolyShape + + +Node1 + + +PolyShape + + + + + +Node2 + + +SVGElement + + + + + +Node2->Node1 + + + + + +Node2->Node2 + + + parent + + + +Node3 + + +Vector2D< float > + + + + + +Node3->Node2 + + + position + + + +Node4 + + +Gradient + + + + + +Node4->Node2 + + + gradient + + + +Node5 + + +mColor + + + + + +Node5->Node2 + + + fill +stroke + + + +Node5->Node5 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/html/classPolyShape__inherit__graph.map b/docs/classPolyShape__inherit__graph.map similarity index 63% rename from docs/html/classPolyShape__inherit__graph.map rename to docs/classPolyShape__inherit__graph.map index 8777b487..22006dc1 100644 --- a/docs/html/classPolyShape__inherit__graph.map +++ b/docs/classPolyShape__inherit__graph.map @@ -1,7 +1,6 @@ - + - - + diff --git a/docs/classPolyShape__inherit__graph.md5 b/docs/classPolyShape__inherit__graph.md5 new file mode 100644 index 00000000..91f69058 --- /dev/null +++ b/docs/classPolyShape__inherit__graph.md5 @@ -0,0 +1 @@ +21b9f84a6d99de222ece30e97d7c1017 \ No newline at end of file diff --git a/docs/html/classPolyShape__inherit__graph.svg b/docs/classPolyShape__inherit__graph.svg similarity index 52% rename from docs/html/classPolyShape__inherit__graph.svg rename to docs/classPolyShape__inherit__graph.svg index 9cd60f16..ba4672a6 100644 --- a/docs/html/classPolyShape__inherit__graph.svg +++ b/docs/classPolyShape__inherit__graph.svg @@ -4,16 +4,16 @@ - + PolyShape Node1 - -PolyShape + +PolyShape @@ -29,8 +29,8 @@ Node1->Node3 - - + + @@ -44,38 +44,23 @@ Node1->Node4 - - - - - -Node5 - - -Rect - - - - - -Node1->Node5 - - + + Node2 - -SVGElement + +SVGElement Node2->Node1 - - + + diff --git a/docs/html/classPolygon-members.html b/docs/classPolygon-members.html similarity index 100% rename from docs/html/classPolygon-members.html rename to docs/classPolygon-members.html diff --git a/docs/html/classPolygon.html b/docs/classPolygon.html similarity index 100% rename from docs/html/classPolygon.html rename to docs/classPolygon.html diff --git a/docs/html/classPolygon.js b/docs/classPolygon.js similarity index 100% rename from docs/html/classPolygon.js rename to docs/classPolygon.js diff --git a/docs/html/classPolygon__coll__graph.map b/docs/classPolygon__coll__graph.map similarity index 100% rename from docs/html/classPolygon__coll__graph.map rename to docs/classPolygon__coll__graph.map diff --git a/docs/html/classPolygon__coll__graph.md5 b/docs/classPolygon__coll__graph.md5 similarity index 100% rename from docs/html/classPolygon__coll__graph.md5 rename to docs/classPolygon__coll__graph.md5 diff --git a/docs/html/classPolygon__coll__graph.png b/docs/classPolygon__coll__graph.png similarity index 100% rename from docs/html/classPolygon__coll__graph.png rename to docs/classPolygon__coll__graph.png diff --git a/docs/html/classPolygon__coll__graph.svg b/docs/classPolygon__coll__graph.svg similarity index 100% rename from docs/html/classPolygon__coll__graph.svg rename to docs/classPolygon__coll__graph.svg diff --git a/docs/html/classPolygon__inherit__graph.map b/docs/classPolygon__inherit__graph.map similarity index 100% rename from docs/html/classPolygon__inherit__graph.map rename to docs/classPolygon__inherit__graph.map diff --git a/docs/html/classPolygon__inherit__graph.md5 b/docs/classPolygon__inherit__graph.md5 similarity index 100% rename from docs/html/classPolygon__inherit__graph.md5 rename to docs/classPolygon__inherit__graph.md5 diff --git a/docs/html/classPolygon__inherit__graph.png b/docs/classPolygon__inherit__graph.png similarity index 100% rename from docs/html/classPolygon__inherit__graph.png rename to docs/classPolygon__inherit__graph.png diff --git a/docs/html/classPolygon__inherit__graph.svg b/docs/classPolygon__inherit__graph.svg similarity index 100% rename from docs/html/classPolygon__inherit__graph.svg rename to docs/classPolygon__inherit__graph.svg diff --git a/docs/html/classPolyline-members.html b/docs/classPolyline-members.html similarity index 100% rename from docs/html/classPolyline-members.html rename to docs/classPolyline-members.html diff --git a/docs/html/classPolyline.html b/docs/classPolyline.html similarity index 100% rename from docs/html/classPolyline.html rename to docs/classPolyline.html diff --git a/docs/html/classPolyline.js b/docs/classPolyline.js similarity index 100% rename from docs/html/classPolyline.js rename to docs/classPolyline.js diff --git a/docs/html/classPolyline__coll__graph.map b/docs/classPolyline__coll__graph.map similarity index 100% rename from docs/html/classPolyline__coll__graph.map rename to docs/classPolyline__coll__graph.map diff --git a/docs/html/classPolyline__coll__graph.md5 b/docs/classPolyline__coll__graph.md5 similarity index 100% rename from docs/html/classPolyline__coll__graph.md5 rename to docs/classPolyline__coll__graph.md5 diff --git a/docs/html/classPolyline__coll__graph.png b/docs/classPolyline__coll__graph.png similarity index 100% rename from docs/html/classPolyline__coll__graph.png rename to docs/classPolyline__coll__graph.png diff --git a/docs/html/classPolyline__coll__graph.svg b/docs/classPolyline__coll__graph.svg similarity index 100% rename from docs/html/classPolyline__coll__graph.svg rename to docs/classPolyline__coll__graph.svg diff --git a/docs/html/classPolyline__inherit__graph.map b/docs/classPolyline__inherit__graph.map similarity index 100% rename from docs/html/classPolyline__inherit__graph.map rename to docs/classPolyline__inherit__graph.map diff --git a/docs/html/classPolyline__inherit__graph.md5 b/docs/classPolyline__inherit__graph.md5 similarity index 100% rename from docs/html/classPolyline__inherit__graph.md5 rename to docs/classPolyline__inherit__graph.md5 diff --git a/docs/html/classPolyline__inherit__graph.png b/docs/classPolyline__inherit__graph.png similarity index 100% rename from docs/html/classPolyline__inherit__graph.png rename to docs/classPolyline__inherit__graph.png diff --git a/docs/html/classPolyline__inherit__graph.svg b/docs/classPolyline__inherit__graph.svg similarity index 100% rename from docs/html/classPolyline__inherit__graph.svg rename to docs/classPolyline__inherit__graph.svg diff --git a/docs/classRadialGradient-members.html b/docs/classRadialGradient-members.html new file mode 100644 index 00000000..677ac08f --- /dev/null +++ b/docs/classRadialGradient-members.html @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      svg-reader +  0.3 +
      +
      Parse and render SVG files, handle user interactions.
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      +
      RadialGradient Member List
      +
      +
      + +

      This is the complete list of members for RadialGradient, including all inherited members.

      + + + + + + + + + + + + + + + + + + +
      addStop(Stop stop)Gradient
      getClass() const overrideRadialGradientvirtual
      getPoints() constGradient
      getRadius() constRadialGradient
      getStops() constGradient
      getTransforms() constGradient
      getUnits() constGradient
      Gradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)Gradient
      pointsGradientprivate
      RadialGradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, Vector2Df radius, std::string units)RadialGradient
      radiusRadialGradientprivate
      setTransforms(std::vector< std::string > transforms)Gradient
      setUnits(std::string units)Gradient
      stopsGradientprivate
      transformsGradientprivate
      unitsGradientprivate
      ~Gradient()=defaultGradientvirtual
      +
      + + + \ No newline at end of file diff --git a/docs/classRadialGradient.html b/docs/classRadialGradient.html new file mode 100644 index 00000000..fae864ab --- /dev/null +++ b/docs/classRadialGradient.html @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + +svg-reader: RadialGradient Class Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      svg-reader +  0.3 +
      +
      Parse and render SVG files, handle user interactions.
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      + +
      +
      RadialGradient Class Reference
      +
      +
      + +

      A class that represents a radial gradient. + More...

      + +

      #include <RadialGradient.hpp>

      +
      +Inheritance diagram for RadialGradient:
      +
      +
      +
      +
      [legend]
      +
      +Collaboration diagram for RadialGradient:
      +
      +
      +
      +
      [legend]
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

      +Public Member Functions

       RadialGradient (std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, Vector2Df radius, std::string units)
       Constructs a RadialGradient object. More...
       
      std::string getClass () const override
       Gets the type of the gradient. More...
       
      Vector2Df getRadius () const
       Gets the radius of the gradient. More...
       
      - Public Member Functions inherited from Gradient
       Gradient (std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)
       Constructs a Gradient object. More...
       
      +virtual ~Gradient ()=default
       Destructs a Gradient object.
       
      std::vector< StopgetStops () const
       Gets the stops of the gradient. More...
       
      std::pair< Vector2Df, Vector2DfgetPoints () const
       Gets the start and end points of the gradient. More...
       
      void setUnits (std::string units)
       Gets the units of the gradient. More...
       
      std::string getUnits () const
       Gets the units of the gradient. More...
       
      void setTransforms (std::vector< std::string > transforms)
       Gets the transforms of the gradient. More...
       
      std::vector< std::string > getTransforms () const
       Gets the transforms of the gradient. More...
       
      void addStop (Stop stop)
       Adds a stop to the gradient. More...
       
      + + + + +

      +Private Attributes

      +Vector2Df radius
       The radius of the gradient.
       
      +

      Detailed Description

      +

      A class that represents a radial gradient.

      +

      The RadialGradient class is derived from the Gradient class and represents a radial gradient. It contains a vector of Stop objects that represent the the stops of the gradient. It also contains a pair of Vector2D objects that represent the start and end points of the gradient.

      + +

      Definition at line 14 of file RadialGradient.hpp.

      +

      Constructor & Destructor Documentation

      + +

      ◆ RadialGradient()

      + +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      RadialGradient::RadialGradient (std::vector< Stopstops,
      std::pair< Vector2Df, Vector2Dfpoints,
      Vector2Df radius,
      std::string units 
      )
      +
      + +

      Constructs a RadialGradient object.

      +
      Parameters
      + + + + + +
      stopsThe stops of the gradient.
      pointsThe start and end points of the gradient.
      radiusThe radius of the gradient.
      unitsThe units of the gradient.
      +
      +
      + +

      Definition at line 3 of file RadialGradient.cpp.

      +
      +
      7  this->radius = radius;
      +
      8 }
      +
      std::string units
      Units of the gradient.
      Definition: Gradient.hpp:95
      +
      std::vector< Stop > stops
      Stops of the gradient.
      Definition: Gradient.hpp:92
      +
      std::pair< Vector2Df, Vector2Df > points
      Start and end points of the gradient.
      Definition: Gradient.hpp:94
      +
      Gradient(std::vector< Stop > stops, std::pair< Vector2Df, Vector2Df > points, std::string units)
      Constructs a Gradient object.
      Definition: Gradient.cpp:3
      +
      Vector2Df radius
      The radius of the gradient.
      +
      +
      +
      +

      Member Function Documentation

      + +

      ◆ getClass()

      + +
      +
      + + + + + +
      + + + + + + + +
      std::string RadialGradient::getClass () const
      +
      +overridevirtual
      +
      + +

      Gets the type of the gradient.

      +
      Returns
      The string "RadialGradient".
      +
      Note
      This function is used for determining the type of the gradient.
      + +

      Implements Gradient.

      + +

      Definition at line 10 of file RadialGradient.cpp.

      +
      10 { return "RadialGradient"; }
      +
      +
      +
      + +

      ◆ getRadius()

      + +
      +
      + + + + + + + +
      Vector2Df RadialGradient::getRadius () const
      +
      + +

      Gets the radius of the gradient.

      +
      Returns
      The radius of the gradient.
      + +

      Definition at line 12 of file RadialGradient.cpp.

      +
      12 { return radius; }
      +
      +
      +
      +
      The documentation for this class was generated from the following files: +
      +
      + + + \ No newline at end of file diff --git a/docs/classRadialGradient.js b/docs/classRadialGradient.js new file mode 100644 index 00000000..1cdfde02 --- /dev/null +++ b/docs/classRadialGradient.js @@ -0,0 +1,7 @@ +var classRadialGradient = +[ + [ "RadialGradient", "classRadialGradient.html#a656e8c8a107f28a06c356a3ad1a4827c", null ], + [ "getClass", "classRadialGradient.html#a132c35f92ecceb604cdddf098c36824c", null ], + [ "getRadius", "classRadialGradient.html#acfa8223581f3caf2db33c310cfa48d1d", null ], + [ "radius", "classRadialGradient.html#abad9345ee5091075d8fc1b7a3511dbd7", null ] +]; \ No newline at end of file diff --git a/docs/classRadialGradient__coll__graph.map b/docs/classRadialGradient__coll__graph.map new file mode 100644 index 00000000..0eba2e2e --- /dev/null +++ b/docs/classRadialGradient__coll__graph.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/classRadialGradient__coll__graph.md5 b/docs/classRadialGradient__coll__graph.md5 new file mode 100644 index 00000000..61d27512 --- /dev/null +++ b/docs/classRadialGradient__coll__graph.md5 @@ -0,0 +1 @@ +a548b9a540ac9bb1e69a2f6125cf842e \ No newline at end of file diff --git a/docs/classRadialGradient__coll__graph.svg b/docs/classRadialGradient__coll__graph.svg new file mode 100644 index 00000000..57282c01 --- /dev/null +++ b/docs/classRadialGradient__coll__graph.svg @@ -0,0 +1,52 @@ + + + + + + +RadialGradient + + +Node1 + + +RadialGradient + + + + + +Node2 + + +Gradient + + + + + +Node2->Node1 + + + + + +Node3 + + +Vector2D< float > + + + + + +Node3->Node1 + + + radius + + + diff --git a/docs/classRadialGradient__inherit__graph.map b/docs/classRadialGradient__inherit__graph.map new file mode 100644 index 00000000..391c37c9 --- /dev/null +++ b/docs/classRadialGradient__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/classRadialGradient__inherit__graph.md5 b/docs/classRadialGradient__inherit__graph.md5 new file mode 100644 index 00000000..3f8fcd5b --- /dev/null +++ b/docs/classRadialGradient__inherit__graph.md5 @@ -0,0 +1 @@ +b76362a3cecf59838aa00cd32cdbe08c \ No newline at end of file diff --git a/docs/classRadialGradient__inherit__graph.svg b/docs/classRadialGradient__inherit__graph.svg new file mode 100644 index 00000000..c12a1874 --- /dev/null +++ b/docs/classRadialGradient__inherit__graph.svg @@ -0,0 +1,36 @@ + + + + + + +RadialGradient + + +Node1 + + +RadialGradient + + + + + +Node2 + + +Gradient + + + + + +Node2->Node1 + + + + + diff --git a/docs/html/classPlygon-members.html b/docs/classRect-members.html similarity index 62% rename from docs/html/classPlygon-members.html rename to docs/classRect-members.html index cc1b7d48..25e1804b 100644 --- a/docs/html/classPlygon-members.html +++ b/docs/classRect-members.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -98,7 +98,7 @@
      @@ -118,44 +118,53 @@
      -
      Plygon Member List
      +
      Rect Member List
      -

      This is the complete list of members for Plygon, including all inherited members.

      +

      This is the complete list of members for Rect, including all inherited members.

      - - - - + + - - - - - + + + + + + + - + + + + + - - - - - - - + + + + + + + - + + + + + - + +
      addElement(SVGElement *element)SVGElementvirtual
      addPoint(const Vector2Df &point)PolyShapevirtual
      fillSVGElementprivate
      fill_rulePlygonprivate
      getClass() const overridePlygonvirtual
      fillSVGElementprivate
      getClass() const overrideRectvirtual
      getFillColor() constSVGElement
      getFillRule() constPlygon
      getOutlineColor() constSVGElement
      getOutlineThickness() constSVGElement
      getParent() constSVGElement
      getPoints() constPolyShape
      getGradient() constSVGElement
      getHeight() constRect
      getMaxBound() constSVGElementvirtual
      getMinBound() constSVGElementvirtual
      getOutlineColor() constSVGElement
      getOutlineThickness() constSVGElement
      getParent() constSVGElement
      getPosition() constSVGElement
      getTransforms() constSVGElement
      getRadius() constRect
      getTransforms() constSVGElement
      getWidth() constRect
      gradientSVGElementprivate
      heightRectprivate
      parentSVGElementprotected
      Plygon(mColor fill, mColor stroke, float stroke_width)Plygon
      pointsPolyShapeprotected
      PolyShape(const mColor &fill, const mColor &stroke, float stroke_width)PolyShapeprotected
      positionSVGElementprivate
      printData() const overridePolyShapevirtual
      setFillColor(const mColor &color)SVGElement
      setFillRule(std::string fill_rule)Plygon
      positionSVGElementprivate
      printData() const overrideRectvirtual
      radiusRectprivate
      Rect(float width, float height, Vector2Df position, Vector2Df radius, const mColor &fill, const mColor &stroke, float stroke_width)Rect
      setFillColor(const mColor &color)SVGElement
      setGradient(Gradient *gradient)SVGElement
      setHeight(float height)Rect
      setOutlineColor(const mColor &color)SVGElement
      setOutlineThickness(float thickness)SVGElement
      setParent(SVGElement *parent)SVGElement
      setPosition(float x, float y)SVGElement
      setPosition(const Vector2Df &position)SVGElement
      setTransforms(const std::vector< std::string > &transforms)SVGElement
      setRadius(const Vector2Df &radius)Rect
      setTransforms(const std::vector< std::string > &transforms)SVGElement
      setWidth(float width)Rect
      strokeSVGElementprivate
      stroke_widthSVGElementprivate
      SVGElement()SVGElementprotected
      SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)SVGElementprotected
      SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)SVGElementprotected
      transformsSVGElementprivate
      ~SVGElement()=defaultSVGElementvirtual
      widthRectprivate
      ~SVGElement()=defaultSVGElementvirtual
      @@ -387,10 +382,10 @@

      Returns
      The string "Rect".
      -

      Implements PolyShape.

      +

      Implements SVGElement.

      -

      Definition at line 14 of file Rect.cpp.

      -
      14 { return "Rect"; }
      +

      Definition at line 8 of file Rect.cpp.

      +
      8 { return "Rect"; }
      @@ -412,8 +407,8 @@

      Returns
      The height of the rectangle.
      -

      Definition at line 30 of file Rect.cpp.

      -
      30 { return height; }
      +

      Definition at line 16 of file Rect.cpp.

      +
      16 { return height; }
      @@ -435,8 +430,8 @@

      Returns
      The radii of the rectangle.
      -

      Definition at line 34 of file Rect.cpp.

      -
      34 { return radius; }
      +

      Definition at line 20 of file Rect.cpp.

      +
      20 { return radius; }
      @@ -458,8 +453,8 @@

      Returns
      The width of the rectangle.
      -

      Definition at line 22 of file Rect.cpp.

      -
      22 { return width; }
      +

      Definition at line 12 of file Rect.cpp.

      +
      12 { return width; }
      @@ -489,20 +484,20 @@

      Note
      This function is used for debugging purposes.
      -

      Reimplemented from PolyShape.

      - -

      Definition at line 36 of file Rect.cpp.

      -
      36  {
      - -
      38  std::cout << "Width: " << getWidth() << std::endl;
      -
      39  std::cout << "Height: " << getHeight() << std::endl;
      -
      40  std::cout << "Radius: " << getRadius().x << " " << getRadius().y
      -
      41  << std::endl;
      -
      42 }
      -
      Vector2Df getRadius() const
      Gets the radii of the rectangle.
      Definition: Rect.cpp:34
      -
      float getHeight() const
      Gets the height of the rectangle.
      Definition: Rect.cpp:30
      -
      float getWidth() const
      Gets the width of the rectangle.
      Definition: Rect.cpp:22
      -
      virtual void printData() const
      Prints the data of the shape.
      Definition: SVGElement.cpp:33
      +

      Reimplemented from SVGElement.

      + +

      Definition at line 22 of file Rect.cpp.

      +
      22  {
      + +
      24  std::cout << "Width: " << getWidth() << std::endl;
      +
      25  std::cout << "Height: " << getHeight() << std::endl;
      +
      26  std::cout << "Radius: " << getRadius().x << " " << getRadius().y
      +
      27  << std::endl;
      +
      28 }
      +
      Vector2Df getRadius() const
      Gets the radii of the rectangle.
      Definition: Rect.cpp:20
      +
      float getHeight() const
      Gets the height of the rectangle.
      Definition: Rect.cpp:16
      +
      float getWidth() const
      Gets the width of the rectangle.
      Definition: Rect.cpp:12
      +
      virtual void printData() const
      Prints the data of the shape.
      Definition: SVGElement.cpp:47
      T x
      X coordinate of the vector.
      Definition: Vector2D.hpp:45
      T y
      Y coordinate of the vector.
      Definition: Vector2D.hpp:46
      @@ -532,13 +527,8 @@

      Definition at line 24 of file Rect.cpp.

      -
      24  {
      -
      25  this->height = height;
      -
      26  points[2].y = height;
      -
      27  points[3].y = height;
      -
      28 }
      -
      std::vector< Vector2Df > points
      Vertices of the polyshape.
      Definition: PolyShape.hpp:14
      +

      Definition at line 14 of file Rect.cpp.

      +
      14 { this->height = height; }

      @@ -566,8 +556,8 @@

      Definition at line 32 of file Rect.cpp.

      -
      32 { this->radius = radius; }
      +

      Definition at line 18 of file Rect.cpp.

      +
      18 { this->radius = radius; }
      @@ -595,12 +585,8 @@

      Definition at line 16 of file Rect.cpp.

      -
      16  {
      -
      17  this->width = width;
      -
      18  points[1].x = width;
      -
      19  points[2].x = width;
      -
      20 }
      +

      Definition at line 10 of file Rect.cpp.

      +
      10 { this->width = width; }
      diff --git a/docs/html/classRect.js b/docs/classRect.js similarity index 100% rename from docs/html/classRect.js rename to docs/classRect.js diff --git a/docs/classRect__coll__graph.map b/docs/classRect__coll__graph.map new file mode 100644 index 00000000..e37b9f40 --- /dev/null +++ b/docs/classRect__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classRect__coll__graph.md5 b/docs/classRect__coll__graph.md5 new file mode 100644 index 00000000..bd2ddf66 --- /dev/null +++ b/docs/classRect__coll__graph.md5 @@ -0,0 +1 @@ +428634443f6b388d85bd2492f5c91974 \ No newline at end of file diff --git a/docs/html/classRect__coll__graph.png b/docs/classRect__coll__graph.png similarity index 100% rename from docs/html/classRect__coll__graph.png rename to docs/classRect__coll__graph.png diff --git a/docs/classRect__coll__graph.svg b/docs/classRect__coll__graph.svg new file mode 100644 index 00000000..5af2819a --- /dev/null +++ b/docs/classRect__coll__graph.svg @@ -0,0 +1,114 @@ + + + + + + +Rect + + +Node1 + + +Rect + + + + + +Node2 + + +SVGElement + + + + + +Node2->Node1 + + + + + +Node2->Node2 + + + parent + + + +Node3 + + +Vector2D< float > + + + + + +Node3->Node1 + + + radius + + + +Node3->Node2 + + + position + + + +Node4 + + +Gradient + + + + + +Node4->Node2 + + + gradient + + + +Node5 + + +mColor + + + + + +Node5->Node2 + + + fill +stroke + + + +Node5->Node5 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/classRect__inherit__graph.map b/docs/classRect__inherit__graph.map new file mode 100644 index 00000000..d2418d60 --- /dev/null +++ b/docs/classRect__inherit__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/classRect__inherit__graph.md5 b/docs/classRect__inherit__graph.md5 new file mode 100644 index 00000000..683c0e9d --- /dev/null +++ b/docs/classRect__inherit__graph.md5 @@ -0,0 +1 @@ +3ef5a68fedcef89819c523b541a13d27 \ No newline at end of file diff --git a/docs/html/classRect__inherit__graph.png b/docs/classRect__inherit__graph.png similarity index 100% rename from docs/html/classRect__inherit__graph.png rename to docs/classRect__inherit__graph.png diff --git a/docs/html/classRect__inherit__graph.svg b/docs/classRect__inherit__graph.svg similarity index 51% rename from docs/html/classRect__inherit__graph.svg rename to docs/classRect__inherit__graph.svg index 7b7587b4..f929bcb1 100644 --- a/docs/html/classRect__inherit__graph.svg +++ b/docs/classRect__inherit__graph.svg @@ -4,9 +4,9 @@ - - + + Rect @@ -20,9 +20,9 @@ Node2 - - -PolyShape + + +SVGElement @@ -32,20 +32,5 @@ - - -Node3 - - -SVGElement - - - - - -Node3->Node2 - - - diff --git a/docs/html/classRenderer-members.html b/docs/classRenderer-members.html similarity index 83% rename from docs/html/classRenderer-members.html rename to docs/classRenderer-members.html index 8a559304..f7935d77 100644 --- a/docs/html/classRenderer-members.html +++ b/docs/classRenderer-members.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -125,6 +125,8 @@

      This is the complete list of members for Renderer, including all inherited members.

      + + @@ -134,11 +136,12 @@ - - - - - + + + + + +
      applyTransform(std::vector< std::string > transform_order, Gdiplus::Graphics &graphics) constRendererprivate
      applyTransformsOnBrush(std::vector< std::string > transform_order, Gdiplus::LinearGradientBrush *&brush) constRendererprivate
      applyTransformsOnBrush(std::vector< std::string > transform_order, Gdiplus::PathGradientBrush *&brush) constRendererprivate
      draw(Gdiplus::Graphics &graphics, Group *group) constRenderer
      drawCircle(Gdiplus::Graphics &graphics, Circle *circle) constRendererprivate
      drawEllipse(Gdiplus::Graphics &graphics, Ell *ellipse) constRendererprivate
      drawPolyline(Gdiplus::Graphics &graphics, Plyline *polyline) constRendererprivate
      drawRectangle(Gdiplus::Graphics &graphics, Rect *rectangle) constRendererprivate
      drawText(Gdiplus::Graphics &graphics, Text *text) constRendererprivate
      getInstance()Rendererstatic
      instanceRendererprivatestatic
      operator=(const Renderer &)=deleteRenderer
      Renderer(const Renderer &)=deleteRenderer
      Renderer()Rendererprivate
      getBrush(SVGElement *shape, Gdiplus::RectF bound) constRendererprivate
      getInstance()Rendererstatic
      instanceRendererprivatestatic
      operator=(const Renderer &)=deleteRenderer
      Renderer(const Renderer &)=deleteRenderer
      Renderer()Rendererprivate
      @@ -118,30 +118,30 @@
      -
      Line Member List
      +
      SVGElement Member List
      -

      This is the complete list of members for Line, including all inherited members.

      +

      This is the complete list of members for SVGElement, including all inherited members.

      - - - - + + - + + + - + - - + + @@ -151,6 +151,8 @@ + +
      addElement(SVGElement *element)SVGElementvirtual
      directionLineprivate
      fillSVGElementprivate
      getClass() const overrideLinevirtual
      getDirection() constLine
      fillSVGElementprivate
      getClass() const =0SVGElementpure virtual
      getFillColor() constSVGElement
      getLength() constLine
      getGradient() constSVGElement
      getMaxBound() constSVGElementvirtual
      getMinBound() constSVGElementvirtual
      getOutlineColor() constSVGElement
      getOutlineThickness() constSVGElement
      getParent() constSVGElement
      getPosition() constSVGElement
      getTransforms() constSVGElement
      Line(const Vector2Df &point1, const Vector2Df &point2, mColor stroke, float stroke_width)Line
      gradientSVGElementprivate
      parentSVGElementprotected
      positionSVGElementprivate
      printData() constSVGElementvirtual
      setDirection(const Vector2Df &direction)Line
      setFillColor(const mColor &color)SVGElement
      setFillColor(const mColor &color)SVGElement
      setGradient(Gradient *gradient)SVGElement
      setOutlineColor(const mColor &color)SVGElement
      setOutlineThickness(float thickness)SVGElement
      setParent(SVGElement *parent)SVGElement
      strokeSVGElementprivate
      stroke_widthSVGElementprivate
      SVGElement()SVGElementprotected
      SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)SVGElementprotected
      SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)SVGElementprotected
      transformsSVGElementprivate
      ~SVGElement()=defaultSVGElementvirtual
      diff --git a/docs/html/classSVGElement.html b/docs/classSVGElement.html similarity index 68% rename from docs/html/classSVGElement.html rename to docs/classSVGElement.html index c82cf3ff..8571dbe8 100644 --- a/docs/html/classSVGElement.html +++ b/docs/classSVGElement.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -135,12 +135,14 @@
      Inheritance diagram for SVGElement:
      -
      +
      +
      [legend]
      Collaboration diagram for SVGElement:
      -
      +
      +
      [legend]
      + + + + + + @@ -194,6 +202,12 @@ + + + + + + @@ -203,6 +217,12 @@ + + + + + +

      @@ -179,6 +181,12 @@

      Vector2Df getPosition () const
       Get the current position of the shape. More...
       
      virtual Vector2Df getMinBound () const
       Gets the minimum bound of the shape. More...
       
      virtual Vector2Df getMaxBound () const
       Gets the maximum bound of the shape. More...
       
      virtual void printData () const
       Prints the data of the shape. More...
       
      SVGElementgetParent () const
       Parent pointer getter. More...
       
      void setGradient (Gradient *gradient)
       Sets the gradient of the shape. More...
       
      GradientgetGradient () const
       Gets the gradient of the shape. More...
       
      virtual void addElement (SVGElement *element)
       Adds a shape to the composite group. More...
       
       SVGElement ()
       Constructs a Shape object. More...
       
       SVGElement (const mColor &fill, const mColor &stroke, float stroke_width)
       Constructs a Shape object. More...
       
       SVGElement (const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)
       Constructs a Shape object. More...
       
      @@ -233,6 +253,10 @@ std::vector< std::string >  + + +

      Protected Attributes

      transforms
       List of transformations.
       
      +Gradientgradient
       Pointer to the gradient that contains the shape.
       

      Detailed Description

      Represents an element in an SVG file.

      @@ -242,10 +266,10 @@
      This class is applied Composite design pattern and used as base class for other shapes.
      -

      Definition at line 17 of file SVGElement.hpp.

      +

      Definition at line 18 of file SVGElement.hpp.

      Constructor & Destructor Documentation

      -

      ◆ SVGElement()

      +

      ◆ SVGElement() [1/3]

      @@ -271,15 +295,138 @@

      Note
      This constructor is protected because Shape is an abstract class that cannot be instantiated.

      Definition at line 5 of file SVGElement.cpp.

      -
      -
      mColor fill
      Fill color.
      Definition: SVGElement.hpp:169
      -
      float stroke_width
      Thickness of the shape's outline.
      Definition: SVGElement.hpp:171
      -
      mColor stroke
      Outline color.
      Definition: SVGElement.hpp:170
      +
      +
      7  gradient(NULL) {}
      +
      mColor fill
      Fill color.
      Definition: SVGElement.hpp:222
      +
      float stroke_width
      Thickness of the shape's outline.
      Definition: SVGElement.hpp:224
      +
      Gradient * gradient
      Pointer to the gradient that contains the shape.
      Definition: SVGElement.hpp:227
      +
      mColor stroke
      Outline color.
      Definition: SVGElement.hpp:223
      static const mColor Black
      Black predefined color.
      Definition: Color.hpp:50
      static const mColor Transparent
      Transparent (black) predefined color.
      Definition: Color.hpp:58

      + +

      ◆ SVGElement() [2/3]

      + +
      +
      + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + +
      SVGElement::SVGElement (const mColorfill,
      const mColorstroke,
      float stroke_width 
      )
      +
      +protected
      +
      + +

      Constructs a Shape object.

      +
      Parameters
      + + + + +
      fillThe fill color of the shape
      strokeThe outline color of the shape
      stroke_widthThe outline thickness of the shape
      +
      +
      +
      Note
      This constructor is protected because Shape is an abstract class that cannot be instantiated.
      + +

      Definition at line 9 of file SVGElement.cpp.

      + +
      +
      + +

      ◆ SVGElement() [3/3]

      + +
      +
      + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      SVGElement::SVGElement (const mColorfill,
      const mColorstroke,
      float stroke_width,
      const Vector2Dfposition 
      )
      +
      +protected
      +
      + +

      Constructs a Shape object.

      +
      Parameters
      + + + + + +
      fillThe fill color of the shape
      strokeThe outline color of the shape
      stroke_widthThe outline thickness of the shape
      positionThe position of the shape
      +
      +
      +
      Note
      This constructor is protected because Shape is an abstract class that cannot be instantiated.
      + +

      Definition at line 13 of file SVGElement.cpp.

      +
      +
      16  position(position), gradient(NULL) {}
      +
      Vector2Df position
      Position of the shape.
      Definition: SVGElement.hpp:225
      +
      +
      +

      Member Function Documentation

      ◆ addElement()

      @@ -318,8 +465,8 @@

      Group.

      -

      Definition at line 59 of file SVGElement.cpp.

      -
      59 {}
      +

      Definition at line 83 of file SVGElement.cpp.

      +
      83 {}

      @@ -375,8 +522,99 @@

      Returns
      The fill color of the shape.
      Note
      The default fill color is white.
      -

      Definition at line 10 of file SVGElement.cpp.

      -
      10 { return fill; }
      +

      Definition at line 20 of file SVGElement.cpp.

      +
      20 { return fill; }
      +
      +
      + + +

      ◆ getGradient()

      + +
      +
      + + + + + + + +
      Gradient * SVGElement::getGradient () const
      +
      + +

      Gets the gradient of the shape.

      +
      Returns
      The gradient of the shape.
      +
      Note
      The default gradient of the shape is NULL.
      + +

      Definition at line 81 of file SVGElement.cpp.

      +
      81 { return gradient; }
      +
      +
      +
      + +

      ◆ getMaxBound()

      + +
      +
      + + + + + +
      + + + + + + + +
      Vector2Df SVGElement::getMaxBound () const
      +
      +virtual
      +
      + +

      Gets the maximum bound of the shape.

      +
      Returns
      The maximum bound of the shape.
      + +

      Reimplemented in PolyShape, and Ell.

      + +

      Definition at line 45 of file SVGElement.cpp.

      +
      45 { return Vector2Df(); }
      + +
      +
      +
      + +

      ◆ getMinBound()

      + +
      +
      + + + + + +
      + + + + + + + +
      Vector2Df SVGElement::getMinBound () const
      +
      +virtual
      +
      + +

      Gets the minimum bound of the shape.

      +
      Returns
      The minimum bound of the shape.
      + +

      Reimplemented in PolyShape, and Ell.

      + +

      Definition at line 43 of file SVGElement.cpp.

      +
      43 { return Vector2Df(); }
      @@ -399,8 +637,8 @@

      Returns
      The outline color of the shape.
      Note
      The default outline color is white.
      -

      Definition at line 14 of file SVGElement.cpp.

      -
      14 { return stroke; }
      +

      Definition at line 24 of file SVGElement.cpp.

      +
      24 { return stroke; }
      @@ -423,8 +661,8 @@

      Returns
      The outline thickness of the shape.
      Note
      The default outline thickness is 0.
      -

      Definition at line 20 of file SVGElement.cpp.

      -
      20 { return stroke_width; }
      +

      Definition at line 30 of file SVGElement.cpp.

      +
      30 { return stroke_width; }
      @@ -447,9 +685,9 @@

      Returns
      The parent pointer
      Note
      This function is used for composite design pattern
      -

      Definition at line 57 of file SVGElement.cpp.

      -
      57 { return parent; }
      -
      SVGElement * parent
      Pointer to the group that contains the shape.
      Definition: SVGElement.hpp:166
      +

      Definition at line 77 of file SVGElement.cpp.

      +
      77 { return parent; }
      +
      SVGElement * parent
      Pointer to the group that contains the shape.
      Definition: SVGElement.hpp:219
      @@ -472,9 +710,8 @@

      Returns
      The current position of the shape
      Note
      The default position of the shape is (0, 0).
      -

      Definition at line 31 of file SVGElement.cpp.

      -
      31 { return position; }
      -
      Vector2Df position
      Position of the shape.
      Definition: SVGElement.hpp:172
      +

      Definition at line 41 of file SVGElement.cpp.

      +
      41 { return position; }
      @@ -499,11 +736,11 @@

      -

      Definition at line 51 of file SVGElement.cpp.

      -
      51  {
      -
      52  return transforms;
      -
      53 }
      -
      std::vector< std::string > transforms
      List of transformations.
      Definition: SVGElement.hpp:173
      +

      Definition at line 71 of file SVGElement.cpp.

      +
      71  {
      +
      72  return transforms;
      +
      73 }
      +
      std::vector< std::string > transforms
      List of transformations.
      Definition: SVGElement.hpp:226
      @@ -537,24 +774,32 @@

      Text, Rect, PolyShape, Path, Group, and Ell.

      -

      Definition at line 33 of file SVGElement.cpp.

      -
      33  {
      -
      34  std::cout << "Shape: " << getClass() << std::endl;
      -
      35  std::cout << "Fill: " << getFillColor() << std::endl;
      -
      36  std::cout << "Stroke: " << getOutlineColor() << std::endl;
      -
      37  std::cout << "Stroke width: " << getOutlineThickness() << std::endl;
      -
      38  std::cout << "Position: " << getPosition().x << " " << getPosition().y
      -
      39  << std::endl;
      -
      40  std::cout << "Transforms: ";
      -
      41  for (auto transform : transforms) {
      -
      42  std::cout << transform << " ";
      -
      43  }
      -
      44  std::cout << std::endl;
      -
      45 }
      -
      float getOutlineThickness() const
      Gets the outline thickness of the shape.
      Definition: SVGElement.cpp:20
      -
      Vector2Df getPosition() const
      Get the current position of the shape.
      Definition: SVGElement.cpp:31
      -
      const mColor & getOutlineColor() const
      Gets the outline color of the shape.
      Definition: SVGElement.cpp:14
      -
      const mColor & getFillColor() const
      Gets the fill color of the shape.
      Definition: SVGElement.cpp:10
      +

      Definition at line 47 of file SVGElement.cpp.

      +
      47  {
      +
      48  std::cout << "Shape: " << getClass() << std::endl;
      +
      49  std::cout << "Fill: " << getFillColor() << std::endl;
      +
      50  std::cout << "Stroke: " << getOutlineColor() << std::endl;
      +
      51  std::cout << "Stroke width: " << getOutlineThickness() << std::endl;
      +
      52  std::cout << "Position: " << getPosition().x << " " << getPosition().y
      +
      53  << std::endl;
      +
      54  std::cout << "Transforms: ";
      +
      55  for (auto transform : transforms) {
      +
      56  std::cout << transform << " ";
      +
      57  }
      +
      58  std::cout << std::endl;
      +
      59  if (gradient != NULL)
      +
      60  std::cout << "Gradient: " << gradient->getClass() << " "
      +
      61  << gradient->getPoints().first.x << " "
      +
      62  << gradient->getPoints().first.y << " "
      +
      63  << gradient->getPoints().second.x << " "
      +
      64  << gradient->getPoints().second.y << std::endl;
      +
      65 }
      +
      std::pair< Vector2Df, Vector2Df > getPoints() const
      Gets the start and end points of the gradient.
      Definition: Gradient.cpp:9
      +
      virtual std::string getClass() const =0
      Gets the type of the gradient.
      +
      float getOutlineThickness() const
      Gets the outline thickness of the shape.
      Definition: SVGElement.cpp:30
      +
      Vector2Df getPosition() const
      Get the current position of the shape.
      Definition: SVGElement.cpp:41
      +
      const mColor & getOutlineColor() const
      Gets the outline color of the shape.
      Definition: SVGElement.cpp:24
      +
      const mColor & getFillColor() const
      Gets the fill color of the shape.
      Definition: SVGElement.cpp:20
      virtual std::string getClass() const =0
      Gets the type of the shape.
      T x
      X coordinate of the vector.
      Definition: Vector2D.hpp:45
      T y
      Y coordinate of the vector.
      Definition: Vector2D.hpp:46
      @@ -585,8 +830,38 @@

      Definition at line 8 of file SVGElement.cpp.

      -
      8 { fill = color; }
      +

      Definition at line 18 of file SVGElement.cpp.

      +
      18 { fill = color; }
      +
      +
      +

      + +

      ◆ setGradient()

      + +
      +
      + + + + + + + + +
      void SVGElement::setGradient (Gradientgradient)
      +
      + +

      Sets the gradient of the shape.

      +
      Parameters
      + + +
      gradientThe new gradient of the shape.
      +
      +
      +
      Note
      The default gradient of the shape is NULL.
      + +

      Definition at line 79 of file SVGElement.cpp.

      +
      79 { this->gradient = gradient; }
      @@ -614,8 +889,8 @@

      Definition at line 12 of file SVGElement.cpp.

      -
      12 { stroke = color; }
      +

      Definition at line 22 of file SVGElement.cpp.

      +
      22 { stroke = color; }

      @@ -648,10 +923,10 @@

      Definition at line 16 of file SVGElement.cpp.

      -
      16  {
      -
      17  stroke_width = thickness;
      -
      18 }
      +

      Definition at line 26 of file SVGElement.cpp.

      +
      26  {
      +
      27  stroke_width = thickness;
      +
      28 }
      @@ -680,8 +955,8 @@

      Note
      This function is used for composite design pattern
      -

      Definition at line 55 of file SVGElement.cpp.

      -
      55 { this->parent = parent; }
      +

      Definition at line 75 of file SVGElement.cpp.

      +
      75 { this->parent = parent; }
      @@ -712,11 +987,11 @@

      Definition at line 27 of file SVGElement.cpp.

      -
      27  {
      - -
      29 }
      -
      void setPosition(float x, float y)
      Sets the position of the shape.
      Definition: SVGElement.cpp:22
      +

      Definition at line 37 of file SVGElement.cpp.

      +
      37  {
      + +
      39 }
      +
      void setPosition(float x, float y)
      Sets the position of the shape.
      Definition: SVGElement.cpp:32
      @@ -758,11 +1033,11 @@

      Definition at line 22 of file SVGElement.cpp.

      -
      22  {
      -
      23  position.x = x;
      -
      24  position.y = y;
      -
      25 }
      +

      Definition at line 32 of file SVGElement.cpp.

      +
      32  {
      +
      33  position.x = x;
      +
      34  position.y = y;
      +
      35 }
      @@ -793,10 +1068,10 @@

      -

      Definition at line 47 of file SVGElement.cpp.

      -
      47  {
      -
      48  this->transforms = transforms;
      -
      49 }
      +

      Definition at line 67 of file SVGElement.cpp.

      +
      67  {
      +
      68  this->transforms = transforms;
      +
      69 }
      diff --git a/docs/html/classSVGElement.js b/docs/classSVGElement.js similarity index 77% rename from docs/html/classSVGElement.js rename to docs/classSVGElement.js index 8253f945..6ef37ed2 100644 --- a/docs/html/classSVGElement.js +++ b/docs/classSVGElement.js @@ -2,9 +2,14 @@ var classSVGElement = [ [ "~SVGElement", "classSVGElement.html#a5087280fd4bbb637c3cde64e44e974f1", null ], [ "SVGElement", "classSVGElement.html#ad30205005009d2ba4820d3ce372e81ea", null ], + [ "SVGElement", "classSVGElement.html#a1a43e7717c20d50fd1990b592499fdba", null ], + [ "SVGElement", "classSVGElement.html#a6ed48bcc78dd62e3da256ddbd103ccd1", null ], [ "addElement", "classSVGElement.html#af699f9aa795572c2873e520849579881", null ], [ "getClass", "classSVGElement.html#adc98ebac66965dd303283cbf7ff28f38", null ], [ "getFillColor", "classSVGElement.html#abb012cad5d6e9ee7a413f46042f99429", null ], + [ "getGradient", "classSVGElement.html#a9b64e7697c24a6972aacb01b89c0e542", null ], + [ "getMaxBound", "classSVGElement.html#a03ac231161d1d5062951fa3fca33a39b", null ], + [ "getMinBound", "classSVGElement.html#a0cce88c48233f4da470daad2edab0d06", null ], [ "getOutlineColor", "classSVGElement.html#a9a243b2b8464d57df28f3f3e8c52511e", null ], [ "getOutlineThickness", "classSVGElement.html#a2e4b1a48bfbc34a6a9f17bfd4b89eb51", null ], [ "getParent", "classSVGElement.html#a1b075314d4cda4fa895688979fe462fd", null ], @@ -12,6 +17,7 @@ var classSVGElement = [ "getTransforms", "classSVGElement.html#a5f111964efd20e98eafafb3d168a1e87", null ], [ "printData", "classSVGElement.html#ad4bcd981ae7431161013811024b452e1", null ], [ "setFillColor", "classSVGElement.html#abf7eef6d09fedba0d0f50a0f1a4be2fb", null ], + [ "setGradient", "classSVGElement.html#a312b6aa934488672585c7e9d858300f8", null ], [ "setOutlineColor", "classSVGElement.html#ac0cc2f6d2e01d364a695bebaa7db18d2", null ], [ "setOutlineThickness", "classSVGElement.html#a88653ebe8b92ec881ab436ea968375a8", null ], [ "setParent", "classSVGElement.html#a43b3bf06fae88a1634a189272088d11d", null ], @@ -19,6 +25,7 @@ var classSVGElement = [ "setPosition", "classSVGElement.html#a77aefe4b7e9dbf180cc531c969d0116d", null ], [ "setTransforms", "classSVGElement.html#a00fef2ebc5df4838b3f9bd7111b117c5", null ], [ "fill", "classSVGElement.html#a6d3a39e763d3273715ea11f8959f81b1", null ], + [ "gradient", "classSVGElement.html#aab61149df9916892540627a0d7c4480c", null ], [ "parent", "classSVGElement.html#adee748c3014de1c1ebd20411a52e824a", null ], [ "position", "classSVGElement.html#acf9b9906b6d0cba8bb5c0b38b032e40f", null ], [ "stroke", "classSVGElement.html#aab937dcb566cd83d94d00d69b4083f13", null ], diff --git a/docs/classSVGElement__coll__graph.map b/docs/classSVGElement__coll__graph.map new file mode 100644 index 00000000..8bc79fad --- /dev/null +++ b/docs/classSVGElement__coll__graph.map @@ -0,0 +1,6 @@ + + + + + + diff --git a/docs/classSVGElement__coll__graph.md5 b/docs/classSVGElement__coll__graph.md5 new file mode 100644 index 00000000..3032e4ab --- /dev/null +++ b/docs/classSVGElement__coll__graph.md5 @@ -0,0 +1 @@ +de14543b2aa386bd3cc8059e5c509c75 \ No newline at end of file diff --git a/docs/classSVGElement__coll__graph.svg b/docs/classSVGElement__coll__graph.svg new file mode 100644 index 00000000..238b93a5 --- /dev/null +++ b/docs/classSVGElement__coll__graph.svg @@ -0,0 +1,92 @@ + + + + + + +SVGElement + + +Node1 + + +SVGElement + + + + + +Node1->Node1 + + + parent + + + +Node2 + + +Vector2D< float > + + + + + +Node2->Node1 + + + position + + + +Node3 + + +Gradient + + + + + +Node3->Node1 + + + gradient + + + +Node4 + + +mColor + + + + + +Node4->Node1 + + + fill +stroke + + + +Node4->Node4 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/html/classSVGElement__inherit__graph.map b/docs/classSVGElement__inherit__graph.map similarity index 80% rename from docs/html/classSVGElement__inherit__graph.map rename to docs/classSVGElement__inherit__graph.map index 76d2cfde..e23a7911 100644 --- a/docs/html/classSVGElement__inherit__graph.map +++ b/docs/classSVGElement__inherit__graph.map @@ -1,13 +1,13 @@ - + - + + - - - + + diff --git a/docs/classSVGElement__inherit__graph.md5 b/docs/classSVGElement__inherit__graph.md5 new file mode 100644 index 00000000..954a5f5f --- /dev/null +++ b/docs/classSVGElement__inherit__graph.md5 @@ -0,0 +1 @@ +462c9bdad0b730bcdefd6c2aec97c260 \ No newline at end of file diff --git a/docs/html/classSVGElement__inherit__graph.svg b/docs/classSVGElement__inherit__graph.svg similarity index 63% rename from docs/html/classSVGElement__inherit__graph.svg rename to docs/classSVGElement__inherit__graph.svg index 973470f7..a1fe0ffa 100644 --- a/docs/html/classSVGElement__inherit__graph.svg +++ b/docs/classSVGElement__inherit__graph.svg @@ -4,16 +4,16 @@ - + SVGElement Node1 - -SVGElement + +SVGElement @@ -29,8 +29,8 @@ Node1->Node2 - - + + @@ -44,8 +44,8 @@ Node1->Node4 - - + + @@ -59,8 +59,8 @@ Node1->Node5 - - + + @@ -74,8 +74,8 @@ Node1->Node6 - - + + @@ -89,23 +89,38 @@ Node1->Node7 - - + + + + + +Node10 + + +Rect + + + + + +Node1->Node10 + + Node11 - -Text + +Text Node1->Node11 - - + + @@ -126,46 +141,31 @@ Node8 - -Plygon + +Plygon Node7->Node8 - - + + Node9 - -Plyline + +Plyline Node7->Node9 - - - - - -Node10 - - -Rect - - - - - -Node7->Node10 - - + + diff --git a/docs/html/classShape-members.html b/docs/classShape-members.html similarity index 100% rename from docs/html/classShape-members.html rename to docs/classShape-members.html diff --git a/docs/html/classShape.html b/docs/classShape.html similarity index 100% rename from docs/html/classShape.html rename to docs/classShape.html diff --git a/docs/html/classShape.js b/docs/classShape.js similarity index 100% rename from docs/html/classShape.js rename to docs/classShape.js diff --git a/docs/html/classShape__inherit__graph.map b/docs/classShape__inherit__graph.map similarity index 100% rename from docs/html/classShape__inherit__graph.map rename to docs/classShape__inherit__graph.map diff --git a/docs/html/classShape__inherit__graph.md5 b/docs/classShape__inherit__graph.md5 similarity index 100% rename from docs/html/classShape__inherit__graph.md5 rename to docs/classShape__inherit__graph.md5 diff --git a/docs/html/classShape__inherit__graph.png b/docs/classShape__inherit__graph.png similarity index 100% rename from docs/html/classShape__inherit__graph.png rename to docs/classShape__inherit__graph.png diff --git a/docs/html/classShape__inherit__graph.svg b/docs/classShape__inherit__graph.svg similarity index 100% rename from docs/html/classShape__inherit__graph.svg rename to docs/classShape__inherit__graph.svg diff --git a/docs/classStop-members.html b/docs/classStop-members.html new file mode 100644 index 00000000..b26dbd55 --- /dev/null +++ b/docs/classStop-members.html @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Member List + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      svg-reader +  0.3 +
      +
      Parse and render SVG files, handle user interactions.
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      +
      Stop Member List
      +
      +
      + +

      This is the complete list of members for Stop, including all inherited members.

      + + + + + + +
      colorStopprivate
      getColor() constStop
      getOffset() constStop
      offsetStopprivate
      Stop(const mColor &color, float offset)Stop
      +
      + + + \ No newline at end of file diff --git a/docs/classStop.html b/docs/classStop.html new file mode 100644 index 00000000..aaaf3ea2 --- /dev/null +++ b/docs/classStop.html @@ -0,0 +1,270 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Stop Class Reference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      svg-reader +  0.3 +
      +
      Parse and render SVG files, handle user interactions.
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + + +
      + +

      A class that represents a stop. + More...

      + +

      #include <Stop.hpp>

      +
      +Collaboration diagram for Stop:
      +
      +
      +
      +
      [legend]
      + + + + + + + + + + + +

      +Public Member Functions

       Stop (const mColor &color, float offset)
       Constructs a Stop object. More...
       
      mColor getColor () const
       Gets the color of the stop. More...
       
      float getOffset () const
       Gets the offset of the stop. More...
       
      + + + + + + + +

      +Private Attributes

      +mColor color
       The color of the stop.
       
      +float offset
       The offset of the stop.
       
      +

      Detailed Description

      +

      A class that represents a stop.

      +

      The Stop class represents a stop. It contains a color and an offset.

      + +

      Definition at line 11 of file Stop.hpp.

      +

      Constructor & Destructor Documentation

      + +

      ◆ Stop()

      + +
      +
      + + + + + + + + + + + + + + + + + + +
      Stop::Stop (const mColorcolor,
      float offset 
      )
      +
      + +

      Constructs a Stop object.

      +
      Parameters
      + + + +
      colorThe color of the stop.
      offsetThe offset of the stop.
      +
      +
      + +

      Definition at line 3 of file Stop.cpp.

      +
      3 : color(color), offset(offset) {}
      +
      float offset
      The offset of the stop.
      Definition: Stop.hpp:37
      +
      mColor color
      The color of the stop.
      Definition: Stop.hpp:36
      +
      +
      +
      +

      Member Function Documentation

      + +

      ◆ getColor()

      + +
      +
      + + + + + + + +
      mColor Stop::getColor () const
      +
      + +

      Gets the color of the stop.

      +
      Returns
      The color of the stop.
      + +

      Definition at line 5 of file Stop.cpp.

      +
      5 { return color; }
      +
      +
      +
      + +

      ◆ getOffset()

      + +
      +
      + + + + + + + +
      float Stop::getOffset () const
      +
      + +

      Gets the offset of the stop.

      +
      Returns
      The offset of the stop.
      + +

      Definition at line 7 of file Stop.cpp.

      +
      7 { return offset; }
      +
      +
      +
      +
      The documentation for this class was generated from the following files: +
      +
      + + + \ No newline at end of file diff --git a/docs/classStop.js b/docs/classStop.js new file mode 100644 index 00000000..030cd0c6 --- /dev/null +++ b/docs/classStop.js @@ -0,0 +1,8 @@ +var classStop = +[ + [ "Stop", "classStop.html#a3ad6054f4ecb97b3fc68595b744f8d54", null ], + [ "getColor", "classStop.html#a0ee1f3e4c4298b8712cef19f24e07dff", null ], + [ "getOffset", "classStop.html#a60a63002485122f30a80e80220d99748", null ], + [ "color", "classStop.html#afb57d3535781a9e40efff24c43520a21", null ], + [ "offset", "classStop.html#a2b6aaf0f14507df64c6bbd99043ad44b", null ] +]; \ No newline at end of file diff --git a/docs/classStop__coll__graph.map b/docs/classStop__coll__graph.map new file mode 100644 index 00000000..dff3fc28 --- /dev/null +++ b/docs/classStop__coll__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/classStop__coll__graph.md5 b/docs/classStop__coll__graph.md5 new file mode 100644 index 00000000..216ecd24 --- /dev/null +++ b/docs/classStop__coll__graph.md5 @@ -0,0 +1 @@ +68d3d602b2759daa3ca28ced4f7327f1 \ No newline at end of file diff --git a/docs/classStop__coll__graph.svg b/docs/classStop__coll__graph.svg new file mode 100644 index 00000000..4deb1db9 --- /dev/null +++ b/docs/classStop__coll__graph.svg @@ -0,0 +1,52 @@ + + + + + + +Stop + + +Node1 + + +Stop + + + + + +Node2 + + +mColor + + + + + +Node2->Node1 + + + color + + + +Node2->Node2 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow + + + diff --git a/docs/html/classText-members.html b/docs/classText-members.html similarity index 72% rename from docs/html/classText-members.html rename to docs/classText-members.html index d9a295af..466d5407 100644 --- a/docs/html/classText-members.html +++ b/docs/classText-members.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -135,11 +135,15 @@ getFillColor() constSVGElement getFontSize() constText getFontStyle() constText - getOutlineColor() constSVGElement - getOutlineThickness() constSVGElement - getParent() constSVGElement - getPosition() constSVGElement - getTransforms() constSVGElement + getGradient() constSVGElement + getMaxBound() constSVGElementvirtual + getMinBound() constSVGElementvirtual + getOutlineColor() constSVGElement + getOutlineThickness() constSVGElement + getParent() constSVGElement + getPosition() constSVGElement + getTransforms() constSVGElement + gradientSVGElementprivate parentSVGElementprotected positionSVGElementprivate printData() const overrideTextvirtual @@ -148,19 +152,22 @@ setFillColor(const mColor &color)SVGElement setFontSize(float font_size)Text setFontStyle(std::string style)Text - setOutlineColor(const mColor &color)SVGElement - setOutlineThickness(float thickness)SVGElement - setParent(SVGElement *parent)SVGElement - setPosition(float x, float y)SVGElement - setPosition(const Vector2Df &position)SVGElement - setTransforms(const std::vector< std::string > &transforms)SVGElement - strokeSVGElementprivate - stroke_widthSVGElementprivate - styleTextprivate - SVGElement()SVGElementprotected - Text(Vector2Df pos, std::string text, float font_size, const mColor &fill, const mColor &stroke, float stroke_width)Text - transformsSVGElementprivate - ~SVGElement()=defaultSVGElementvirtual + setGradient(Gradient *gradient)SVGElement + setOutlineColor(const mColor &color)SVGElement + setOutlineThickness(float thickness)SVGElement + setParent(SVGElement *parent)SVGElement + setPosition(float x, float y)SVGElement + setPosition(const Vector2Df &position)SVGElement + setTransforms(const std::vector< std::string > &transforms)SVGElement + strokeSVGElementprivate + stroke_widthSVGElementprivate + styleTextprivate + SVGElement()SVGElementprotected + SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)SVGElementprotected + SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)SVGElementprotected + Text(Vector2Df pos, std::string text, float font_size, const mColor &fill, const mColor &stroke, float stroke_width)Text + transformsSVGElementprivate + ~SVGElement()=defaultSVGElementvirtual @@ -441,8 +453,8 @@

      Returns
      The font size of the text.
      -

      Definition at line 16 of file Text.cpp.

      -
      16 { return font_size; }
      +

      Definition at line 12 of file Text.cpp.

      +
      12 { return font_size; }
      @@ -464,8 +476,8 @@

      Returns
      The style of the text.
      -

      Definition at line 28 of file Text.cpp.

      -
      28 { return style; }
      +

      Definition at line 24 of file Text.cpp.

      +
      24 { return style; }
      std::string style
      Style of the text.
      Definition: Text.hpp:17
      @@ -494,8 +506,8 @@

      Definition at line 22 of file Text.cpp.

      -
      22 { this->anchor = anchor; }
      +

      Definition at line 18 of file Text.cpp.

      +
      18 { this->anchor = anchor; }
      @@ -523,8 +535,8 @@

      Definition at line 18 of file Text.cpp.

      -
      18 { this->content = content; }
      +

      Definition at line 14 of file Text.cpp.

      +
      14 { this->content = content; }
      @@ -552,8 +564,8 @@

      Definition at line 14 of file Text.cpp.

      -
      14 { this->font_size = font_size; }
      +

      Definition at line 10 of file Text.cpp.

      +
      10 { this->font_size = font_size; }
      @@ -581,8 +593,8 @@

      Definition at line 26 of file Text.cpp.

      -
      26 { this->style = font_style; }
      +

      Definition at line 22 of file Text.cpp.

      +
      22 { this->style = font_style; }
      diff --git a/docs/html/classText.js b/docs/classText.js similarity index 100% rename from docs/html/classText.js rename to docs/classText.js diff --git a/docs/classText__coll__graph.map b/docs/classText__coll__graph.map new file mode 100644 index 00000000..0b25f758 --- /dev/null +++ b/docs/classText__coll__graph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/classText__coll__graph.md5 b/docs/classText__coll__graph.md5 new file mode 100644 index 00000000..5268628c --- /dev/null +++ b/docs/classText__coll__graph.md5 @@ -0,0 +1 @@ +0772734d26eb88626283678b1934bc83 \ No newline at end of file diff --git a/docs/html/classText__coll__graph.png b/docs/classText__coll__graph.png similarity index 100% rename from docs/html/classText__coll__graph.png rename to docs/classText__coll__graph.png diff --git a/docs/html/classLine__coll__graph.svg b/docs/classText__coll__graph.svg similarity index 55% rename from docs/html/classLine__coll__graph.svg rename to docs/classText__coll__graph.svg index a4f6c6ff..a99e75de 100644 --- a/docs/html/classLine__coll__graph.svg +++ b/docs/classText__coll__graph.svg @@ -3,17 +3,17 @@ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> - - + + -Line +Text Node1 - - -Line + + +Text @@ -29,11 +29,11 @@ Node2->Node1 - - + + - + Node2->Node2 @@ -48,13 +48,6 @@ - - -Node3->Node1 - - - direction - Node3->Node2 @@ -65,34 +58,50 @@ Node4 - - -mColor + + +Gradient - + Node4->Node2 - fill -stroke + gradient - + + +Node5 + + +mColor + + + + -Node4->Node4 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow +Node5->Node2 + + + fill +stroke + + + +Node5->Node5 + + + Black +Blue +Cyan +Green +Magenta +Red +Transparent +White +Yellow diff --git a/docs/html/classText__inherit__graph.map b/docs/classText__inherit__graph.map similarity index 100% rename from docs/html/classText__inherit__graph.map rename to docs/classText__inherit__graph.map diff --git a/docs/html/classText__inherit__graph.md5 b/docs/classText__inherit__graph.md5 similarity index 100% rename from docs/html/classText__inherit__graph.md5 rename to docs/classText__inherit__graph.md5 diff --git a/docs/html/classText__inherit__graph.png b/docs/classText__inherit__graph.png similarity index 100% rename from docs/html/classText__inherit__graph.png rename to docs/classText__inherit__graph.png diff --git a/docs/html/classText__inherit__graph.svg b/docs/classText__inherit__graph.svg similarity index 100% rename from docs/html/classText__inherit__graph.svg rename to docs/classText__inherit__graph.svg diff --git a/docs/html/classVector2D-members.html b/docs/classVector2D-members.html similarity index 99% rename from docs/html/classVector2D-members.html rename to docs/classVector2D-members.html index 18e07028..4e8949f0 100644 --- a/docs/html/classVector2D-members.html +++ b/docs/classVector2D-members.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      diff --git a/docs/html/classVector2D.html b/docs/classVector2D.html similarity index 99% rename from docs/html/classVector2D.html rename to docs/classVector2D.html index c8a67b4b..c1362a49 100644 --- a/docs/html/classVector2D.html +++ b/docs/classVector2D.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      diff --git a/docs/html/classVector2D.js b/docs/classVector2D.js similarity index 100% rename from docs/html/classVector2D.js rename to docs/classVector2D.js diff --git a/docs/html/classViewer-members.html b/docs/classViewer-members.html similarity index 68% rename from docs/html/classViewer-members.html rename to docs/classViewer-members.html index fe2a2a09..3deff53d 100644 --- a/docs/html/classViewer-members.html +++ b/docs/classViewer-members.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -125,23 +125,25 @@

      This is the complete list of members for Viewer, including all inherited members.

      - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + +
      getInstance()Viewerstatic
      handleKeyDown(WPARAM wParam)Viewerprivate
      handleKeyEvent(WPARAM wParam)Viewer
      handleLeftButtonDown(LPARAM lParam)Viewerprivate
      handleLeftButtonUp()Viewerprivate
      handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam)Viewer
      handleMouseMove(LPARAM lParam)Viewerprivate
      handleMouseWheel(WPARAM wParam)Viewerprivate
      instanceViewerprivatestatic
      is_draggingViewerprivate
      last_mouse_posViewerprivate
      needs_repaintViewer
      offset_xViewer
      offset_yViewer
      operator=(const Viewer &)=deleteViewerprivate
      rotate_angleViewer
      Viewer()Viewerprivate
      Viewer(const Viewer &)=deleteViewerprivate
      getWindowSize(HWND hWnd) constViewer
      handleKeyDown(WPARAM wParam)Viewerprivate
      handleKeyEvent(WPARAM wParam)Viewer
      handleLeftButtonDown(LPARAM lParam)Viewerprivate
      handleLeftButtonUp()Viewerprivate
      handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam)Viewer
      handleMouseMove(LPARAM lParam)Viewerprivate
      handleMouseWheel(WPARAM wParam)Viewerprivate
      instanceViewerprivatestatic
      is_draggingViewerprivate
      last_mouse_posViewerprivate
      needs_repaintViewer
      offset_xViewer
      offset_yViewer
      operator=(const Viewer &)=deleteViewerprivate
      rotate_angleViewer
      Viewer()Viewerprivate
      Viewer(const Viewer &)=deleteViewerprivate
      window_sizeViewer
      zoom_factorViewer
      ~Viewer()Viewer
      diff --git a/docs/html/classViewer.html b/docs/classViewer.html similarity index 90% rename from docs/html/classViewer.html rename to docs/classViewer.html index bdfa2abe..2a67d185 100644 --- a/docs/html/classViewer.html +++ b/docs/classViewer.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -137,7 +137,8 @@
      Collaboration diagram for Viewer:
      -
      +
      +
      [legend]
      + + +

      @@ -152,6 +153,9 @@

      void handleKeyEvent (WPARAM wParam)
       Handles keyboard events. More...
       
      void getWindowSize (HWND hWnd) const
       Get the current window size. More...
       
      @@ -179,6 +183,10 @@ + + +

      Static Public Member Functions

       
      bool needs_repaint
       
      +Vector2Df window_size
       Size of the window.
       
      @@ -272,11 +280,48 @@

      7  }
      8  return instance;
      9 }
      -
      static Viewer * instance
      Singleton instance of the Viewer class.
      Definition: Viewer.hpp:55
      +
      static Viewer * instance
      Singleton instance of the Viewer class.
      Definition: Viewer.hpp:63
      Viewer()
      Private constructor for the Viewer class.
      Definition: Viewer.cpp:11
      + +

      ◆ getWindowSize()

      + +
      +
      +

      Private Member Functions

      + + + + + + + +
      void Viewer::getWindowSize (HWND hWnd) const
      +
      + +

      Get the current window size.

      +
      Parameters
      + + +
      hWndThe handle to the window.
      +
      +
      + +

      Definition at line 103 of file Viewer.cpp.

      +
      103  {
      +
      104  RECT rect;
      +
      105  GetClientRect(hWnd, &rect);
      +
      106  instance->window_size.x = static_cast< float >(rect.right - rect.left);
      +
      107  instance->window_size.y = static_cast< float >(rect.bottom - rect.top);
      +
      108 }
      +
      T x
      X coordinate of the vector.
      Definition: Vector2D.hpp:45
      +
      T y
      Y coordinate of the vector.
      Definition: Vector2D.hpp:46
      +
      Vector2Df window_size
      Size of the window.
      Definition: Viewer.hpp:24
      +
      +
      +

      ◆ handleKeyDown()

      @@ -395,8 +440,8 @@

      77  last_mouse_pos.y = static_cast< int >(HIWORD(lParam));
      78  SetCapture(GetActiveWindow());
      79 }
      -
      bool is_dragging
      Flag indicating whether the mouse is being dragged.
      Definition: Viewer.hpp:74
      -
      POINT last_mouse_pos
      Last recorded mouse position.
      Definition: Viewer.hpp:75
      +
      bool is_dragging
      Flag indicating whether the mouse is being dragged.
      Definition: Viewer.hpp:82
      +
      POINT last_mouse_pos
      Last recorded mouse position.
      Definition: Viewer.hpp:83
      diff --git a/docs/html/classViewer.js b/docs/classViewer.js similarity index 90% rename from docs/html/classViewer.js rename to docs/classViewer.js index 00acc8b0..8fa36db2 100644 --- a/docs/html/classViewer.js +++ b/docs/classViewer.js @@ -4,6 +4,7 @@ var classViewer = [ "Viewer", "classViewer.html#aaedebacb31cba87de6e7d448ed8d6586", null ], [ "Viewer", "classViewer.html#abb8e49e83e5c574411bb9995665fd7eb", null ], [ "getInstance", "classViewer.html#a8235c9da7e144d7139c91901c0051cd8", null ], + [ "getWindowSize", "classViewer.html#aa8d0481396e20f1a8d4f6691ff0a67c1", null ], [ "handleKeyDown", "classViewer.html#a8bcd4fdeb5c26092d65fc14474afeb38", null ], [ "handleKeyEvent", "classViewer.html#a643c2fc659f06f4d4bfcefbad22ebd75", null ], [ "handleLeftButtonDown", "classViewer.html#a2b889c5d09c8577ad1580dd610ac5678", null ], @@ -19,5 +20,6 @@ var classViewer = [ "offset_x", "classViewer.html#a3e16ebbf5c0ed98dc75fe2c4d46fe0d5", null ], [ "offset_y", "classViewer.html#a30b0f57907c82de620339e105f9a3c5b", null ], [ "rotate_angle", "classViewer.html#a82dfd34668f986b72e51ee86d4029fc6", null ], + [ "window_size", "classViewer.html#aa172f661daf24807148fb697f10e750a", null ], [ "zoom_factor", "classViewer.html#a46377febc22fd7f2cc38a73ddb66b8ad", null ] ]; \ No newline at end of file diff --git a/docs/classViewer__coll__graph.map b/docs/classViewer__coll__graph.map new file mode 100644 index 00000000..e5d4543d --- /dev/null +++ b/docs/classViewer__coll__graph.map @@ -0,0 +1,4 @@ + + + + diff --git a/docs/classViewer__coll__graph.md5 b/docs/classViewer__coll__graph.md5 new file mode 100644 index 00000000..ff3dd5ac --- /dev/null +++ b/docs/classViewer__coll__graph.md5 @@ -0,0 +1 @@ +6eb79e51c8fed025b0771632950889c1 \ No newline at end of file diff --git a/docs/html/classViewer__coll__graph.png b/docs/classViewer__coll__graph.png similarity index 100% rename from docs/html/classViewer__coll__graph.png rename to docs/classViewer__coll__graph.png diff --git a/docs/classViewer__coll__graph.svg b/docs/classViewer__coll__graph.svg new file mode 100644 index 00000000..8f43c8d6 --- /dev/null +++ b/docs/classViewer__coll__graph.svg @@ -0,0 +1,44 @@ + + + + + + +Viewer + + +Node1 + + +Viewer + + + + + +Node1->Node1 + + + instance + + + +Node2 + + +Vector2D< float > + + + + + +Node2->Node1 + + + window_size + + + diff --git a/docs/html/classes.html b/docs/classes.html similarity index 93% rename from docs/html/classes.html rename to docs/classes.html index ab7daf8b..ca784b6f 100644 --- a/docs/html/classes.html +++ b/docs/classes.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -131,10 +131,10 @@
      Ell
      G
      -
      Group
      +
      Gradient
      Group
      L
      -
      Line
      +
      Line
      LinearGradient
      M
      mColor
      @@ -143,10 +143,10 @@
      Parser
      Path
      PathPoint
      Plygon
      Plyline
      PolyShape
      R
      -
      Rect
      Renderer
      +
      RadialGradient
      Rect
      Renderer
      S
      -
      SVGElement
      +
      Stop
      SVGElement
      T
      Text
      diff --git a/docs/html/classmColor-members.html b/docs/classmColor-members.html similarity index 99% rename from docs/html/classmColor-members.html rename to docs/classmColor-members.html index 30e5050a..33a73a3f 100644 --- a/docs/html/classmColor-members.html +++ b/docs/classmColor-members.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      diff --git a/docs/html/classmColor.html b/docs/classmColor.html similarity index 99% rename from docs/html/classmColor.html rename to docs/classmColor.html index a26136be..41d13860 100644 --- a/docs/html/classmColor.html +++ b/docs/classmColor.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      diff --git a/docs/html/classmColor.js b/docs/classmColor.js similarity index 100% rename from docs/html/classmColor.js rename to docs/classmColor.js diff --git a/docs/html/classmColor__coll__graph.map b/docs/classmColor__coll__graph.map similarity index 100% rename from docs/html/classmColor__coll__graph.map rename to docs/classmColor__coll__graph.map diff --git a/docs/html/classmColor__coll__graph.md5 b/docs/classmColor__coll__graph.md5 similarity index 100% rename from docs/html/classmColor__coll__graph.md5 rename to docs/classmColor__coll__graph.md5 diff --git a/docs/html/classmColor__coll__graph.svg b/docs/classmColor__coll__graph.svg similarity index 100% rename from docs/html/classmColor__coll__graph.svg rename to docs/classmColor__coll__graph.svg diff --git a/docs/html/closed.png b/docs/closed.png similarity index 100% rename from docs/html/closed.png rename to docs/closed.png diff --git a/docs/html/custom-alternative.css b/docs/custom-alternative.css similarity index 100% rename from docs/html/custom-alternative.css rename to docs/custom-alternative.css diff --git a/docs/html/custom.css b/docs/custom.css similarity index 100% rename from docs/html/custom.css rename to docs/custom.css diff --git a/docs/diagrams/All.png b/docs/diagrams/All.png deleted file mode 100644 index 11851ef5..00000000 Binary files a/docs/diagrams/All.png and /dev/null differ diff --git a/docs/diagrams/All.puml b/docs/diagrams/All.puml deleted file mode 100644 index 35b206bb..00000000 --- a/docs/diagrams/All.puml +++ /dev/null @@ -1,330 +0,0 @@ -@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/Color.png b/docs/diagrams/Color.png deleted file mode 100644 index 578b6029..00000000 Binary files a/docs/diagrams/Color.png and /dev/null differ diff --git a/docs/diagrams/Color.puml b/docs/diagrams/Color.puml deleted file mode 100644 index 9a0438e7..00000000 --- a/docs/diagrams/Color.puml +++ /dev/null @@ -1,51 +0,0 @@ -@startuml - - - - - -/' Objects '/ - -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& -} - - - - - -/' Inheritance relationships '/ - - - - -/' Aggregation relationships '/ - -.mColor "9" *-- .mColor - - - - - - -/' Nested objects '/ - - - -@enduml diff --git a/docs/diagrams/Group.png b/docs/diagrams/Group.png deleted file mode 100644 index d55e45d1..00000000 Binary files a/docs/diagrams/Group.png and /dev/null differ diff --git a/docs/diagrams/Group.puml b/docs/diagrams/Group.puml deleted file mode 100644 index a0411e92..00000000 --- a/docs/diagrams/Group.puml +++ /dev/null @@ -1,41 +0,0 @@ -@startuml - - - - - -/' Objects '/ - -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} -} - - - - - -/' Inheritance relationships '/ - - - - -/' Aggregation relationships '/ - - - - - -/' Nested objects '/ - - - -@enduml diff --git a/docs/diagrams/Parser.png b/docs/diagrams/Parser.png deleted file mode 100644 index e429ca69..00000000 Binary files a/docs/diagrams/Parser.png and /dev/null differ diff --git a/docs/diagrams/Parser.puml b/docs/diagrams/Parser.puml deleted file mode 100644 index 9bfb8483..00000000 --- a/docs/diagrams/Parser.puml +++ /dev/null @@ -1,57 +0,0 @@ -@startuml - - - - - -/' 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 -} - - - - - -/' Inheritance relationships '/ - - - - -/' Aggregation relationships '/ - -.Parser --> .Parser : -instance - - - - - - -/' Nested objects '/ - - - -@enduml diff --git a/docs/diagrams/Renderer.png b/docs/diagrams/Renderer.png deleted file mode 100644 index a6afcbb0..00000000 Binary files a/docs/diagrams/Renderer.png and /dev/null differ diff --git a/docs/diagrams/Shape.png b/docs/diagrams/Shape.png deleted file mode 100644 index cf405ead..00000000 Binary files a/docs/diagrams/Shape.png and /dev/null differ diff --git a/docs/diagrams/Shape.puml b/docs/diagrams/Shape.puml deleted file mode 100644 index 6ee9fb9c..00000000 --- a/docs/diagrams/Shape.puml +++ /dev/null @@ -1,275 +0,0 @@ -@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 -} - - -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 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 - - -.SVGElement --> .SVGElement : #parent - - -.SVGElement "2" *-- .mColor - - -.mColor "9" *-- .mColor - - - - - - -/' Nested objects '/ - - - -@enduml diff --git a/docs/diagrams/Viewer.png b/docs/diagrams/Viewer.png deleted file mode 100644 index 95d2e4f6..00000000 Binary files a/docs/diagrams/Viewer.png and /dev/null differ diff --git a/docs/html/dir_560415a5d2bc4999842279f4fc1debef.html b/docs/dir_560415a5d2bc4999842279f4fc1debef.html similarity index 99% rename from docs/html/dir_560415a5d2bc4999842279f4fc1debef.html rename to docs/dir_560415a5d2bc4999842279f4fc1debef.html index 5dd7cc97..7cf1d173 100644 --- a/docs/html/dir_560415a5d2bc4999842279f4fc1debef.html +++ b/docs/dir_560415a5d2bc4999842279f4fc1debef.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      diff --git a/docs/html/dir_560415a5d2bc4999842279f4fc1debef.js b/docs/dir_560415a5d2bc4999842279f4fc1debef.js similarity index 73% rename from docs/html/dir_560415a5d2bc4999842279f4fc1debef.js rename to docs/dir_560415a5d2bc4999842279f4fc1debef.js index 4f2641aa..9e39bb4a 100644 --- a/docs/html/dir_560415a5d2bc4999842279f4fc1debef.js +++ b/docs/dir_560415a5d2bc4999842279f4fc1debef.js @@ -6,10 +6,14 @@ var dir_560415a5d2bc4999842279f4fc1debef = [ "Color.hpp", "Color_8hpp_source.html", null ], [ "Ellipse.cpp", "Ellipse_8cpp_source.html", null ], [ "Ellipse.hpp", "Ellipse_8hpp_source.html", null ], + [ "Gradient.cpp", "Gradient_8cpp_source.html", null ], + [ "Gradient.hpp", "Gradient_8hpp_source.html", null ], [ "Group.cpp", "Group_8cpp_source.html", null ], [ "Group.hpp", "Group_8hpp_source.html", null ], [ "Line.cpp", "Line_8cpp_source.html", null ], [ "Line.hpp", "Line_8hpp_source.html", null ], + [ "LinearGradient.cpp", "LinearGradient_8cpp_source.html", null ], + [ "LinearGradient.hpp", "LinearGradient_8hpp_source.html", null ], [ "Path.cpp", "Path_8cpp_source.html", null ], [ "Path.hpp", "Path_8hpp_source.html", null ], [ "Polygon.cpp", "Polygon_8cpp_source.html", null ], @@ -18,8 +22,12 @@ var dir_560415a5d2bc4999842279f4fc1debef = [ "Polyline.hpp", "Polyline_8hpp_source.html", null ], [ "PolyShape.cpp", "PolyShape_8cpp_source.html", null ], [ "PolyShape.hpp", "PolyShape_8hpp_source.html", null ], + [ "RadialGradient.cpp", "RadialGradient_8cpp_source.html", null ], + [ "RadialGradient.hpp", "RadialGradient_8hpp_source.html", null ], [ "Rect.cpp", "Rect_8cpp_source.html", null ], [ "Rect.hpp", "Rect_8hpp_source.html", null ], + [ "Stop.cpp", "Stop_8cpp_source.html", null ], + [ "Stop.hpp", "Stop_8hpp_source.html", null ], [ "SVGElement.cpp", "SVGElement_8cpp_source.html", null ], [ "SVGElement.hpp", "SVGElement_8hpp_source.html", null ], [ "Text.cpp", "Text_8cpp_source.html", null ], diff --git a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html similarity index 99% rename from docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html rename to docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html index 9902f9c9..a181419d 100644 --- a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +++ b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      diff --git a/docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js similarity index 100% rename from docs/html/dir_68267d1309a1af8e8297ef4c3efbcdba.js rename to docs/dir_68267d1309a1af8e8297ef4c3efbcdba.js diff --git a/docs/html/doc.png b/docs/doc.png similarity index 100% rename from docs/html/doc.png rename to docs/doc.png diff --git a/docs/html/doxygen-awesome-darkmode-toggle.js b/docs/doxygen-awesome-darkmode-toggle.js similarity index 100% rename from docs/html/doxygen-awesome-darkmode-toggle.js rename to docs/doxygen-awesome-darkmode-toggle.js diff --git a/docs/html/doxygen-awesome-fragment-copy-button.js b/docs/doxygen-awesome-fragment-copy-button.js similarity index 100% rename from docs/html/doxygen-awesome-fragment-copy-button.js rename to docs/doxygen-awesome-fragment-copy-button.js diff --git a/docs/html/doxygen-awesome-interactive-toc.js b/docs/doxygen-awesome-interactive-toc.js similarity index 100% rename from docs/html/doxygen-awesome-interactive-toc.js rename to docs/doxygen-awesome-interactive-toc.js diff --git a/docs/html/doxygen-awesome-paragraph-link.js b/docs/doxygen-awesome-paragraph-link.js similarity index 100% rename from docs/html/doxygen-awesome-paragraph-link.js rename to docs/doxygen-awesome-paragraph-link.js diff --git a/docs/html/doxygen-awesome-sidebar-only-darkmode-toggle.css b/docs/doxygen-awesome-sidebar-only-darkmode-toggle.css similarity index 100% rename from docs/html/doxygen-awesome-sidebar-only-darkmode-toggle.css rename to docs/doxygen-awesome-sidebar-only-darkmode-toggle.css diff --git a/docs/html/doxygen-awesome-sidebar-only.css b/docs/doxygen-awesome-sidebar-only.css similarity index 100% rename from docs/html/doxygen-awesome-sidebar-only.css rename to docs/doxygen-awesome-sidebar-only.css diff --git a/docs/html/doxygen-awesome-tabs.js b/docs/doxygen-awesome-tabs.js similarity index 100% rename from docs/html/doxygen-awesome-tabs.js rename to docs/doxygen-awesome-tabs.js diff --git a/docs/html/doxygen-awesome.css b/docs/doxygen-awesome.css similarity index 100% rename from docs/html/doxygen-awesome.css rename to docs/doxygen-awesome.css diff --git a/docs/html/doxygen.css b/docs/doxygen.css similarity index 100% rename from docs/html/doxygen.css rename to docs/doxygen.css diff --git a/docs/html/doxygen.svg b/docs/doxygen.svg similarity index 100% rename from docs/html/doxygen.svg rename to docs/doxygen.svg diff --git a/docs/html/dynsections.js b/docs/dynsections.js similarity index 100% rename from docs/html/dynsections.js rename to docs/dynsections.js diff --git a/docs/html/files.html b/docs/files.html similarity index 87% rename from docs/html/files.html rename to docs/files.html index e80222e8..be6ff434 100644 --- a/docs/html/files.html +++ b/docs/files.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -131,25 +131,33 @@  Color.hpp  Ellipse.cpp  Ellipse.hpp - Group.cpp - Group.hpp - Line.cpp - Line.hpp - Path.cpp - Path.hpp - Polygon.cpp - Polygon.hpp - Polyline.cpp - Polyline.hpp - PolyShape.cpp - PolyShape.hpp - Rect.cpp - Rect.hpp - SVGElement.cpp - SVGElement.hpp - Text.cpp - Text.hpp - Vector2D.hpp + Gradient.cpp + Gradient.hpp + Group.cpp + Group.hpp + Line.cpp + Line.hpp + LinearGradient.cpp + LinearGradient.hpp + Path.cpp + Path.hpp + Polygon.cpp + Polygon.hpp + Polyline.cpp + Polyline.hpp + PolyShape.cpp + PolyShape.hpp + RadialGradient.cpp + RadialGradient.hpp + Rect.cpp + Rect.hpp + Stop.cpp + Stop.hpp + SVGElement.cpp + SVGElement.hpp + Text.cpp + Text.hpp + Vector2D.hpp  Graphics.hpp  main.cpp  Parser.cpp diff --git a/docs/html/files_dup.js b/docs/files_dup.js similarity index 100% rename from docs/html/files_dup.js rename to docs/files_dup.js diff --git a/docs/html/folderclosed.png b/docs/folderclosed.png similarity index 100% rename from docs/html/folderclosed.png rename to docs/folderclosed.png diff --git a/docs/html/folderopen.png b/docs/folderopen.png similarity index 100% rename from docs/html/folderopen.png rename to docs/folderopen.png diff --git a/docs/functions.html b/docs/functions.html new file mode 100644 index 00000000..faf72c1e --- /dev/null +++ b/docs/functions.html @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      svg-reader +  0.3 +
      +
      Parse and render SVG files, handle user interactions.
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      Here is a list of all documented class members with links to the class documentation for each member:
      + +

      - a -

      +
      +
      + + + \ No newline at end of file diff --git a/docs/functions_b.html b/docs/functions_b.html new file mode 100644 index 00000000..e0b9f928 --- /dev/null +++ b/docs/functions_b.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      svg-reader +  0.3 +
      +
      Parse and render SVG files, handle user interactions.
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      Here is a list of all documented class members with links to the class documentation for each member:
      + +

      - b -

      +
      +
      + + + \ No newline at end of file diff --git a/docs/functions_c.html b/docs/functions_c.html new file mode 100644 index 00000000..6611defc --- /dev/null +++ b/docs/functions_c.html @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      svg-reader +  0.3 +
      +
      Parse and render SVG files, handle user interactions.
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      Here is a list of all documented class members with links to the class documentation for each member:
      + +

      - c -

      +
      +
      + + + \ No newline at end of file diff --git a/docs/functions_d.html b/docs/functions_d.html new file mode 100644 index 00000000..8578aac6 --- /dev/null +++ b/docs/functions_d.html @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      svg-reader +  0.3 +
      +
      Parse and render SVG files, handle user interactions.
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      Here is a list of all documented class members with links to the class documentation for each member:
      + +

      - d -

      +
      +
      + + + \ No newline at end of file diff --git a/docs/functions_dup.js b/docs/functions_dup.js new file mode 100644 index 00000000..74418ec2 --- /dev/null +++ b/docs/functions_dup.js @@ -0,0 +1,27 @@ +var functions_dup = +[ + [ "a", "functions.html", null ], + [ "b", "functions_b.html", null ], + [ "c", "functions_c.html", null ], + [ "d", "functions_d.html", null ], + [ "e", "functions_e.html", null ], + [ "f", "functions_f.html", null ], + [ "g", "functions_g.html", null ], + [ "h", "functions_h.html", null ], + [ "i", "functions_i.html", null ], + [ "l", "functions_l.html", null ], + [ "m", "functions_m.html", null ], + [ "n", "functions_n.html", null ], + [ "o", "functions_o.html", null ], + [ "p", "functions_p.html", null ], + [ "r", "functions_r.html", null ], + [ "s", "functions_s.html", null ], + [ "t", "functions_t.html", null ], + [ "u", "functions_u.html", null ], + [ "v", "functions_v.html", null ], + [ "w", "functions_w.html", null ], + [ "x", "functions_x.html", null ], + [ "y", "functions_y.html", null ], + [ "z", "functions_z.html", null ], + [ "~", "functions_~.html", null ] +]; \ No newline at end of file diff --git a/docs/functions_e.html b/docs/functions_e.html new file mode 100644 index 00000000..bd37e2ff --- /dev/null +++ b/docs/functions_e.html @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      svg-reader +  0.3 +
      +
      Parse and render SVG files, handle user interactions.
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      Here is a list of all documented class members with links to the class documentation for each member:
      + +

      - e -

        +
      • Ell() +: Ell +
      • +
      +
      +
      + + + \ No newline at end of file diff --git a/docs/functions_f.html b/docs/functions_f.html new file mode 100644 index 00000000..220db7e3 --- /dev/null +++ b/docs/functions_f.html @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + + + + + + +
      +
      svg-reader +  0.3 +
      +
      Parse and render SVG files, handle user interactions.
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      Here is a list of all documented class members with links to the class documentation for each member:
      + +

      - f -

      +
      +
      + + + \ No newline at end of file diff --git a/docs/html/functions_func.html b/docs/functions_func.html similarity index 77% rename from docs/html/functions_func.html rename to docs/functions_func.html index ad96ae55..35407238 100644 --- a/docs/html/functions_func.html +++ b/docs/functions_func.html @@ -60,7 +60,7 @@
      svg-reader -  0.2 +  0.3
      Parse and render SVG files, handle user interactions.
      @@ -128,9 +128,15 @@

      - a -

      @@ -184,24 +190,33 @@

      - g -

        : Text
      • getAttribute() -: Parser +: Parser
      • getAttributes() : Group
      • +
      • getBrush() +: Renderer +
      • getClass() : Circle , Ell +, Gradient , Group , Line +, LinearGradient , Path , Plygon , Plyline , PolyShape +, RadialGradient , Rect , SVGElement , Text
      • +
      • getColor() +: Stop +
      • getContent() : Text
      • @@ -216,11 +231,10 @@

        - g -

        • getFillRule() : Path -, Plygon -, Plyline +, PolyShape
        • getFloatAttribute() -: Parser +: Parser
        • getFontSize() : Text @@ -228,6 +242,15 @@

          - g -

          • getFontStyle() : Text
          • +
          • getGradient() +: SVGElement +
          • +
          • GetGradients() +: Parser +
          • +
          • getGradientStops() +: Parser +
          • getHeight() : Rect
          • @@ -239,6 +262,19 @@

            - g -

            • getLength() : Line
            • +
            • getMaxBound() +: Ell +, PolyShape +, SVGElement +
            • +
            • getMinBound() +: Ell +, PolyShape +, SVGElement +
            • +
            • getOffset() +: Stop +
            • getOutlineColor() : SVGElement
            • @@ -249,7 +285,8 @@

              - g -

                : SVGElement
              • getPoints() -: Path +: Gradient +, Path , PolyShape
              • getPosition() @@ -257,20 +294,43 @@

                - g -

                @@ -303,6 +363,9 @@

                - l -

                @@ -323,46 +386,49 @@

                - o -

                  - p -

                  • parseCircle() -: Parser +: Parser
                  • parseColor() -: Parser +: Parser
                  • parseElements() : Parser
                  • parseEllipse() -: Parser +: Parser +
                  • +
                  • parseGradient() +: Parser
                  • parseLine() -: Parser +: Parser
                  • parsePath() -: Parser +: Parser
                  • parsePathPoints() -: Parser +: Parser
                  • parsePoints() -: Parser +: Parser
                  • parsePolygon() -: Parser +: Parser
                  • parsePolyline() -: Parser +: Parser
                  • Parser() : Parser
                  • parseRect() -: Parser +: Parser
                  • parseShape() -: Parser +: Parser
                  • parseText() -: Parser +: Parser
                  • Path() : Path @@ -392,6 +458,9 @@

                    - p -

                      - r -

                        +
                      • RadialGradient() +: RadialGradient +
                      • Rect() : Rect
                      • @@ -416,8 +485,7 @@

                        - s -

                        • setFillRule() : Path -, Plygon -, Plyline +, PolyShape
                        • setFontSize() : Text @@ -425,6 +493,9 @@

                          - s -

                          • setFontStyle() : Text
                          • +
                          • setGradient() +: SVGElement +
                          • setHeight() : Rect
                          • @@ -445,11 +516,18 @@

                            - s -

                              , Rect
                            • setTransforms() -: SVGElement +: Gradient +, SVGElement +
                            • +
                            • setUnits() +: Gradient
                            • setWidth() : Rect
                            • +
                            • Stop() +: Stop +
                            • SVGElement() : SVGElement
                            • @@ -474,6 +552,12 @@

                              - v -

                                - ~ -

                                  +
                                • ~Gradient() +: Gradient +
                                • +
                                • ~Group() +: Group +
                                • ~Parser() : Parser
                                • diff --git a/docs/functions_g.html b/docs/functions_g.html new file mode 100644 index 00000000..90d8c430 --- /dev/null +++ b/docs/functions_g.html @@ -0,0 +1,289 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - g -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_h.html b/docs/functions_h.html new file mode 100644 index 00000000..8f33528f --- /dev/null +++ b/docs/functions_h.html @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - h -

                                    +
                                  • handleKeyDown() +: Viewer +
                                  • +
                                  • handleKeyEvent() +: Viewer +
                                  • +
                                  • handleLeftButtonDown() +: Viewer +
                                  • +
                                  • handleLeftButtonUp() +: Viewer +
                                  • +
                                  • handleMouseEvent() +: Viewer +
                                  • +
                                  • handleMouseMove() +: Viewer +
                                  • +
                                  • handleMouseWheel() +: Viewer +
                                  • +
                                  • height +: Rect +
                                  • +
                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_i.html b/docs/functions_i.html new file mode 100644 index 00000000..681c8edb --- /dev/null +++ b/docs/functions_i.html @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - i -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_l.html b/docs/functions_l.html new file mode 100644 index 00000000..eafabea6 --- /dev/null +++ b/docs/functions_l.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - l -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_m.html b/docs/functions_m.html new file mode 100644 index 00000000..39fe91ab --- /dev/null +++ b/docs/functions_m.html @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - m -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_n.html b/docs/functions_n.html new file mode 100644 index 00000000..e4977008 --- /dev/null +++ b/docs/functions_n.html @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - n -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_o.html b/docs/functions_o.html new file mode 100644 index 00000000..337b1f30 --- /dev/null +++ b/docs/functions_o.html @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - o -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_p.html b/docs/functions_p.html new file mode 100644 index 00000000..a3bf204c --- /dev/null +++ b/docs/functions_p.html @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - p -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_r.html b/docs/functions_r.html new file mode 100644 index 00000000..d1e209f2 --- /dev/null +++ b/docs/functions_r.html @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - r -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/html/functions_rela.html b/docs/functions_rela.html similarity index 99% rename from docs/html/functions_rela.html rename to docs/functions_rela.html index 19dd6232..e3176db8 100644 --- a/docs/html/functions_rela.html +++ b/docs/functions_rela.html @@ -60,7 +60,7 @@
                                  svg-reader -  0.2 +  0.3
                                  Parse and render SVG files, handle user interactions.
                                  diff --git a/docs/functions_s.html b/docs/functions_s.html new file mode 100644 index 00000000..5c7d84c6 --- /dev/null +++ b/docs/functions_s.html @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - s -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_t.html b/docs/functions_t.html new file mode 100644 index 00000000..f2c9ad12 --- /dev/null +++ b/docs/functions_t.html @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - t -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_u.html b/docs/functions_u.html new file mode 100644 index 00000000..bd8f36ec --- /dev/null +++ b/docs/functions_u.html @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - u -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/functions_v.html b/docs/functions_v.html new file mode 100644 index 00000000..d392ca61 --- /dev/null +++ b/docs/functions_v.html @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                  +
                                  + + + + + + +
                                  +
                                  svg-reader +  0.3 +
                                  +
                                  Parse and render SVG files, handle user interactions.
                                  +
                                  +
                                  + + + + + + + +
                                  +
                                  + +
                                  +
                                  +
                                  + +
                                  + +
                                  +
                                  + + +
                                  + +
                                  + +
                                  +
                                  Here is a list of all documented class members with links to the class documentation for each member:
                                  + +

                                  - v -

                                  +
                                  +
                                  + + + \ No newline at end of file diff --git a/docs/html/functions_vars.html b/docs/functions_vars.html similarity index 88% rename from docs/html/functions_vars.html rename to docs/functions_vars.html index 995b6d7a..c575e78e 100644 --- a/docs/html/functions_vars.html +++ b/docs/functions_vars.html @@ -60,7 +60,7 @@
                                  svg-reader -  0.2 +  0.3
                                  Parse and render SVG files, handle user interactions.
                                  @@ -146,6 +146,9 @@

                                  - b -

                                    - c -

                                      +
                                    • color +: Stop +
                                    • content : Text
                                    • @@ -168,8 +171,7 @@

                                      - f -

                                      • fill_rule : Path -, Plygon -, Plyline +, PolyShape
                                      • font_size : Text @@ -181,6 +183,12 @@

                                        - g -

                                        • g : mColor
                                        • +
                                        • gradient +: SVGElement +
                                        • +
                                        • gradients +: Parser +
                                        • Green : mColor
                                        • @@ -228,6 +236,9 @@

                                          - n -

                                            - o -

                                              +
                                            • offset +: Stop +
                                            • offset_x : Viewer
                                            • @@ -242,7 +253,8 @@

                                              - p -

                                                : SVGElement
                                              • points -: Path +: Gradient +, Path , PolyShape
                                              • position @@ -257,6 +269,7 @@

                                                - r -

                                                • radius : Ell +, RadialGradient , Rect
                                                • Red @@ -275,6 +288,9 @@

                                                  - s -

                                                  • shapes : Group
                                                  • +
                                                  • stops +: Gradient +
                                                  • stroke : SVGElement
                                                  • @@ -289,7 +305,8 @@

                                                    - s -

                                                      - t -

                                                      • transforms -: SVGElement +: Gradient +, SVGElement
                                                      • Transparent : mColor @@ -297,6 +314,23 @@

                                                        - t -

                                                        +

                                                        - u -

                                                        + + +

                                                        - v -

                                                        + +

                                                        - w -

                                                        • White : mColor @@ -304,6 +338,9 @@

                                                          - w -

                                                          diff --git a/docs/functions_w.html b/docs/functions_w.html new file mode 100644 index 00000000..25b4c32f --- /dev/null +++ b/docs/functions_w.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                          +
                                                          + + + + + + +
                                                          +
                                                          svg-reader +  0.3 +
                                                          +
                                                          Parse and render SVG files, handle user interactions.
                                                          +
                                                          +
                                                          + + + + + + + +
                                                          +
                                                          + +
                                                          +
                                                          +
                                                          + +
                                                          + +
                                                          +
                                                          + + +
                                                          + +
                                                          + +
                                                          +
                                                          Here is a list of all documented class members with links to the class documentation for each member:
                                                          + +

                                                          - w -

                                                          +
                                                          +
                                                          + + + \ No newline at end of file diff --git a/docs/functions_x.html b/docs/functions_x.html new file mode 100644 index 00000000..6c8249cd --- /dev/null +++ b/docs/functions_x.html @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                          +
                                                          + + + + + + +
                                                          +
                                                          svg-reader +  0.3 +
                                                          +
                                                          Parse and render SVG files, handle user interactions.
                                                          +
                                                          +
                                                          + + + + + + + +
                                                          +
                                                          + +
                                                          +
                                                          +
                                                          + +
                                                          + +
                                                          +
                                                          + + +
                                                          + +
                                                          + +
                                                          +
                                                          Here is a list of all documented class members with links to the class documentation for each member:
                                                          + +

                                                          - x -

                                                          +
                                                          +
                                                          + + + \ No newline at end of file diff --git a/docs/functions_y.html b/docs/functions_y.html new file mode 100644 index 00000000..0f7aa260 --- /dev/null +++ b/docs/functions_y.html @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                          +
                                                          + + + + + + +
                                                          +
                                                          svg-reader +  0.3 +
                                                          +
                                                          Parse and render SVG files, handle user interactions.
                                                          +
                                                          +
                                                          + + + + + + + +
                                                          +
                                                          + +
                                                          +
                                                          +
                                                          + +
                                                          + +
                                                          +
                                                          + + +
                                                          + +
                                                          + +
                                                          +
                                                          Here is a list of all documented class members with links to the class documentation for each member:
                                                          + +

                                                          - y -

                                                          +
                                                          +
                                                          + + + \ No newline at end of file diff --git a/docs/functions_z.html b/docs/functions_z.html new file mode 100644 index 00000000..f0290105 --- /dev/null +++ b/docs/functions_z.html @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                          +
                                                          + + + + + + +
                                                          +
                                                          svg-reader +  0.3 +
                                                          +
                                                          Parse and render SVG files, handle user interactions.
                                                          +
                                                          +
                                                          + + + + + + + +
                                                          +
                                                          + +
                                                          +
                                                          +
                                                          + +
                                                          + +
                                                          +
                                                          + + +
                                                          + +
                                                          + +
                                                          +
                                                          Here is a list of all documented class members with links to the class documentation for each member:
                                                          + +

                                                          - z -

                                                          +
                                                          +
                                                          + + + \ No newline at end of file diff --git a/docs/functions_~.html b/docs/functions_~.html new file mode 100644 index 00000000..491de619 --- /dev/null +++ b/docs/functions_~.html @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + +svg-reader: Class Members + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                          +
                                                          + + + + + + +
                                                          +
                                                          svg-reader +  0.3 +
                                                          +
                                                          Parse and render SVG files, handle user interactions.
                                                          +
                                                          +
                                                          + + + + + + + +
                                                          +
                                                          + +
                                                          +
                                                          +
                                                          + +
                                                          + +
                                                          +
                                                          + + +
                                                          + +
                                                          + +
                                                          +
                                                          Here is a list of all documented class members with links to the class documentation for each member:
                                                          + +

                                                          - ~ -

                                                          +
                                                          +
                                                          + + + \ No newline at end of file diff --git a/docs/html/graph_legend.html b/docs/graph_legend.html similarity index 99% rename from docs/html/graph_legend.html rename to docs/graph_legend.html index 107766b8..6bf424b4 100644 --- a/docs/html/graph_legend.html +++ b/docs/graph_legend.html @@ -60,7 +60,7 @@
                                                          svg-reader -  0.2 +  0.3
                                                          Parse and render SVG files, handle user interactions.
                                                          diff --git a/docs/html/graph_legend.md5 b/docs/graph_legend.md5 similarity index 100% rename from docs/html/graph_legend.md5 rename to docs/graph_legend.md5 diff --git a/docs/html/graph_legend.png b/docs/graph_legend.png similarity index 100% rename from docs/html/graph_legend.png rename to docs/graph_legend.png diff --git a/docs/html/graph_legend.svg b/docs/graph_legend.svg similarity index 100% rename from docs/html/graph_legend.svg rename to docs/graph_legend.svg diff --git a/docs/html/hierarchy.html b/docs/hierarchy.html similarity index 77% rename from docs/html/hierarchy.html rename to docs/hierarchy.html index e52febaa..ff903d3a 100644 --- a/docs/html/hierarchy.html +++ b/docs/hierarchy.html @@ -60,7 +60,7 @@
                                                          svg-reader -  0.2 +  0.3
                                                          Parse and render SVG files, handle user interactions.
                                                          @@ -125,24 +125,28 @@

                                                          Go to the graphical class hierarchy

                                                          This inheritance list is sorted roughly, but not completely, alphabetically:
                                                          [detail level 123]
                                                          - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +
                                                           CmColorUtility class for manipulating RGBA mColors
                                                           CParserTo manipulate and parse an SVG file
                                                           CPathPointA struct that contains a point and a type of point
                                                           CRendererSingleton class responsible for rendering shapes using GDI+
                                                           CSVGElementRepresents an element in an SVG file
                                                           CEllRepresents an ellipse in 2D space
                                                           CCircleRepresents a circle in 2D space
                                                           CGroupA composite class that contains a vector of shape pointers (polymorphic)
                                                           CLineRepresents a line in 2D space
                                                           CPathRepresents a path element in 2D space
                                                           CPolyShapeAbstract base class for polygon and polyline shapes in 2D space
                                                           CPlygonRepresents a polygon in 2D space
                                                           CPlylineRepresents a polyline in 2D space
                                                           CRectRepresents a rectangle in 2D space
                                                           CTextRepresents text in 2D space
                                                           CVector2D< T >Utility template class for manipulating 2-dimensional vectors
                                                           CVector2D< float >
                                                           CViewerRepresents a viewer for rendering and interacting with a scene
                                                           CGradientA class that represents a gradient
                                                           CLinearGradientA class that represents a linear gradient
                                                           CRadialGradientA class that represents a radial gradient
                                                           CmColorUtility class for manipulating RGBA mColors
                                                           CParserTo manipulate and parse an SVG file
                                                           CPathPointA struct that contains a point and a type of point
                                                           CRendererSingleton class responsible for rendering shapes using GDI+
                                                           CStopA class that represents a stop
                                                           CSVGElementRepresents an element in an SVG file
                                                           CEllRepresents an ellipse in 2D space
                                                           CCircleRepresents a circle in 2D space
                                                           CGroupA composite class that contains a vector of shape pointers (polymorphic)
                                                           CLineRepresents a line in 2D space
                                                           CPathRepresents a path element in 2D space
                                                           CPolyShapeAbstract base class for polygon and polyline shapes in 2D space
                                                           CPlygonRepresents a polygon in 2D space
                                                           CPlylineRepresents a polyline in 2D space
                                                           CRectRepresents a rectangle in 2D space
                                                           CTextRepresents text in 2D space
                                                           CVector2D< T >Utility template class for manipulating 2-dimensional vectors
                                                           CVector2D< float >
                                                           CViewerRepresents a viewer for rendering and interacting with a scene
                                                          diff --git a/docs/html/hierarchy.js b/docs/hierarchy.js similarity index 71% rename from docs/html/hierarchy.js rename to docs/hierarchy.js index 5d583b0c..be89d925 100644 --- a/docs/html/hierarchy.js +++ b/docs/hierarchy.js @@ -1,9 +1,14 @@ var hierarchy = [ + [ "Gradient", "classGradient.html", [ + [ "LinearGradient", "classLinearGradient.html", null ], + [ "RadialGradient", "classRadialGradient.html", null ] + ] ], [ "mColor", "classmColor.html", null ], [ "Parser", "classParser.html", null ], [ "PathPoint", "structPathPoint.html", null ], [ "Renderer", "classRenderer.html", null ], + [ "Stop", "classStop.html", null ], [ "SVGElement", "classSVGElement.html", [ [ "Ell", "classEll.html", [ [ "Circle", "classCircle.html", null ] @@ -13,9 +18,9 @@ var hierarchy = [ "Path", "classPath.html", null ], [ "PolyShape", "classPolyShape.html", [ [ "Plygon", "classPlygon.html", null ], - [ "Plyline", "classPlyline.html", null ], - [ "Rect", "classRect.html", null ] + [ "Plyline", "classPlyline.html", null ] ] ], + [ "Rect", "classRect.html", null ], [ "Text", "classText.html", null ] ] ], [ "Vector2D< T >", "classVector2D.html", null ], diff --git a/docs/html/Parser_8cpp_source.html b/docs/html/Parser_8cpp_source.html deleted file mode 100644 index 14c6e5c8..00000000 --- a/docs/html/Parser_8cpp_source.html +++ /dev/null @@ -1,723 +0,0 @@ - - - - - - - - - - - - - - - - - - -svg-reader: src/Parser.cpp Source File - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          -
                                                          - - - - - - -
                                                          -
                                                          svg-reader -  0.2 -
                                                          -
                                                          Parse and render SVG files, handle user interactions.
                                                          -
                                                          -
                                                          - - - - - - - -
                                                          -
                                                          - -
                                                          -
                                                          -
                                                          - -
                                                          - -
                                                          -
                                                          - - -
                                                          - -
                                                          - -
                                                          -
                                                          -
                                                          Parser.cpp
                                                          -
                                                          -
                                                          -
                                                          1 #include "Parser.hpp"
                                                          -
                                                          2 
                                                          -
                                                          3 #include <algorithm>
                                                          -
                                                          4 #include <cstring>
                                                          -
                                                          5 #include <fstream>
                                                          -
                                                          6 #include <iostream>
                                                          -
                                                          7 #include <sstream>
                                                          -
                                                          8 
                                                          -
                                                          9 Parser *Parser::instance = nullptr;
                                                          -
                                                          10 
                                                          -
                                                          11 namespace {
                                                          -
                                                          12  auto getHexColor = [](std::string color) -> mColor {
                                                          -
                                                          13  std::stringstream ss;
                                                          -
                                                          14  int pos = color.find("#");
                                                          -
                                                          15  // handle 3 digit hex color
                                                          -
                                                          16  if (color.size() < 5 || color[pos + 4] == ' ') {
                                                          -
                                                          17  ss << std::hex << color.substr(pos + 1, 1) << " "
                                                          -
                                                          18  << color.substr(pos + 2, 1) << " " << color.substr(pos + 3, 1);
                                                          -
                                                          19  int r, g, b;
                                                          -
                                                          20  ss >> r >> g >> b;
                                                          -
                                                          21  r = r * 16 + r;
                                                          -
                                                          22  g = g * 16 + g;
                                                          -
                                                          23  b = b * 16 + b;
                                                          -
                                                          24  return mColor(r, g, b, 255);
                                                          -
                                                          25  } else if (color.size() < 6 || color[pos + 5] == ' ') {
                                                          -
                                                          26  ss << std::hex << color.substr(pos + 1, 1) << " "
                                                          -
                                                          27  << color.substr(pos + 2, 1) << " " << color.substr(pos + 3, 1)
                                                          -
                                                          28  << color.substr(pos + 4, 1);
                                                          -
                                                          29  int r, g, b, a;
                                                          -
                                                          30  ss >> r >> g >> b >> a;
                                                          -
                                                          31  r = r * 16 + r;
                                                          -
                                                          32  g = g * 16 + g;
                                                          -
                                                          33  b = b * 16 + b;
                                                          -
                                                          34  a = a * 16 + a;
                                                          -
                                                          35  return mColor(r, g, b, a);
                                                          -
                                                          36  } else {
                                                          -
                                                          37  ss << std::hex << color.substr(pos + 1, 2) << " "
                                                          -
                                                          38  << color.substr(pos + 3, 2) << " " << color.substr(pos + 5, 2);
                                                          -
                                                          39  int r, g, b;
                                                          -
                                                          40  ss >> r >> g >> b;
                                                          -
                                                          41  if (color[pos + 7] != '\0' && color[pos + 7] != ' ') {
                                                          -
                                                          42  std::stringstream ss;
                                                          -
                                                          43  ss << std::hex << color.substr(pos + 7, 2);
                                                          -
                                                          44  int a;
                                                          -
                                                          45  ss >> a;
                                                          -
                                                          46  return mColor(r, g, b, a);
                                                          -
                                                          47  }
                                                          -
                                                          48  return mColor(r, g, b, 255);
                                                          -
                                                          49  }
                                                          -
                                                          50  };
                                                          -
                                                          51 
                                                          -
                                                          52  auto getRgbColor = [](std::string color) -> mColor {
                                                          -
                                                          53  int r, g, b;
                                                          -
                                                          54  float a = 1;
                                                          -
                                                          55  sscanf(color.c_str(), "rgb(%d,%d,%d,%f)", &r, &g, &b, &a);
                                                          -
                                                          56  return mColor(r, g, b, 255 * a);
                                                          -
                                                          57  };
                                                          -
                                                          58 
                                                          -
                                                          59  std::string removeExtraSpaces(std::string input) {
                                                          -
                                                          60  input.erase(std::remove(input.begin(), input.end(), '\t'), input.end());
                                                          -
                                                          61  input.erase(std::remove(input.begin(), input.end(), '\n'), input.end());
                                                          -
                                                          62  std::string result;
                                                          -
                                                          63  bool spaceDetected = false;
                                                          -
                                                          64  bool firstSpace = true;
                                                          -
                                                          65  for (int i = 0; i < input.size(); i++) {
                                                          -
                                                          66  if (input[i] == ' ') {
                                                          -
                                                          67  if (!spaceDetected) {
                                                          -
                                                          68  if (!firstSpace)
                                                          -
                                                          69  result.push_back(input[i]);
                                                          -
                                                          70  else
                                                          -
                                                          71  firstSpace = false;
                                                          -
                                                          72  spaceDetected = true;
                                                          -
                                                          73  }
                                                          -
                                                          74  } else {
                                                          -
                                                          75  result.push_back(input[i]);
                                                          -
                                                          76  firstSpace = false;
                                                          -
                                                          77  spaceDetected = false;
                                                          -
                                                          78  }
                                                          -
                                                          79  }
                                                          -
                                                          80 
                                                          -
                                                          81  if (!result.empty() && result.back() == ' ') {
                                                          -
                                                          82  result.pop_back();
                                                          -
                                                          83  }
                                                          -
                                                          84 
                                                          -
                                                          85  return result;
                                                          -
                                                          86  }
                                                          -
                                                          87 
                                                          -
                                                          88  void removeRedundantSpaces(std::string &svgPathString) {
                                                          -
                                                          89  int index = 0;
                                                          -
                                                          90  while (index < svgPathString.size()) {
                                                          -
                                                          91  if ((index == 0 || index == svgPathString.size() - 1) &&
                                                          -
                                                          92  svgPathString[index] == ' ') {
                                                          -
                                                          93  svgPathString.erase(index, 1);
                                                          -
                                                          94  } else if (svgPathString[index] == ' ' &&
                                                          -
                                                          95  svgPathString[index - 1] == ' ') {
                                                          -
                                                          96  svgPathString.erase(index, 1);
                                                          -
                                                          97  } else {
                                                          -
                                                          98  index++;
                                                          -
                                                          99  }
                                                          -
                                                          100  }
                                                          -
                                                          101  }
                                                          -
                                                          102 
                                                          -
                                                          103  void insertSpaceBeforeEachLetter(std::string &svgPathString) {
                                                          -
                                                          104  std::string result;
                                                          -
                                                          105  for (int index = 0; index < svgPathString.size(); index++) {
                                                          -
                                                          106  if (std::isalpha(svgPathString[index])) {
                                                          -
                                                          107  result += " ";
                                                          -
                                                          108  result += svgPathString[index];
                                                          -
                                                          109  result += " ";
                                                          -
                                                          110  } else if (svgPathString[index] == '-') {
                                                          -
                                                          111  result += " ";
                                                          -
                                                          112  result += svgPathString[index];
                                                          -
                                                          113  } else {
                                                          -
                                                          114  result += svgPathString[index];
                                                          -
                                                          115  }
                                                          -
                                                          116  }
                                                          -
                                                          117  svgPathString = result;
                                                          -
                                                          118  }
                                                          -
                                                          119 
                                                          -
                                                          120  void formatSvgPathString(std::string &svgPathString) {
                                                          -
                                                          121  std::replace(svgPathString.begin(), svgPathString.end(), '\t', ' ');
                                                          -
                                                          122  std::replace(svgPathString.begin(), svgPathString.end(), '\n', ' ');
                                                          -
                                                          123  insertSpaceBeforeEachLetter(svgPathString);
                                                          -
                                                          124  std::replace(svgPathString.begin(), svgPathString.end(), ',', ' ');
                                                          -
                                                          125  removeRedundantSpaces(svgPathString);
                                                          -
                                                          126  }
                                                          -
                                                          127 } // namespace
                                                          -
                                                          128 
                                                          -
                                                          129 Parser *Parser::getInstance(const std::string &file_name) {
                                                          -
                                                          130  if (instance == nullptr) {
                                                          -
                                                          131  instance = new Parser(file_name);
                                                          -
                                                          132  }
                                                          -
                                                          133  return instance;
                                                          -
                                                          134 }
                                                          -
                                                          135 
                                                          -
                                                          136 Parser::Parser(const std::string &file_name) {
                                                          -
                                                          137  root = parseElements(file_name);
                                                          -
                                                          138 }
                                                          -
                                                          139 
                                                          -
                                                          140 Group *Parser::getRoot() { return dynamic_cast< Group * >(root); }
                                                          -
                                                          141 
                                                          -
                                                          142 Attributes xmlToString(xml_attribute<> *attribute) {
                                                          -
                                                          143  Attributes attributes;
                                                          -
                                                          144  while (attribute) {
                                                          -
                                                          145  attributes.push_back(
                                                          -
                                                          146  std::make_pair(attribute->name(), attribute->value()));
                                                          -
                                                          147  attribute = attribute->next_attribute();
                                                          -
                                                          148  }
                                                          -
                                                          149  return attributes;
                                                          -
                                                          150 }
                                                          -
                                                          151 
                                                          -
                                                          152 SVGElement *Parser::parseElements(std::string file_name) {
                                                          -
                                                          153  xml_document<> doc;
                                                          -
                                                          154  std::ifstream file(file_name);
                                                          -
                                                          155  std::vector< char > buffer((std::istreambuf_iterator< char >(file)),
                                                          -
                                                          156  std::istreambuf_iterator< char >());
                                                          -
                                                          157  buffer.push_back('\0');
                                                          -
                                                          158  doc.parse< 0 >(&buffer[0]);
                                                          -
                                                          159 
                                                          -
                                                          160  xml_node<> *svg = doc.first_node();
                                                          -
                                                          161  xml_node<> *node = svg->first_node();
                                                          -
                                                          162  xml_node<> *prev = NULL;
                                                          -
                                                          163 
                                                          -
                                                          164  SVGElement *root = new Group();
                                                          -
                                                          165  SVGElement *current = root;
                                                          -
                                                          166 
                                                          -
                                                          167  while (node) {
                                                          -
                                                          168  if (std::string(node->name()) == "g") {
                                                          -
                                                          169  Group *group = dynamic_cast< Group * >(current);
                                                          -
                                                          170  for (auto group_attribute : group->getAttributes()) {
                                                          -
                                                          171  bool found = false;
                                                          -
                                                          172  for (auto attribute = node->first_attribute(); attribute;
                                                          -
                                                          173  attribute = attribute->next_attribute()) {
                                                          -
                                                          174  if (std::string(attribute->name()) ==
                                                          -
                                                          175  group_attribute.first) {
                                                          -
                                                          176  if (group_attribute.first == "opacity") {
                                                          -
                                                          177  std::string opacity = std::to_string(
                                                          -
                                                          178  std::stof(attribute->value()) *
                                                          -
                                                          179  std::stof(group_attribute.second));
                                                          -
                                                          180  char *value = doc.allocate_string(opacity.c_str());
                                                          -
                                                          181  attribute->value(value);
                                                          -
                                                          182  }
                                                          -
                                                          183  found = true;
                                                          -
                                                          184  break;
                                                          -
                                                          185  }
                                                          -
                                                          186  }
                                                          -
                                                          187  if (!found && group_attribute.first != "transform") {
                                                          -
                                                          188  char *name =
                                                          -
                                                          189  doc.allocate_string(group_attribute.first.c_str());
                                                          -
                                                          190  char *value =
                                                          -
                                                          191  doc.allocate_string(group_attribute.second.c_str());
                                                          -
                                                          192  xml_attribute<> *new_attribute =
                                                          -
                                                          193  doc.allocate_attribute(name, value);
                                                          -
                                                          194  node->append_attribute(new_attribute);
                                                          -
                                                          195  }
                                                          -
                                                          196  }
                                                          -
                                                          197  Group *new_group = new Group(xmlToString(node->first_attribute()));
                                                          -
                                                          198  new_group->setTransforms(getTransformOrder(node));
                                                          -
                                                          199  current->addElement(new_group);
                                                          -
                                                          200  current = new_group;
                                                          -
                                                          201  prev = node;
                                                          -
                                                          202  node = node->first_node();
                                                          -
                                                          203  } else {
                                                          -
                                                          204  Group *group = dynamic_cast< Group * >(current);
                                                          -
                                                          205  for (auto group_attribute : group->getAttributes()) {
                                                          -
                                                          206  bool found = false;
                                                          -
                                                          207  for (auto attribute = node->first_attribute(); attribute;
                                                          -
                                                          208  attribute = attribute->next_attribute()) {
                                                          -
                                                          209  if (std::string(attribute->name()) ==
                                                          -
                                                          210  group_attribute.first) {
                                                          -
                                                          211  if (group_attribute.first == "opacity") {
                                                          -
                                                          212  std::string opacity = std::to_string(
                                                          -
                                                          213  std::stof(attribute->value()) *
                                                          -
                                                          214  std::stof(group_attribute.second));
                                                          -
                                                          215  char *value = doc.allocate_string(opacity.c_str());
                                                          -
                                                          216  attribute->value(value);
                                                          -
                                                          217  }
                                                          -
                                                          218  found = true;
                                                          -
                                                          219  break;
                                                          -
                                                          220  }
                                                          -
                                                          221  }
                                                          -
                                                          222  if (!found && group_attribute.first != "transform") {
                                                          -
                                                          223  char *name =
                                                          -
                                                          224  doc.allocate_string(group_attribute.first.c_str());
                                                          -
                                                          225  char *value =
                                                          -
                                                          226  doc.allocate_string(group_attribute.second.c_str());
                                                          -
                                                          227  xml_attribute<> *new_attribute =
                                                          -
                                                          228  doc.allocate_attribute(name, value);
                                                          -
                                                          229  node->append_attribute(new_attribute);
                                                          -
                                                          230  }
                                                          -
                                                          231  }
                                                          -
                                                          232  SVGElement *shape = parseShape(node);
                                                          -
                                                          233  if (shape != NULL) current->addElement(shape);
                                                          -
                                                          234  prev = node;
                                                          -
                                                          235  node = node->next_sibling();
                                                          -
                                                          236  }
                                                          -
                                                          237  if (node == NULL && current != root) {
                                                          -
                                                          238  while (prev->parent()->next_sibling() == NULL) {
                                                          -
                                                          239  current = current->getParent();
                                                          -
                                                          240  prev = prev->parent();
                                                          -
                                                          241  if (prev == svg) {
                                                          -
                                                          242  break;
                                                          -
                                                          243  }
                                                          -
                                                          244  }
                                                          -
                                                          245  if (prev == svg) {
                                                          -
                                                          246  break;
                                                          -
                                                          247  }
                                                          -
                                                          248  current = current->getParent();
                                                          -
                                                          249  node = prev->parent()->next_sibling();
                                                          -
                                                          250  }
                                                          -
                                                          251  }
                                                          -
                                                          252  return root;
                                                          -
                                                          253 }
                                                          -
                                                          254 
                                                          -
                                                          255 std::string Parser::getAttribute(xml_node<> *node, std::string name) {
                                                          -
                                                          256  if (name == "text") return removeExtraSpaces(node->value());
                                                          -
                                                          257  std::string result;
                                                          -
                                                          258  if (node->first_attribute(name.c_str()) == NULL) {
                                                          -
                                                          259  if (name == "fill")
                                                          -
                                                          260  result = "black";
                                                          -
                                                          261  else if (name == "stroke" || name == "transform" || name == "rotate" ||
                                                          -
                                                          262  name == "font-style")
                                                          -
                                                          263  result = "none";
                                                          -
                                                          264  else if (name == "text-anchor")
                                                          -
                                                          265  result = "start";
                                                          -
                                                          266  else if (name == "fill-rule")
                                                          -
                                                          267  result = "nonzero";
                                                          -
                                                          268  } else {
                                                          -
                                                          269  result = node->first_attribute(name.c_str())->value();
                                                          -
                                                          270  }
                                                          -
                                                          271  return result;
                                                          -
                                                          272 }
                                                          -
                                                          273 
                                                          -
                                                          274 float Parser::getFloatAttribute(xml_node<> *node, std::string name) {
                                                          -
                                                          275  float result;
                                                          -
                                                          276  if (node->first_attribute(name.c_str()) == NULL) {
                                                          -
                                                          277  if (name == "stroke-width" || name == "stroke-opacity" ||
                                                          -
                                                          278  name == "fill-opacity" || name == "opacity")
                                                          -
                                                          279  result = 1;
                                                          -
                                                          280  else
                                                          -
                                                          281  result = 0;
                                                          -
                                                          282  } else {
                                                          -
                                                          283  result = std::stof(node->first_attribute(name.c_str())->value());
                                                          -
                                                          284  }
                                                          -
                                                          285  return result;
                                                          -
                                                          286 }
                                                          -
                                                          287 
                                                          -
                                                          288 mColor Parser::parseColor(xml_node<> *node, std::string name) {
                                                          -
                                                          289  std::string color = getAttribute(node, name);
                                                          -
                                                          290  color.erase(std::remove(color.begin(), color.end(), ' '), color.end());
                                                          -
                                                          291  for (auto &c : color) c = tolower(c);
                                                          -
                                                          292  if (color == "none")
                                                          -
                                                          293  return mColor::Transparent;
                                                          -
                                                          294  else {
                                                          -
                                                          295  mColor result;
                                                          -
                                                          296  if (color.find("#") != std::string::npos) {
                                                          -
                                                          297  result = getHexColor(color);
                                                          -
                                                          298  } else if (color.find("rgb") != std::string::npos) {
                                                          -
                                                          299  result = getRgbColor(color);
                                                          -
                                                          300  } else {
                                                          -
                                                          301  auto color_code = color_map.find(color);
                                                          -
                                                          302  if (color_code == color_map.end()) {
                                                          -
                                                          303  std::cout << "Color " << color << " not found" << std::endl;
                                                          -
                                                          304  exit(-1);
                                                          -
                                                          305  }
                                                          -
                                                          306  result = color_code->second;
                                                          -
                                                          307  }
                                                          -
                                                          308 
                                                          -
                                                          309  result.a = result.a * getFloatAttribute(node, name + "-opacity") *
                                                          -
                                                          310  getFloatAttribute(node, "opacity");
                                                          -
                                                          311  return result;
                                                          -
                                                          312  }
                                                          -
                                                          313 }
                                                          -
                                                          314 
                                                          -
                                                          315 std::vector< Vector2Df > Parser::parsePoints(xml_node<> *node) {
                                                          -
                                                          316  std::vector< Vector2Df > points;
                                                          -
                                                          317  std::string points_string = getAttribute(node, "points");
                                                          -
                                                          318 
                                                          -
                                                          319  std::stringstream ss(points_string);
                                                          -
                                                          320  float x, y;
                                                          -
                                                          321 
                                                          -
                                                          322  while (ss >> x) {
                                                          -
                                                          323  if (ss.peek() == ',') ss.ignore();
                                                          -
                                                          324  ss >> y;
                                                          -
                                                          325  points.push_back(Vector2Df(x, y));
                                                          -
                                                          326  }
                                                          -
                                                          327 
                                                          -
                                                          328  return points;
                                                          -
                                                          329 }
                                                          -
                                                          330 
                                                          -
                                                          331 std::vector< PathPoint > Parser::parsePathPoints(xml_node<> *node) {
                                                          -
                                                          332  std::vector< PathPoint > points;
                                                          -
                                                          333  std::string path_string = getAttribute(node, "d");
                                                          -
                                                          334 
                                                          -
                                                          335  formatSvgPathString(path_string);
                                                          -
                                                          336  std::stringstream ss(path_string);
                                                          -
                                                          337  std::string element;
                                                          -
                                                          338  PathPoint pPoint{{0, 0}, 'M'};
                                                          -
                                                          339 
                                                          -
                                                          340  while (ss >> element) {
                                                          -
                                                          341  if (std::isalpha(element[0])) {
                                                          -
                                                          342  pPoint.TC = element[0];
                                                          -
                                                          343  if (tolower(pPoint.TC) == 'm' || tolower(pPoint.TC) == 'l' ||
                                                          -
                                                          344  tolower(pPoint.TC) == 'c')
                                                          -
                                                          345  ss >> pPoint.Point.x >> pPoint.Point.y;
                                                          -
                                                          346  else if (tolower(pPoint.TC) == 'h') {
                                                          -
                                                          347  ss >> pPoint.Point.x;
                                                          -
                                                          348  pPoint.Point.y = 0;
                                                          -
                                                          349  } else if (tolower(pPoint.TC) == 'v') {
                                                          -
                                                          350  ss >> pPoint.Point.y;
                                                          -
                                                          351  pPoint.Point.x = 0;
                                                          -
                                                          352  }
                                                          -
                                                          353  } else {
                                                          -
                                                          354  if (tolower(pPoint.TC) == 'm' || tolower(pPoint.TC) == 'l' ||
                                                          -
                                                          355  tolower(pPoint.TC) == 'c') {
                                                          -
                                                          356  if (tolower(pPoint.TC) == 'm') pPoint.TC = 'L';
                                                          -
                                                          357  pPoint.Point.x = std::stof(element);
                                                          -
                                                          358  ss >> pPoint.Point.y;
                                                          -
                                                          359  } else if (tolower(pPoint.TC) == 'h') {
                                                          -
                                                          360  pPoint.Point.x = std::stof(element);
                                                          -
                                                          361  pPoint.Point.y = 0;
                                                          -
                                                          362  } else if (tolower(pPoint.TC) == 'v') {
                                                          -
                                                          363  pPoint.Point.y = std::stof(element);
                                                          -
                                                          364  pPoint.Point.x = 0;
                                                          -
                                                          365  }
                                                          -
                                                          366  }
                                                          -
                                                          367  points.push_back(pPoint);
                                                          -
                                                          368  }
                                                          -
                                                          369 
                                                          -
                                                          370  return points;
                                                          -
                                                          371 }
                                                          -
                                                          372 
                                                          -
                                                          373 std::vector< std::string > Parser::getTransformOrder(xml_node<> *node) {
                                                          -
                                                          374  std::string transform_tag = getAttribute(node, "transform");
                                                          -
                                                          375  std::vector< std::string > order;
                                                          -
                                                          376  std::stringstream ss(transform_tag);
                                                          -
                                                          377  std::string type;
                                                          -
                                                          378  while (ss >> type) {
                                                          -
                                                          379  if (type.find("translate") != std::string::npos ||
                                                          -
                                                          380  type.find("scale") != std::string::npos ||
                                                          -
                                                          381  type.find("rotate") != std::string::npos) {
                                                          -
                                                          382  while (type.find(")") == std::string::npos) {
                                                          -
                                                          383  std::string temp;
                                                          -
                                                          384  ss >> temp;
                                                          -
                                                          385  type += " " + temp;
                                                          -
                                                          386  }
                                                          -
                                                          387  std::string temp = type.substr(0, type.find("(") + 1);
                                                          -
                                                          388  temp.erase(std::remove(temp.begin(), temp.end(), ' '), temp.end());
                                                          -
                                                          389  type.erase(0, type.find("(") + 1);
                                                          -
                                                          390  type = temp + type;
                                                          -
                                                          391  order.push_back(type);
                                                          -
                                                          392  }
                                                          -
                                                          393  }
                                                          -
                                                          394  return order;
                                                          -
                                                          395 }
                                                          -
                                                          396 
                                                          -
                                                          397 SVGElement *Parser::parseShape(xml_node<> *node) {
                                                          -
                                                          398  SVGElement *shape = NULL;
                                                          -
                                                          399  std::string type = node->name();
                                                          -
                                                          400  mColor stroke_color = parseColor(node, "stroke");
                                                          -
                                                          401  mColor fill_color = parseColor(node, "fill");
                                                          -
                                                          402  float stroke_width = getFloatAttribute(node, "stroke-width");
                                                          -
                                                          403  if (type == "line") {
                                                          -
                                                          404  shape = parseLine(node, stroke_color, stroke_width);
                                                          -
                                                          405  } else if (type == "rect") {
                                                          -
                                                          406  shape = parseRect(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          407  } else if (type == "circle") {
                                                          -
                                                          408  shape = parseCircle(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          409  } else if (type == "ellipse") {
                                                          -
                                                          410  shape = parseEllipse(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          411  } else if (type == "polygon") {
                                                          -
                                                          412  shape = parsePolygon(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          413  } else if (type == "polyline") {
                                                          -
                                                          414  shape = parsePolyline(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          415  } else if (type == "path") {
                                                          -
                                                          416  shape = parsePath(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          417  } else if (type == "text") {
                                                          -
                                                          418  return parseText(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          419  }
                                                          -
                                                          420  if (shape != NULL) shape->setTransforms(getTransformOrder(node));
                                                          -
                                                          421  return shape;
                                                          -
                                                          422 }
                                                          -
                                                          423 
                                                          -
                                                          424 Line *Parser::parseLine(xml_node<> *node, const mColor &stroke_color,
                                                          -
                                                          425  float stroke_width) {
                                                          -
                                                          426  Line *shape = new Line(
                                                          -
                                                          427  Vector2Df(getFloatAttribute(node, "x1"), getFloatAttribute(node, "y1")),
                                                          -
                                                          428  Vector2Df(getFloatAttribute(node, "x2"), getFloatAttribute(node, "y2")),
                                                          -
                                                          429  stroke_color, stroke_width);
                                                          -
                                                          430  return shape;
                                                          -
                                                          431 }
                                                          -
                                                          432 
                                                          -
                                                          433 Rect *Parser::parseRect(xml_node<> *node, const mColor &fill_color,
                                                          -
                                                          434  const mColor &stroke_color, float stroke_width) {
                                                          -
                                                          435  float x = getFloatAttribute(node, "x");
                                                          -
                                                          436  float y = getFloatAttribute(node, "y");
                                                          -
                                                          437  float rx = getFloatAttribute(node, "rx");
                                                          -
                                                          438  float ry = getFloatAttribute(node, "ry");
                                                          -
                                                          439  Rect *shape =
                                                          -
                                                          440  new Rect(getFloatAttribute(node, "width"),
                                                          -
                                                          441  getFloatAttribute(node, "height"), Vector2Df(x, y),
                                                          -
                                                          442  Vector2Df(rx, ry), fill_color, stroke_color, stroke_width);
                                                          -
                                                          443  return shape;
                                                          -
                                                          444 }
                                                          -
                                                          445 
                                                          -
                                                          446 Circle *Parser::parseCircle(xml_node<> *node, const mColor &fill_color,
                                                          -
                                                          447  const mColor &stroke_color, float stroke_width) {
                                                          -
                                                          448  float cx = getFloatAttribute(node, "cx");
                                                          -
                                                          449  float cy = getFloatAttribute(node, "cy");
                                                          -
                                                          450  float radius = getFloatAttribute(node, "r");
                                                          -
                                                          451  Circle *shape = new Circle(radius, Vector2Df(cx, cy), fill_color,
                                                          -
                                                          452  stroke_color, stroke_width);
                                                          -
                                                          453  return shape;
                                                          -
                                                          454 }
                                                          -
                                                          455 
                                                          -
                                                          456 Ell *Parser::parseEllipse(xml_node<> *node, const mColor &fill_color,
                                                          -
                                                          457  const mColor &stroke_color, float stroke_width) {
                                                          -
                                                          458  float radius_x = getFloatAttribute(node, "rx");
                                                          -
                                                          459  float radius_y = getFloatAttribute(node, "ry");
                                                          -
                                                          460  float cx = getFloatAttribute(node, "cx");
                                                          -
                                                          461  float cy = getFloatAttribute(node, "cy");
                                                          -
                                                          462  Ell *shape = new Ell(Vector2Df(radius_x, radius_y), Vector2Df(cx, cy),
                                                          -
                                                          463  fill_color, stroke_color, stroke_width);
                                                          -
                                                          464  return shape;
                                                          -
                                                          465 }
                                                          -
                                                          466 
                                                          -
                                                          467 Plygon *Parser::parsePolygon(xml_node<> *node, const mColor &fill_color,
                                                          -
                                                          468  const mColor &stroke_color, float stroke_width) {
                                                          -
                                                          469  Plygon *shape = new Plygon(fill_color, stroke_color, stroke_width);
                                                          -
                                                          470  std::vector< Vector2Df > points = parsePoints(node);
                                                          -
                                                          471  for (auto point : points) {
                                                          -
                                                          472  shape->addPoint(point);
                                                          -
                                                          473  }
                                                          -
                                                          474  std::string fill_rule = getAttribute(node, "fill-rule");
                                                          -
                                                          475  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
                                                          -
                                                          476  fill_rule.end());
                                                          -
                                                          477  shape->setFillRule(fill_rule);
                                                          -
                                                          478  return shape;
                                                          -
                                                          479 }
                                                          -
                                                          480 
                                                          -
                                                          481 Plyline *Parser::parsePolyline(xml_node<> *node, const mColor &fill_color,
                                                          -
                                                          482  const mColor &stroke_color, float stroke_width) {
                                                          -
                                                          483  Plyline *shape = new Plyline(fill_color, stroke_color, stroke_width);
                                                          -
                                                          484  std::vector< Vector2Df > points = parsePoints(node);
                                                          -
                                                          485  for (auto point : points) {
                                                          -
                                                          486  shape->addPoint(point);
                                                          -
                                                          487  }
                                                          -
                                                          488  std::string fill_rule = getAttribute(node, "fill-rule");
                                                          -
                                                          489  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
                                                          -
                                                          490  fill_rule.end());
                                                          -
                                                          491  shape->setFillRule(fill_rule);
                                                          -
                                                          492  return shape;
                                                          -
                                                          493 }
                                                          -
                                                          494 
                                                          -
                                                          495 Text *Parser::parseText(xml_node<> *node, const mColor &fill_color,
                                                          -
                                                          496  const mColor &stroke_color, float stroke_width) {
                                                          -
                                                          497  float x = getFloatAttribute(node, "x");
                                                          -
                                                          498  float y = getFloatAttribute(node, "y");
                                                          -
                                                          499  float font_size = getFloatAttribute(node, "font-size");
                                                          -
                                                          500  std::string text = getAttribute(node, "text");
                                                          -
                                                          501 
                                                          -
                                                          502  Text *shape = new Text(Vector2Df(x - 7, y - font_size + 5), text, font_size,
                                                          -
                                                          503  fill_color, stroke_color, stroke_width);
                                                          -
                                                          504 
                                                          -
                                                          505  std::string anchor = getAttribute(node, "text-anchor");
                                                          -
                                                          506  anchor.erase(std::remove(anchor.begin(), anchor.end(), ' '), anchor.end());
                                                          -
                                                          507  shape->setAnchor(anchor);
                                                          -
                                                          508 
                                                          -
                                                          509  std::string style = getAttribute(node, "font-style");
                                                          -
                                                          510  style.erase(std::remove(style.begin(), style.end(), ' '), style.end());
                                                          -
                                                          511  shape->setFontStyle(style);
                                                          -
                                                          512 
                                                          -
                                                          513  float dx = getFloatAttribute(node, "dx");
                                                          -
                                                          514  float dy = getFloatAttribute(node, "dy");
                                                          -
                                                          515  std::string transform =
                                                          -
                                                          516  "translate(" + std::to_string(dx) + " " + std::to_string(dy) + ")";
                                                          -
                                                          517  std::vector< std::string > transform_order = getTransformOrder(node);
                                                          -
                                                          518  transform_order.push_back(transform);
                                                          -
                                                          519  shape->setTransforms(transform_order);
                                                          -
                                                          520  return shape;
                                                          -
                                                          521 }
                                                          -
                                                          522 
                                                          -
                                                          523 Path *Parser::parsePath(xml_node<> *node, const mColor &fill_color,
                                                          -
                                                          524  const mColor &stroke_color, float stroke_width) {
                                                          -
                                                          525  Path *shape = new Path(fill_color, stroke_color, stroke_width);
                                                          -
                                                          526  std::vector< PathPoint > points = parsePathPoints(node);
                                                          -
                                                          527  for (auto point : points) {
                                                          -
                                                          528  shape->addPoint(point);
                                                          -
                                                          529  }
                                                          -
                                                          530  std::string fill_rule = getAttribute(node, "fill-rule");
                                                          -
                                                          531  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
                                                          -
                                                          532  fill_rule.end());
                                                          -
                                                          533  shape->setFillRule(fill_rule);
                                                          -
                                                          534  return shape;
                                                          -
                                                          535 }
                                                          -
                                                          536 
                                                          -
                                                          537 Parser::~Parser() { delete root; }
                                                          -
                                                          538 
                                                          - -
                                                          Represents a circle in 2D space.
                                                          Definition: Circle.hpp:13
                                                          -
                                                          Represents an ellipse in 2D space.
                                                          Definition: Ellipse.hpp:12
                                                          -
                                                          A composite class that contains a vector of shape pointers (polymorphic).
                                                          Definition: Group.hpp:19
                                                          -
                                                          Attributes getAttributes() const
                                                          Gets the attributes of the shape.
                                                          Definition: Group.cpp:15
                                                          -
                                                          Represents a line in 2D space.
                                                          Definition: Line.hpp:12
                                                          -
                                                          To manipulate and parse an SVG file.
                                                          Definition: Parser.hpp:34
                                                          -
                                                          static Parser * getInstance(const std::string &file_name)
                                                          Gets the singleton instance of the Parser class.
                                                          Definition: Parser.cpp:129
                                                          -
                                                          Path * parsePath(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the path element.
                                                          Definition: Parser.cpp:523
                                                          -
                                                          SVGElement * root
                                                          The root of the SVG file.
                                                          Definition: Parser.hpp:230
                                                          -
                                                          float getFloatAttribute(xml_node<> *node, std::string name)
                                                          Gets the floating point attributes of a node.
                                                          Definition: Parser.cpp:274
                                                          -
                                                          void printShapesData()
                                                          Prints the data of the shapes.
                                                          Definition: Parser.cpp:539
                                                          -
                                                          ~Parser()
                                                          Destructor.
                                                          Definition: Parser.cpp:537
                                                          -
                                                          Parser(const Parser &)=delete
                                                          Deleted copy constructor to enforce the singleton pattern.
                                                          -
                                                          Group * getRoot()
                                                          Gets the root of the SVG file.
                                                          Definition: Parser.cpp:140
                                                          -
                                                          SVGElement * parseShape(xml_node<> *node)
                                                          Parses the group of elements.
                                                          Definition: Parser.cpp:397
                                                          -
                                                          class Plyline * parsePolyline(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the polyline element.
                                                          Definition: Parser.cpp:481
                                                          -
                                                          std::vector< PathPoint > parsePathPoints(xml_node<> *node)
                                                          Gets the points of the path element.
                                                          Definition: Parser.cpp:331
                                                          -
                                                          Text * parseText(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the text element.
                                                          Definition: Parser.cpp:495
                                                          -
                                                          class Plygon * parsePolygon(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the polygon element.
                                                          Definition: Parser.cpp:467
                                                          -
                                                          std::string getAttribute(xml_node<> *node, std::string name)
                                                          Gets the attributes of a node.
                                                          Definition: Parser.cpp:255
                                                          -
                                                          SVGElement * parseElements(std::string file_name)
                                                          Parses the SVG file and creates a tree of SVGElements.
                                                          Definition: Parser.cpp:152
                                                          -
                                                          Circle * parseCircle(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the circle element.
                                                          Definition: Parser.cpp:446
                                                          -
                                                          std::vector< std::string > getTransformOrder(xml_node<> *node)
                                                          Gets the transform order of the element.
                                                          Definition: Parser.cpp:373
                                                          -
                                                          Rect * parseRect(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the rect element.
                                                          Definition: Parser.cpp:433
                                                          -
                                                          static Parser * instance
                                                          The instance of the Parser.
                                                          Definition: Parser.hpp:229
                                                          -
                                                          Line * parseLine(xml_node<> *node, const mColor &stroke_color, float stroke_width)
                                                          Parses the line element.
                                                          Definition: Parser.cpp:424
                                                          -
                                                          mColor parseColor(xml_node<> *node, std::string color)
                                                          Gets the color attributes of a node.
                                                          Definition: Parser.cpp:288
                                                          -
                                                          std::vector< Vector2Df > parsePoints(xml_node<> *node)
                                                          Gets the points of the element.
                                                          Definition: Parser.cpp:315
                                                          -
                                                          class Ell * parseEllipse(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the ellipse element.
                                                          Definition: Parser.cpp:456
                                                          -
                                                          Represents a path element in 2D space.
                                                          Definition: Path.hpp:24
                                                          -
                                                          void setFillRule(std::string fill_rule)
                                                          Sets the fill rule of the path.
                                                          Definition: Path.cpp:15
                                                          -
                                                          void addPoint(PathPoint point)
                                                          Adds a point to the path.
                                                          Definition: Path.cpp:11
                                                          -
                                                          Represents a polygon in 2D space.
                                                          Definition: Polygon.hpp:12
                                                          -
                                                          void setFillRule(std::string fill_rule)
                                                          Sets the fill rule of the polygon.
                                                          Definition: Polygon.cpp:8
                                                          -
                                                          Represents a polyline in 2D space.
                                                          Definition: Polyline.hpp:12
                                                          -
                                                          void setFillRule(std::string fill_rule)
                                                          Sets the fill rule of the polyline.
                                                          Definition: Polyline.cpp:8
                                                          -
                                                          virtual void addPoint(const Vector2Df &point)
                                                          Adds a vertex to the shape.
                                                          Definition: PolyShape.cpp:10
                                                          -
                                                          Represents a rectangle in 2D space.
                                                          Definition: Rect.hpp:13
                                                          -
                                                          Represents an element in an SVG file.
                                                          Definition: SVGElement.hpp:17
                                                          -
                                                          void setTransforms(const std::vector< std::string > &transforms)
                                                          Sets the transformations of the shape.
                                                          Definition: SVGElement.cpp:47
                                                          -
                                                          SVGElement * getParent() const
                                                          Parent pointer getter.
                                                          Definition: SVGElement.cpp:57
                                                          -
                                                          virtual void printData() const
                                                          Prints the data of the shape.
                                                          Definition: SVGElement.cpp:33
                                                          -
                                                          SVGElement * parent
                                                          Pointer to the group that contains the shape.
                                                          Definition: SVGElement.hpp:166
                                                          -
                                                          virtual void addElement(SVGElement *element)
                                                          Adds a shape to the composite group.
                                                          Definition: SVGElement.cpp:59
                                                          -
                                                          Represents text in 2D space.
                                                          Definition: Text.hpp:12
                                                          -
                                                          void setFontStyle(std::string style)
                                                          Sets the style of the text.
                                                          Definition: Text.cpp:26
                                                          -
                                                          void setAnchor(std::string anchor)
                                                          Sets the anchor of the text.
                                                          Definition: Text.cpp:22
                                                          - -
                                                          Utility class for manipulating RGBA mColors.
                                                          Definition: Color.hpp:11
                                                          -
                                                          int a
                                                          Alpha (opacity) component.
                                                          Definition: Color.hpp:63
                                                          -
                                                          static const mColor Transparent
                                                          Transparent (black) predefined color.
                                                          Definition: Color.hpp:58
                                                          -
                                                          A struct that contains a point and a type of point.
                                                          Definition: Path.hpp:10
                                                          -
                                                          -
                                                          - - - \ No newline at end of file diff --git a/docs/html/Parser_8hpp_source.html b/docs/html/Parser_8hpp_source.html deleted file mode 100644 index 0543c357..00000000 --- a/docs/html/Parser_8hpp_source.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - - - - - - - - - - - -svg-reader: src/Parser.hpp Source File - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          -
                                                          - - - - - - -
                                                          -
                                                          svg-reader -  0.2 -
                                                          -
                                                          Parse and render SVG files, handle user interactions.
                                                          -
                                                          -
                                                          - - - - - - - -
                                                          -
                                                          - -
                                                          -
                                                          -
                                                          - -
                                                          - -
                                                          -
                                                          - - -
                                                          - -
                                                          - -
                                                          -
                                                          -
                                                          Parser.hpp
                                                          -
                                                          -
                                                          -
                                                          1 #ifndef PARSER_HPP_
                                                          -
                                                          2 #define PARSER_HPP_
                                                          -
                                                          3 
                                                          -
                                                          4 #include <algorithm>
                                                          -
                                                          5 #include <cstring>
                                                          -
                                                          6 #include <fstream>
                                                          -
                                                          7 #include <iostream>
                                                          -
                                                          8 #include <sstream>
                                                          -
                                                          9 #include <string>
                                                          -
                                                          10 #include <vector>
                                                          -
                                                          11 
                                                          -
                                                          12 #include "../external/rapidxml/rapidxml.hpp"
                                                          -
                                                          13 #include "graphics/Circle.hpp"
                                                          -
                                                          14 #include "graphics/Color.hpp"
                                                          -
                                                          15 #include "graphics/Ellipse.hpp"
                                                          -
                                                          16 #include "graphics/Group.hpp"
                                                          -
                                                          17 #include "graphics/Line.hpp"
                                                          -
                                                          18 #include "graphics/Path.hpp"
                                                          -
                                                          19 #include "graphics/Polygon.hpp"
                                                          -
                                                          20 #include "graphics/Polyline.hpp"
                                                          -
                                                          21 #include "graphics/Rect.hpp"
                                                          -
                                                          22 #include "graphics/Text.hpp"
                                                          -
                                                          23 
                                                          -
                                                          24 using namespace rapidxml;
                                                          -
                                                          25 
                                                          -
                                                          26 typedef std::vector< std::pair< std::string, std::string > > Attributes;
                                                          -
                                                          27 
                                                          -
                                                          34 class Parser {
                                                          -
                                                          35 public:
                                                          -
                                                          36  static Parser* getInstance(
                                                          -
                                                          37  const std::string&
                                                          -
                                                          38  file_name);
                                                          -
                                                          39 
                                                          -
                                                          40  Parser(const Parser&) =
                                                          -
                                                          41  delete;
                                                          -
                                                          42 
                                                          -
                                                          43  ~Parser();
                                                          -
                                                          44 
                                                          -
                                                          45  Group* getRoot();
                                                          -
                                                          46 
                                                          -
                                                          52  void printShapesData();
                                                          -
                                                          53 
                                                          -
                                                          54 private:
                                                          -
                                                          60  Parser(const std::string& file_name);
                                                          -
                                                          61 
                                                          -
                                                          69  SVGElement* parseElements(std::string file_name);
                                                          -
                                                          70 
                                                          -
                                                          79  std::string getAttribute(xml_node<>* node, std::string name);
                                                          -
                                                          80 
                                                          -
                                                          89  float getFloatAttribute(xml_node<>* node, std::string name);
                                                          -
                                                          90 
                                                          -
                                                          99  mColor parseColor(xml_node<>* node, std::string color);
                                                          -
                                                          100 
                                                          -
                                                          107  std::vector< Vector2Df > parsePoints(xml_node<>* node);
                                                          -
                                                          108 
                                                          -
                                                          115  std::vector< PathPoint > parsePathPoints(xml_node<>* node);
                                                          -
                                                          116 
                                                          -
                                                          123  std::vector< std::string > getTransformOrder(xml_node<>* node);
                                                          -
                                                          124 
                                                          -
                                                          133  Line* parseLine(xml_node<>* node, const mColor& stroke_color,
                                                          -
                                                          134  float stroke_width);
                                                          -
                                                          135 
                                                          -
                                                          145  Rect* parseRect(xml_node<>* node, const mColor& fill_color,
                                                          -
                                                          146  const mColor& stroke_color, float stroke_width);
                                                          -
                                                          147 
                                                          -
                                                          157  class Plyline* parsePolyline(xml_node<>* node, const mColor& fill_color,
                                                          -
                                                          158  const mColor& stroke_color,
                                                          -
                                                          159  float stroke_width);
                                                          -
                                                          160 
                                                          -
                                                          170  class Plygon* parsePolygon(xml_node<>* node, const mColor& fill_color,
                                                          -
                                                          171  const mColor& stroke_color, float stroke_width);
                                                          -
                                                          172 
                                                          -
                                                          182  Circle* parseCircle(xml_node<>* node, const mColor& fill_color,
                                                          -
                                                          183  const mColor& stroke_color, float stroke_width);
                                                          -
                                                          184 
                                                          -
                                                          194  class Ell* parseEllipse(xml_node<>* node, const mColor& fill_color,
                                                          -
                                                          195  const mColor& stroke_color, float stroke_width);
                                                          -
                                                          196 
                                                          -
                                                          206  Path* parsePath(xml_node<>* node, const mColor& fill_color,
                                                          -
                                                          207  const mColor& stroke_color, float stroke_width);
                                                          -
                                                          208 
                                                          -
                                                          217  Text* parseText(xml_node<>* node, const mColor& fill_color,
                                                          -
                                                          218  const mColor& stroke_color, float stroke_width);
                                                          -
                                                          219 
                                                          -
                                                          226  SVGElement* parseShape(xml_node<>* node);
                                                          -
                                                          227 
                                                          -
                                                          228 private:
                                                          -
                                                          229  static Parser* instance;
                                                          - -
                                                          231 };
                                                          -
                                                          232 
                                                          -
                                                          233 #endif // PARSER_HPP_
                                                          -
                                                          Represents a circle in 2D space.
                                                          Definition: Circle.hpp:13
                                                          -
                                                          Represents an ellipse in 2D space.
                                                          Definition: Ellipse.hpp:12
                                                          -
                                                          A composite class that contains a vector of shape pointers (polymorphic).
                                                          Definition: Group.hpp:19
                                                          -
                                                          Represents a line in 2D space.
                                                          Definition: Line.hpp:12
                                                          -
                                                          To manipulate and parse an SVG file.
                                                          Definition: Parser.hpp:34
                                                          -
                                                          SVGElement * root
                                                          The root of the SVG file.
                                                          Definition: Parser.hpp:230
                                                          -
                                                          Parser(const Parser &)=delete
                                                          Deleted copy constructor to enforce the singleton pattern.
                                                          -
                                                          static Parser * instance
                                                          The instance of the Parser.
                                                          Definition: Parser.hpp:229
                                                          -
                                                          Represents a path element in 2D space.
                                                          Definition: Path.hpp:24
                                                          -
                                                          Represents a polygon in 2D space.
                                                          Definition: Polygon.hpp:12
                                                          -
                                                          Represents a polyline in 2D space.
                                                          Definition: Polyline.hpp:12
                                                          -
                                                          Represents a rectangle in 2D space.
                                                          Definition: Rect.hpp:13
                                                          -
                                                          Represents an element in an SVG file.
                                                          Definition: SVGElement.hpp:17
                                                          -
                                                          float stroke_width
                                                          Thickness of the shape's outline.
                                                          Definition: SVGElement.hpp:171
                                                          -
                                                          Represents text in 2D space.
                                                          Definition: Text.hpp:12
                                                          -
                                                          Utility class for manipulating RGBA mColors.
                                                          Definition: Color.hpp:11
                                                          -
                                                          -
                                                          - - - \ No newline at end of file diff --git a/docs/html/Renderer_8cpp_source.html b/docs/html/Renderer_8cpp_source.html deleted file mode 100644 index a15fcd05..00000000 --- a/docs/html/Renderer_8cpp_source.html +++ /dev/null @@ -1,561 +0,0 @@ - - - - - - - - - - - - - - - - - - -svg-reader: src/Renderer.cpp Source File - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          -
                                                          - - - - - - -
                                                          -
                                                          svg-reader -  0.2 -
                                                          -
                                                          Parse and render SVG files, handle user interactions.
                                                          -
                                                          -
                                                          - - - - - - - -
                                                          -
                                                          - -
                                                          -
                                                          -
                                                          - -
                                                          - -
                                                          -
                                                          - - -
                                                          - -
                                                          - -
                                                          -
                                                          -
                                                          Renderer.cpp
                                                          -
                                                          -
                                                          -
                                                          1 #include "Renderer.hpp"
                                                          -
                                                          2 
                                                          - -
                                                          4 
                                                          - -
                                                          6 
                                                          - -
                                                          8  if (instance == nullptr) {
                                                          -
                                                          9  instance = new Renderer();
                                                          -
                                                          10  }
                                                          -
                                                          11  return instance;
                                                          -
                                                          12 }
                                                          -
                                                          13 
                                                          -
                                                          14 std::pair< float, float > getTranslate(std::string transform_value) {
                                                          -
                                                          15  float trans_x = 0, trans_y = 0;
                                                          -
                                                          16  if (transform_value.find(",") != std::string::npos) {
                                                          -
                                                          17  sscanf(transform_value.c_str(), "translate(%f, %f)", &trans_x,
                                                          -
                                                          18  &trans_y);
                                                          -
                                                          19  } else {
                                                          -
                                                          20  sscanf(transform_value.c_str(), "translate(%f %f)", &trans_x, &trans_y);
                                                          -
                                                          21  }
                                                          -
                                                          22  return std::pair< float, float >(trans_x, trans_y);
                                                          -
                                                          23 }
                                                          -
                                                          24 
                                                          -
                                                          25 float getRotate(std::string transform_value) {
                                                          -
                                                          26  float degree = 0;
                                                          -
                                                          27  sscanf(transform_value.c_str(), "rotate(%f)", &degree);
                                                          -
                                                          28  return degree;
                                                          -
                                                          29 }
                                                          -
                                                          30 
                                                          -
                                                          31 float getScale(std::string transform_value) {
                                                          -
                                                          32  float scale = 0;
                                                          -
                                                          33  sscanf(transform_value.c_str(), "scale(%f)", &scale);
                                                          -
                                                          34  return scale;
                                                          -
                                                          35 }
                                                          -
                                                          36 
                                                          -
                                                          37 std::pair< float, float > getScaleXY(std::string transform_value) {
                                                          -
                                                          38  float scale_x = 0, scale_y = 0;
                                                          -
                                                          39  if (transform_value.find(",") != std::string::npos)
                                                          -
                                                          40  sscanf(transform_value.c_str(), "scale(%f, %f)", &scale_x, &scale_y);
                                                          -
                                                          41  else
                                                          -
                                                          42  sscanf(transform_value.c_str(), "scale(%f %f)", &scale_x, &scale_y);
                                                          -
                                                          43  return std::pair< float, float >(scale_x, scale_y);
                                                          -
                                                          44 }
                                                          -
                                                          45 
                                                          -
                                                          46 void Renderer::applyTransform(std::vector< std::string > transform_order,
                                                          -
                                                          47  Gdiplus::Graphics& graphics) const {
                                                          -
                                                          48  for (auto type : transform_order) {
                                                          -
                                                          49  if (type.find("translate") != std::string::npos) {
                                                          -
                                                          50  float trans_x = getTranslate(type).first,
                                                          -
                                                          51  trans_y = getTranslate(type).second;
                                                          -
                                                          52  graphics.TranslateTransform(trans_x, trans_y);
                                                          -
                                                          53  } else if (type.find("rotate") != std::string::npos) {
                                                          -
                                                          54  float degree = getRotate(type);
                                                          -
                                                          55  graphics.RotateTransform(degree);
                                                          -
                                                          56  } else if (type.find("scale") != std::string::npos) {
                                                          -
                                                          57  if (type.find(",") != std::string::npos) {
                                                          -
                                                          58  float scale_x = getScaleXY(type).first,
                                                          -
                                                          59  scale_y = getScaleXY(type).second;
                                                          -
                                                          60  graphics.ScaleTransform(scale_x, scale_y);
                                                          -
                                                          61  } else {
                                                          -
                                                          62  float scale = getScale(type);
                                                          -
                                                          63  graphics.ScaleTransform(scale, scale);
                                                          -
                                                          64  }
                                                          -
                                                          65  }
                                                          -
                                                          66  }
                                                          -
                                                          67 }
                                                          -
                                                          68 
                                                          -
                                                          69 void Renderer::draw(Gdiplus::Graphics& graphics, Group* group) const {
                                                          -
                                                          70  for (auto shape : group->getElements()) {
                                                          -
                                                          71  Gdiplus::Matrix original;
                                                          -
                                                          72  graphics.GetTransform(&original);
                                                          -
                                                          73  applyTransform(shape->getTransforms(), graphics);
                                                          -
                                                          74  if (shape->getClass() == "Group") {
                                                          -
                                                          75  Group* group = dynamic_cast< Group* >(shape);
                                                          -
                                                          76  draw(graphics, group);
                                                          -
                                                          77  } else if (shape->getClass() == "Polyline") {
                                                          -
                                                          78  Plyline* polyline = dynamic_cast< Plyline* >(shape);
                                                          -
                                                          79  drawPolyline(graphics, polyline);
                                                          -
                                                          80  } else if (shape->getClass() == "Text") {
                                                          -
                                                          81  Text* text = dynamic_cast< Text* >(shape);
                                                          -
                                                          82  drawText(graphics, text);
                                                          -
                                                          83  } else if (shape->getClass() == "Rect") {
                                                          -
                                                          84  Rect* rectangle = dynamic_cast< Rect* >(shape);
                                                          -
                                                          85  drawRectangle(graphics, rectangle);
                                                          -
                                                          86  } else if (shape->getClass() == "Circle") {
                                                          -
                                                          87  Circle* circle = dynamic_cast< Circle* >(shape);
                                                          -
                                                          88  drawCircle(graphics, circle);
                                                          -
                                                          89  } else if (shape->getClass() == "Ellipse") {
                                                          -
                                                          90  Ell* ellipse = dynamic_cast< Ell* >(shape);
                                                          -
                                                          91  drawEllipse(graphics, ellipse);
                                                          -
                                                          92  } else if (shape->getClass() == "Line") {
                                                          -
                                                          93  Line* line = dynamic_cast< Line* >(shape);
                                                          -
                                                          94  drawLine(graphics, line);
                                                          -
                                                          95  } else if (shape->getClass() == "Polygon") {
                                                          -
                                                          96  Plygon* polygon = dynamic_cast< Plygon* >(shape);
                                                          -
                                                          97  drawPolygon(graphics, polygon);
                                                          -
                                                          98  } else if (shape->getClass() == "Path") {
                                                          -
                                                          99  Path* path = dynamic_cast< Path* >(shape);
                                                          -
                                                          100  drawPath(graphics, path);
                                                          -
                                                          101  }
                                                          -
                                                          102  graphics.SetTransform(&original);
                                                          -
                                                          103  }
                                                          -
                                                          104 }
                                                          -
                                                          105 
                                                          -
                                                          106 void Renderer::drawLine(Gdiplus::Graphics& graphics, Line* line) const {
                                                          -
                                                          107  mColor color = line->getOutlineColor();
                                                          -
                                                          108  Gdiplus::Pen linePen(Gdiplus::Color(color.a, color.r, color.g, color.b),
                                                          -
                                                          109  line->getOutlineThickness());
                                                          -
                                                          110  Gdiplus::PointF startPoint(line->getPosition().x, line->getPosition().y);
                                                          -
                                                          111  Gdiplus::PointF endPoint(line->getDirection().x, line->getDirection().y);
                                                          -
                                                          112  graphics.DrawLine(&linePen, startPoint, endPoint);
                                                          -
                                                          113 }
                                                          -
                                                          114 
                                                          -
                                                          115 void Renderer::drawRectangle(Gdiplus::Graphics& graphics,
                                                          -
                                                          116  Rect* rectangle) const {
                                                          -
                                                          117  float x = rectangle->getPosition().x;
                                                          -
                                                          118  float y = rectangle->getPosition().y;
                                                          -
                                                          119  float width = rectangle->getWidth();
                                                          -
                                                          120  float height = rectangle->getHeight();
                                                          -
                                                          121  mColor fill_color = rectangle->getFillColor();
                                                          -
                                                          122  mColor outline_color = rectangle->getOutlineColor();
                                                          -
                                                          123  Gdiplus::Pen RectOutline(Gdiplus::Color(outline_color.a, outline_color.r,
                                                          -
                                                          124  outline_color.g, outline_color.b),
                                                          -
                                                          125  rectangle->getOutlineThickness());
                                                          -
                                                          126  Gdiplus::SolidBrush RectFill(
                                                          -
                                                          127  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          128  if (rectangle->getRadius().x != 0 || rectangle->getRadius().y != 0) {
                                                          -
                                                          129  float dx = rectangle->getRadius().x * 2;
                                                          -
                                                          130  float dy = rectangle->getRadius().y * 2;
                                                          -
                                                          131  Gdiplus::GraphicsPath path;
                                                          -
                                                          132  path.AddArc(x, y, dx, dy, 180, 90);
                                                          -
                                                          133  path.AddArc(x + width - dx, y, dx, dy, 270, 90);
                                                          -
                                                          134  path.AddArc(x + width - dx, y + height - dy, dx, dy, 0, 90);
                                                          -
                                                          135  path.AddArc(x, y + height - dy, dx, dy, 90, 90);
                                                          -
                                                          136  path.CloseFigure();
                                                          -
                                                          137  graphics.FillPath(&RectFill, &path);
                                                          -
                                                          138  graphics.DrawPath(&RectOutline, &path);
                                                          -
                                                          139  } else {
                                                          -
                                                          140  graphics.FillRectangle(&RectFill, x, y, width, height);
                                                          -
                                                          141  graphics.DrawRectangle(&RectOutline, x, y, width, height);
                                                          -
                                                          142  }
                                                          -
                                                          143 }
                                                          -
                                                          144 
                                                          -
                                                          145 void Renderer::drawCircle(Gdiplus::Graphics& graphics, Circle* circle) const {
                                                          -
                                                          146  mColor fill_color = circle->getFillColor();
                                                          -
                                                          147  mColor outline_color = circle->getOutlineColor();
                                                          -
                                                          148  Gdiplus::Pen circleOutline(Gdiplus::Color(outline_color.a, outline_color.r,
                                                          -
                                                          149  outline_color.g, outline_color.b),
                                                          -
                                                          150  circle->getOutlineThickness());
                                                          -
                                                          151  Gdiplus::SolidBrush circleFill(
                                                          -
                                                          152  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          153  graphics.FillEllipse(&circleFill,
                                                          -
                                                          154  circle->getPosition().x - circle->getRadius().x,
                                                          -
                                                          155  circle->getPosition().y - circle->getRadius().y,
                                                          -
                                                          156  circle->getRadius().x * 2, circle->getRadius().y * 2);
                                                          -
                                                          157  graphics.DrawEllipse(&circleOutline,
                                                          -
                                                          158  circle->getPosition().x - circle->getRadius().x,
                                                          -
                                                          159  circle->getPosition().y - circle->getRadius().y,
                                                          -
                                                          160  circle->getRadius().x * 2, circle->getRadius().x * 2);
                                                          -
                                                          161 }
                                                          -
                                                          162 
                                                          -
                                                          163 void Renderer::drawEllipse(Gdiplus::Graphics& graphics, Ell* ellipse) const {
                                                          -
                                                          164  mColor fill_color = ellipse->getFillColor();
                                                          -
                                                          165  mColor outline_color = ellipse->getOutlineColor();
                                                          -
                                                          166  Gdiplus::Pen ellipseOutline(
                                                          -
                                                          167  Gdiplus::Color(outline_color.a, outline_color.r, outline_color.g,
                                                          -
                                                          168  outline_color.b),
                                                          -
                                                          169  ellipse->getOutlineThickness());
                                                          -
                                                          170  Gdiplus::SolidBrush ellipseFill(
                                                          -
                                                          171  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          172  graphics.FillEllipse(
                                                          -
                                                          173  &ellipseFill, ellipse->getPosition().x - ellipse->getRadius().x,
                                                          -
                                                          174  ellipse->getPosition().y - ellipse->getRadius().y,
                                                          -
                                                          175  ellipse->getRadius().x * 2, ellipse->getRadius().y * 2);
                                                          -
                                                          176  graphics.DrawEllipse(
                                                          -
                                                          177  &ellipseOutline, ellipse->getPosition().x - ellipse->getRadius().x,
                                                          -
                                                          178  ellipse->getPosition().y - ellipse->getRadius().y,
                                                          -
                                                          179  ellipse->getRadius().x * 2, ellipse->getRadius().y * 2);
                                                          -
                                                          180 }
                                                          -
                                                          181 
                                                          -
                                                          182 void Renderer::drawPolygon(Gdiplus::Graphics& graphics, Plygon* polygon) const {
                                                          -
                                                          183  mColor fill_color = polygon->getFillColor();
                                                          -
                                                          184  mColor outline_color = polygon->getOutlineColor();
                                                          -
                                                          185  Gdiplus::Pen polygonOutline(
                                                          -
                                                          186  Gdiplus::Color(outline_color.a, outline_color.r, outline_color.g,
                                                          -
                                                          187  outline_color.b),
                                                          -
                                                          188  polygon->getOutlineThickness());
                                                          -
                                                          189  Gdiplus::SolidBrush polygonFill(
                                                          -
                                                          190  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          191 
                                                          -
                                                          192  Gdiplus::PointF* points = new Gdiplus::PointF[polygon->getPoints().size()];
                                                          -
                                                          193  int idx = 0;
                                                          -
                                                          194  const std::vector< Vector2Df >& vertices = polygon->getPoints();
                                                          -
                                                          195  for (const Vector2Df vertex : vertices) {
                                                          -
                                                          196  points[idx++] = Gdiplus::PointF(vertex.x, vertex.y);
                                                          -
                                                          197  }
                                                          -
                                                          198 
                                                          -
                                                          199  Gdiplus::FillMode fillMode;
                                                          -
                                                          200  if (polygon->getFillRule() == "evenodd") {
                                                          -
                                                          201  fillMode = Gdiplus::FillModeAlternate;
                                                          -
                                                          202  } else if (polygon->getFillRule() == "nonzero") {
                                                          -
                                                          203  fillMode = Gdiplus::FillModeWinding;
                                                          -
                                                          204  }
                                                          -
                                                          205  graphics.FillPolygon(&polygonFill, points, idx, fillMode);
                                                          -
                                                          206  graphics.DrawPolygon(&polygonOutline, points, idx);
                                                          -
                                                          207  delete[] points;
                                                          -
                                                          208 }
                                                          -
                                                          209 
                                                          -
                                                          210 #include <codecvt>
                                                          -
                                                          211 #include <locale>
                                                          -
                                                          212 void Renderer::drawText(Gdiplus::Graphics& graphics, Text* text) const {
                                                          -
                                                          213  mColor outline_color = text->getOutlineColor();
                                                          -
                                                          214  mColor fill_color = text->getFillColor();
                                                          -
                                                          215 
                                                          -
                                                          216  graphics.SetTextRenderingHint(Gdiplus::TextRenderingHintAntiAliasGridFit);
                                                          -
                                                          217 
                                                          -
                                                          218  Gdiplus::SolidBrush textFill(
                                                          -
                                                          219  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          220 
                                                          -
                                                          221  Gdiplus::Pen textOutline(Gdiplus::Color(outline_color.a, outline_color.r,
                                                          -
                                                          222  outline_color.g, outline_color.b),
                                                          -
                                                          223  text->getOutlineThickness());
                                                          -
                                                          224 
                                                          -
                                                          225  Gdiplus::FontFamily fontFamily(L"Times New Roman");
                                                          -
                                                          226 
                                                          -
                                                          227  Gdiplus::PointF position(text->getPosition().x, text->getPosition().y);
                                                          -
                                                          228  Gdiplus::GraphicsPath path;
                                                          -
                                                          229 
                                                          -
                                                          230  std::wstring_convert< std::codecvt_utf8_utf16< wchar_t > > converter;
                                                          -
                                                          231  std::wstring wideContent = converter.from_bytes(text->getContent());
                                                          -
                                                          232  Gdiplus::StringFormat stringFormat;
                                                          -
                                                          233  if (text->getAnchor() == "middle") {
                                                          -
                                                          234  stringFormat.SetAlignment(Gdiplus::StringAlignmentCenter);
                                                          -
                                                          235  position.X += 7;
                                                          -
                                                          236  } else if (text->getAnchor() == "end") {
                                                          -
                                                          237  stringFormat.SetAlignment(Gdiplus::StringAlignmentFar);
                                                          -
                                                          238  position.X += 14;
                                                          -
                                                          239  } else {
                                                          -
                                                          240  stringFormat.SetAlignment(Gdiplus::StringAlignmentNear);
                                                          -
                                                          241  }
                                                          -
                                                          242  Gdiplus::FontStyle fontStyle = Gdiplus::FontStyleRegular;
                                                          -
                                                          243  if (text->getFontStyle() == "italic" || text->getFontStyle() == "oblique") {
                                                          -
                                                          244  fontStyle = Gdiplus::FontStyleItalic;
                                                          -
                                                          245  position.Y -= 1;
                                                          -
                                                          246  }
                                                          -
                                                          247 
                                                          -
                                                          248  path.AddString(wideContent.c_str(), wideContent.size(), &fontFamily,
                                                          -
                                                          249  fontStyle, text->getFontSize(), position, &stringFormat);
                                                          -
                                                          250  graphics.FillPath(&textFill, &path);
                                                          -
                                                          251  graphics.DrawPath(&textOutline, &path);
                                                          -
                                                          252 }
                                                          -
                                                          253 
                                                          -
                                                          254 void Renderer::drawPolyline(Gdiplus::Graphics& graphics,
                                                          -
                                                          255  Plyline* polyline) const {
                                                          -
                                                          256  mColor outline_color = polyline->getOutlineColor();
                                                          -
                                                          257  mColor fill_color = polyline->getFillColor();
                                                          -
                                                          258  Gdiplus::Pen polylinePen(Gdiplus::Color(outline_color.a, outline_color.r,
                                                          -
                                                          259  outline_color.g, outline_color.b),
                                                          -
                                                          260  polyline->getOutlineThickness());
                                                          -
                                                          261  Gdiplus::SolidBrush polylineFill(
                                                          -
                                                          262  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          263 
                                                          -
                                                          264  Gdiplus::FillMode fillMode;
                                                          -
                                                          265  if (polyline->getFillRule() == "evenodd") {
                                                          -
                                                          266  fillMode = Gdiplus::FillModeAlternate;
                                                          -
                                                          267  } else if (polyline->getFillRule() == "nonzero") {
                                                          -
                                                          268  fillMode = Gdiplus::FillModeWinding;
                                                          -
                                                          269  }
                                                          -
                                                          270  Gdiplus::GraphicsPath path(fillMode);
                                                          -
                                                          271  const std::vector< Vector2Df >& points = polyline->getPoints();
                                                          -
                                                          272  if (points.size() < 2) {
                                                          -
                                                          273  return;
                                                          -
                                                          274  }
                                                          -
                                                          275 
                                                          -
                                                          276  path.StartFigure();
                                                          -
                                                          277  path.AddLine(points[0].x, points[0].y, points[1].x, points[1].y);
                                                          -
                                                          278  for (size_t i = 2; i < points.size(); ++i) {
                                                          -
                                                          279  path.AddLine(points[i - 1].x, points[i - 1].y, points[i].x,
                                                          -
                                                          280  points[i].y);
                                                          -
                                                          281  }
                                                          -
                                                          282  graphics.FillPath(&polylineFill, &path);
                                                          -
                                                          283  graphics.DrawPath(&polylinePen, &path);
                                                          -
                                                          284 }
                                                          -
                                                          285 
                                                          -
                                                          286 void Renderer::drawPath(Gdiplus::Graphics& graphics, Path* path) const {
                                                          -
                                                          287  mColor outline_color = path->getOutlineColor();
                                                          -
                                                          288  mColor fill_color = path->getFillColor();
                                                          -
                                                          289  Gdiplus::Pen pathPen(Gdiplus::Color(outline_color.a, outline_color.r,
                                                          -
                                                          290  outline_color.g, outline_color.b),
                                                          -
                                                          291  path->getOutlineThickness());
                                                          -
                                                          292  Gdiplus::SolidBrush pathFill(
                                                          -
                                                          293  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          294 
                                                          -
                                                          295  Gdiplus::FillMode fillMode;
                                                          -
                                                          296  if (path->getFillRule() == "evenodd") {
                                                          -
                                                          297  fillMode = Gdiplus::FillModeAlternate;
                                                          -
                                                          298  } else if (path->getFillRule() == "nonzero") {
                                                          -
                                                          299  fillMode = Gdiplus::FillModeWinding;
                                                          -
                                                          300  }
                                                          -
                                                          301  Gdiplus::GraphicsPath gdiPath(fillMode);
                                                          -
                                                          302 
                                                          -
                                                          303  const std::vector< PathPoint >& points = path->getPoints();
                                                          -
                                                          304  int n = points.size();
                                                          -
                                                          305  Vector2Df firstPoint{0, 0}, curPoint{0, 0};
                                                          -
                                                          306 
                                                          -
                                                          307  for (int i = 0; i < n; ++i) {
                                                          -
                                                          308  if (points[i].TC == 'M') {
                                                          -
                                                          309  firstPoint = points[i].Point;
                                                          -
                                                          310  gdiPath.StartFigure();
                                                          -
                                                          311  curPoint = firstPoint;
                                                          -
                                                          312  } else if (points[i].TC == 'm') {
                                                          -
                                                          313  firstPoint.x = curPoint.x + points[i].Point.x;
                                                          -
                                                          314  firstPoint.y = curPoint.y + points[i].Point.y;
                                                          -
                                                          315  gdiPath.StartFigure();
                                                          -
                                                          316  curPoint = firstPoint;
                                                          -
                                                          317  } else if (points[i].TC == 'L') {
                                                          -
                                                          318  gdiPath.AddLine(curPoint.x, curPoint.y, points[i].Point.x,
                                                          -
                                                          319  points[i].Point.y);
                                                          -
                                                          320  curPoint = points[i].Point;
                                                          -
                                                          321  } else if (points[i].TC == 'l') {
                                                          -
                                                          322  Vector2Df endPoint{curPoint.x + points[i].Point.x,
                                                          -
                                                          323  curPoint.y + points[i].Point.y};
                                                          -
                                                          324  gdiPath.AddLine(curPoint.x, curPoint.y, endPoint.x, endPoint.y);
                                                          -
                                                          325  curPoint = endPoint;
                                                          -
                                                          326  } else if (points[i].TC == 'H') {
                                                          -
                                                          327  Vector2Df endPoint{points[i].Point.x, curPoint.y};
                                                          -
                                                          328  gdiPath.AddLine(curPoint.x, curPoint.y, endPoint.x, endPoint.y);
                                                          -
                                                          329  curPoint = endPoint;
                                                          -
                                                          330  } else if (points[i].TC == 'h') {
                                                          -
                                                          331  Vector2Df endPoint{curPoint.x + points[i].Point.x, curPoint.y};
                                                          -
                                                          332  gdiPath.AddLine(curPoint.x, curPoint.y, endPoint.x, endPoint.y);
                                                          -
                                                          333  curPoint = endPoint;
                                                          -
                                                          334  } else if (points[i].TC == 'V') {
                                                          -
                                                          335  Vector2Df endPoint{curPoint.x, points[i].Point.y};
                                                          -
                                                          336  gdiPath.AddLine(curPoint.x, curPoint.y, endPoint.x, endPoint.y);
                                                          -
                                                          337  curPoint = endPoint;
                                                          -
                                                          338  } else if (points[i].TC == 'v') {
                                                          -
                                                          339  Vector2Df endPoint{curPoint.x, curPoint.y + points[i].Point.y};
                                                          -
                                                          340  gdiPath.AddLine(curPoint.x, curPoint.y, endPoint.x, endPoint.y);
                                                          -
                                                          341  curPoint = endPoint;
                                                          -
                                                          342  } else if (points[i].TC == 'C') {
                                                          -
                                                          343  if (i + 2 < n) {
                                                          -
                                                          344  Vector2Df controlPoint1 = points[i].Point;
                                                          -
                                                          345  Vector2Df controlPoint2 = points[i + 1].Point;
                                                          -
                                                          346  Vector2Df controlPoint3 = points[i + 2].Point;
                                                          -
                                                          347  gdiPath.AddBezier(curPoint.x, curPoint.y, controlPoint1.x,
                                                          -
                                                          348  controlPoint1.y, controlPoint2.x,
                                                          -
                                                          349  controlPoint2.y, controlPoint3.x,
                                                          -
                                                          350  controlPoint3.y);
                                                          -
                                                          351  i += 2;
                                                          -
                                                          352  curPoint = controlPoint3;
                                                          -
                                                          353  }
                                                          -
                                                          354  } else if (points[i].TC == 'c') {
                                                          -
                                                          355  if (i + 2 < n) {
                                                          -
                                                          356  Vector2Df controlPoint1 =
                                                          -
                                                          357  Vector2Df{curPoint.x + points[i].Point.x,
                                                          -
                                                          358  curPoint.y + points[i].Point.y};
                                                          -
                                                          359  Vector2Df controlPoint2 =
                                                          -
                                                          360  Vector2Df{curPoint.x + points[i + 1].Point.x,
                                                          -
                                                          361  curPoint.y + points[i + 1].Point.y};
                                                          -
                                                          362  Vector2Df controlPoint3 =
                                                          -
                                                          363  Vector2Df{curPoint.x + points[i + 2].Point.x,
                                                          -
                                                          364  curPoint.y + points[i + 2].Point.y};
                                                          -
                                                          365  gdiPath.AddBezier(curPoint.x, curPoint.y, controlPoint1.x,
                                                          -
                                                          366  controlPoint1.y, controlPoint2.x,
                                                          -
                                                          367  controlPoint2.y, controlPoint3.x,
                                                          -
                                                          368  controlPoint3.y);
                                                          -
                                                          369  i += 2;
                                                          -
                                                          370  curPoint = controlPoint3;
                                                          -
                                                          371  }
                                                          -
                                                          372  } else if (points[i].TC == 'Z' || points[i].TC == 'z') {
                                                          -
                                                          373  gdiPath.CloseFigure();
                                                          -
                                                          374  curPoint = firstPoint;
                                                          -
                                                          375  }
                                                          -
                                                          376  }
                                                          -
                                                          377  graphics.FillPath(&pathFill, &gdiPath);
                                                          -
                                                          378  graphics.DrawPath(&pathPen, &gdiPath);
                                                          -
                                                          379 }
                                                          -
                                                          Represents a circle in 2D space.
                                                          Definition: Circle.hpp:13
                                                          -
                                                          Represents an ellipse in 2D space.
                                                          Definition: Ellipse.hpp:12
                                                          -
                                                          Vector2Df getRadius() const
                                                          Gets the radius of the ellipse.
                                                          Definition: Ellipse.cpp:18
                                                          -
                                                          A composite class that contains a vector of shape pointers (polymorphic).
                                                          Definition: Group.hpp:19
                                                          -
                                                          std::vector< SVGElement * > getElements() const
                                                          Gets the vector of shapes in the composite group.
                                                          Definition: Group.cpp:22
                                                          -
                                                          Represents a line in 2D space.
                                                          Definition: Line.hpp:12
                                                          -
                                                          Vector2Df getDirection() const
                                                          Gets the direction of the line.
                                                          Definition: Line.cpp:19
                                                          -
                                                          Represents a path element in 2D space.
                                                          Definition: Path.hpp:24
                                                          -
                                                          std::string getFillRule() const
                                                          Gets the current fill rule of the path.
                                                          Definition: Path.cpp:17
                                                          -
                                                          std::vector< PathPoint > getPoints() const
                                                          Gets the vector of points in the path.
                                                          Definition: Path.cpp:13
                                                          -
                                                          Represents a polygon in 2D space.
                                                          Definition: Polygon.hpp:12
                                                          -
                                                          std::string getFillRule() const
                                                          Gets the fill rule of the polygon.
                                                          Definition: Polygon.cpp:10
                                                          -
                                                          Represents a polyline in 2D space.
                                                          Definition: Polyline.hpp:12
                                                          -
                                                          std::string getFillRule() const
                                                          Gets the fill rule of the polyline.
                                                          Definition: Polyline.cpp:12
                                                          -
                                                          const std::vector< Vector2Df > & getPoints() const
                                                          Gets the total number of vertices representing the shape.
                                                          Definition: PolyShape.cpp:12
                                                          -
                                                          Represents a rectangle in 2D space.
                                                          Definition: Rect.hpp:13
                                                          -
                                                          Vector2Df getRadius() const
                                                          Gets the radii of the rectangle.
                                                          Definition: Rect.cpp:34
                                                          -
                                                          float getHeight() const
                                                          Gets the height of the rectangle.
                                                          Definition: Rect.cpp:30
                                                          -
                                                          float getWidth() const
                                                          Gets the width of the rectangle.
                                                          Definition: Rect.cpp:22
                                                          -
                                                          Singleton class responsible for rendering shapes using GDI+.
                                                          Definition: Renderer.hpp:24
                                                          -
                                                          void draw(Gdiplus::Graphics &graphics, Group *group) const
                                                          Draws a shape using Gdiplus::Graphics based on its type.
                                                          Definition: Renderer.cpp:69
                                                          -
                                                          void drawPolygon(Gdiplus::Graphics &graphics, Plygon *polygon) const
                                                          Draws a polygon shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:182
                                                          -
                                                          void drawPolyline(Gdiplus::Graphics &graphics, Plyline *polyline) const
                                                          Draws a polyline shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:254
                                                          -
                                                          void drawPath(Gdiplus::Graphics &graphics, Path *path) const
                                                          Draws a path shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:286
                                                          -
                                                          static Renderer * instance
                                                          Singleton instance of the Renderer class.
                                                          Definition: Renderer.hpp:133
                                                          -
                                                          Renderer()
                                                          Private constructor for the Renderer class.
                                                          Definition: Renderer.cpp:5
                                                          -
                                                          void drawText(Gdiplus::Graphics &graphics, Text *text) const
                                                          Draws text using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:212
                                                          -
                                                          void applyTransform(std::vector< std::string > transform_order, Gdiplus::Graphics &graphics) const
                                                          Utility function to apply a series of transformations to the graphics context.
                                                          Definition: Renderer.cpp:46
                                                          -
                                                          void drawCircle(Gdiplus::Graphics &graphics, Circle *circle) const
                                                          Draws a circle shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:145
                                                          -
                                                          void drawLine(Gdiplus::Graphics &graphics, Line *line) const
                                                          Draws a line shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:106
                                                          -
                                                          void drawRectangle(Gdiplus::Graphics &graphics, Rect *rectangle) const
                                                          Draws a rectangle shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:115
                                                          -
                                                          static Renderer * getInstance()
                                                          Gets the singleton instance of the Renderer class.
                                                          Definition: Renderer.cpp:7
                                                          -
                                                          void drawEllipse(Gdiplus::Graphics &graphics, Ell *ellipse) const
                                                          Draws an ellipse shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:163
                                                          -
                                                          float getOutlineThickness() const
                                                          Gets the outline thickness of the shape.
                                                          Definition: SVGElement.cpp:20
                                                          -
                                                          Vector2Df getPosition() const
                                                          Get the current position of the shape.
                                                          Definition: SVGElement.cpp:31
                                                          -
                                                          const mColor & getOutlineColor() const
                                                          Gets the outline color of the shape.
                                                          Definition: SVGElement.cpp:14
                                                          -
                                                          const mColor & getFillColor() const
                                                          Gets the fill color of the shape.
                                                          Definition: SVGElement.cpp:10
                                                          -
                                                          Represents text in 2D space.
                                                          Definition: Text.hpp:12
                                                          -
                                                          std::string getAnchor() const
                                                          Gets the anchor of the text.
                                                          Definition: Text.cpp:24
                                                          -
                                                          float getFontSize() const
                                                          Gets the font size of the text.
                                                          Definition: Text.cpp:16
                                                          -
                                                          std::string getFontStyle() const
                                                          Gets the style of the text.
                                                          Definition: Text.cpp:28
                                                          -
                                                          std::string getContent() const
                                                          Gets the string of the text.
                                                          Definition: Text.cpp:20
                                                          - -
                                                          T x
                                                          X coordinate of the vector.
                                                          Definition: Vector2D.hpp:45
                                                          -
                                                          T y
                                                          Y coordinate of the vector.
                                                          Definition: Vector2D.hpp:46
                                                          -
                                                          Utility class for manipulating RGBA mColors.
                                                          Definition: Color.hpp:11
                                                          -
                                                          int g
                                                          Green component.
                                                          Definition: Color.hpp:61
                                                          -
                                                          int r
                                                          Red component.
                                                          Definition: Color.hpp:60
                                                          -
                                                          int a
                                                          Alpha (opacity) component.
                                                          Definition: Color.hpp:63
                                                          -
                                                          int b
                                                          Blue component.
                                                          Definition: Color.hpp:62
                                                          -
                                                          -
                                                          - - - \ No newline at end of file diff --git a/docs/html/classCircle__coll__graph.map b/docs/html/classCircle__coll__graph.map deleted file mode 100644 index e75d38e0..00000000 --- a/docs/html/classCircle__coll__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/docs/html/classCircle__coll__graph.md5 b/docs/html/classCircle__coll__graph.md5 deleted file mode 100644 index bbd75839..00000000 --- a/docs/html/classCircle__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -1f63ecca615622bef2dad2e31b878736 \ No newline at end of file diff --git a/docs/html/classCircle__coll__graph.svg b/docs/html/classCircle__coll__graph.svg deleted file mode 100644 index 01b03c1b..00000000 --- a/docs/html/classCircle__coll__graph.svg +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - -Circle - - -Node1 - - -Circle - - - - - -Node2 - - -Ell - - - - - -Node2->Node1 - - - - - -Node3 - - -SVGElement - - - - - -Node3->Node2 - - - - - -Node3->Node3 - - - parent - - - -Node4 - - -Vector2D< float > - - - - - -Node4->Node2 - - - radius - - - -Node4->Node3 - - - position - - - -Node5 - - -mColor - - - - - -Node5->Node3 - - - fill -stroke - - - -Node5->Node5 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classEll__coll__graph.map b/docs/html/classEll__coll__graph.map deleted file mode 100644 index c0d83c52..00000000 --- a/docs/html/classEll__coll__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/html/classEll__coll__graph.md5 b/docs/html/classEll__coll__graph.md5 deleted file mode 100644 index 3226273d..00000000 --- a/docs/html/classEll__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -95bbcc2f6d1000f46a2cb11750ce88f9 \ No newline at end of file diff --git a/docs/html/classEll__coll__graph.svg b/docs/html/classEll__coll__graph.svg deleted file mode 100644 index 2dcd76f4..00000000 --- a/docs/html/classEll__coll__graph.svg +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - -Ell - - -Node1 - - -Ell - - - - - -Node2 - - -SVGElement - - - - - -Node2->Node1 - - - - - -Node2->Node2 - - - parent - - - -Node3 - - -Vector2D< float > - - - - - -Node3->Node1 - - - radius - - - -Node3->Node2 - - - position - - - -Node4 - - -mColor - - - - - -Node4->Node2 - - - fill -stroke - - - -Node4->Node4 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classGroup__coll__graph.map b/docs/html/classGroup__coll__graph.map deleted file mode 100644 index 469b11f2..00000000 --- a/docs/html/classGroup__coll__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/html/classGroup__coll__graph.md5 b/docs/html/classGroup__coll__graph.md5 deleted file mode 100644 index e65adfd5..00000000 --- a/docs/html/classGroup__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -db36661001c960688177da21e0f7282b \ No newline at end of file diff --git a/docs/html/classGroup__coll__graph.svg b/docs/html/classGroup__coll__graph.svg deleted file mode 100644 index 86244b2f..00000000 --- a/docs/html/classGroup__coll__graph.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - -Group - - -Node1 - - -Group - - - - - -Node2 - - -SVGElement - - - - - -Node2->Node1 - - - - - -Node2->Node2 - - - parent - - - -Node3 - - -Vector2D< float > - - - - - -Node3->Node2 - - - position - - - -Node4 - - -mColor - - - - - -Node4->Node2 - - - fill -stroke - - - -Node4->Node4 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classLine__coll__graph.map b/docs/html/classLine__coll__graph.map deleted file mode 100644 index 80575a8c..00000000 --- a/docs/html/classLine__coll__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/html/classLine__coll__graph.md5 b/docs/html/classLine__coll__graph.md5 deleted file mode 100644 index fb441883..00000000 --- a/docs/html/classLine__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -8a98e4e085646adfb9f5e94e92eb2c7c \ No newline at end of file diff --git a/docs/html/classParser.html b/docs/html/classParser.html deleted file mode 100644 index 35dc8321..00000000 --- a/docs/html/classParser.html +++ /dev/null @@ -1,1540 +0,0 @@ - - - - - - - - - - - - - - - - - - -svg-reader: Parser Class Reference - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          -
                                                          - - - - - - -
                                                          -
                                                          svg-reader -  0.2 -
                                                          -
                                                          Parse and render SVG files, handle user interactions.
                                                          -
                                                          -
                                                          - - - - - - - -
                                                          -
                                                          - -
                                                          -
                                                          -
                                                          - -
                                                          - -
                                                          -
                                                          - - -
                                                          - -
                                                          - - -
                                                          - -

                                                          To manipulate and parse an SVG file. - More...

                                                          - -

                                                          #include <Parser.hpp>

                                                          -
                                                          -Collaboration diagram for Parser:
                                                          -
                                                          -
                                                          -
                                                          [legend]
                                                          - - - - - - - - - - - - - - -

                                                          -Public Member Functions

                                                          Parser (const Parser &)=delete
                                                           Deleted copy constructor to enforce the singleton pattern.
                                                           
                                                          ~Parser ()
                                                           Destructor.
                                                           
                                                          -GroupgetRoot ()
                                                           Gets the root of the SVG file.
                                                           
                                                          void printShapesData ()
                                                           Prints the data of the shapes. More...
                                                           
                                                          - - - - -

                                                          -Static Public Member Functions

                                                          -static ParsergetInstance (const std::string &file_name)
                                                           Gets the singleton instance of the Parser class.
                                                           
                                                          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

                                                          -Private Member Functions

                                                           Parser (const std::string &file_name)
                                                           Construct a new Parser object. More...
                                                           
                                                          SVGElementparseElements (std::string file_name)
                                                           Parses the SVG file and creates a tree of SVGElements. More...
                                                           
                                                          std::string getAttribute (xml_node<> *node, std::string name)
                                                           Gets the attributes of a node. More...
                                                           
                                                          float getFloatAttribute (xml_node<> *node, std::string name)
                                                           Gets the floating point attributes of a node. More...
                                                           
                                                          mColor parseColor (xml_node<> *node, std::string color)
                                                           Gets the color attributes of a node. More...
                                                           
                                                          std::vector< Vector2DfparsePoints (xml_node<> *node)
                                                           Gets the points of the element. More...
                                                           
                                                          std::vector< PathPointparsePathPoints (xml_node<> *node)
                                                           Gets the points of the path element. More...
                                                           
                                                          std::vector< std::string > getTransformOrder (xml_node<> *node)
                                                           Gets the transform order of the element. More...
                                                           
                                                          LineparseLine (xml_node<> *node, const mColor &stroke_color, float stroke_width)
                                                           Parses the line element. More...
                                                           
                                                          RectparseRect (xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                           Parses the rect element. More...
                                                           
                                                          class PlylineparsePolyline (xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                           Parses the polyline element. More...
                                                           
                                                          class PlygonparsePolygon (xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                           Parses the polygon element. More...
                                                           
                                                          CircleparseCircle (xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                           Parses the circle element. More...
                                                           
                                                          class EllparseEllipse (xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                           Parses the ellipse element. More...
                                                           
                                                          PathparsePath (xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                           Parses the path element. More...
                                                           
                                                          TextparseText (xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                           Parses the text element. More...
                                                           
                                                          SVGElementparseShape (xml_node<> *node)
                                                           Parses the group of elements. More...
                                                           
                                                          - - - - -

                                                          -Private Attributes

                                                          -SVGElementroot
                                                           The root of the SVG file.
                                                           
                                                          - - - - -

                                                          -Static Private Attributes

                                                          -static Parserinstance = nullptr
                                                           The instance of the Parser.
                                                           
                                                          -

                                                          Detailed Description

                                                          -

                                                          To manipulate and parse an SVG file.

                                                          -

                                                          The Parser class is a singleton class that is used to parse an SVG file and create a tree of SVGElements.

                                                          - -

                                                          Definition at line 34 of file Parser.hpp.

                                                          -

                                                          Constructor & Destructor Documentation

                                                          - -

                                                          ◆ Parser()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - -
                                                          Parser::Parser (const std::string & file_name)
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Construct a new Parser object.

                                                          -
                                                          Parameters
                                                          - - -
                                                          file_nameThe name of the file to be parsed.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 136 of file Parser.cpp.

                                                          -
                                                          136  {
                                                          -
                                                          137  root = parseElements(file_name);
                                                          -
                                                          138 }
                                                          -
                                                          SVGElement * root
                                                          The root of the SVG file.
                                                          Definition: Parser.hpp:230
                                                          -
                                                          SVGElement * parseElements(std::string file_name)
                                                          Parses the SVG file and creates a tree of SVGElements.
                                                          Definition: Parser.cpp:152
                                                          -
                                                          -
                                                          -
                                                          -

                                                          Member Function Documentation

                                                          - -

                                                          ◆ getAttribute()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          std::string Parser::getAttribute (xml_node<> * node,
                                                          std::string name 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Gets the attributes of a node.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          nodeThe node to be parsed.
                                                          nameThe name of tag to be parsed.
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The attributes of the node.
                                                          - -

                                                          Definition at line 255 of file Parser.cpp.

                                                          -
                                                          255  {
                                                          -
                                                          256  if (name == "text") return removeExtraSpaces(node->value());
                                                          -
                                                          257  std::string result;
                                                          -
                                                          258  if (node->first_attribute(name.c_str()) == NULL) {
                                                          -
                                                          259  if (name == "fill")
                                                          -
                                                          260  result = "black";
                                                          -
                                                          261  else if (name == "stroke" || name == "transform" || name == "rotate" ||
                                                          -
                                                          262  name == "font-style")
                                                          -
                                                          263  result = "none";
                                                          -
                                                          264  else if (name == "text-anchor")
                                                          -
                                                          265  result = "start";
                                                          -
                                                          266  else if (name == "fill-rule")
                                                          -
                                                          267  result = "nonzero";
                                                          -
                                                          268  } else {
                                                          -
                                                          269  result = node->first_attribute(name.c_str())->value();
                                                          -
                                                          270  }
                                                          -
                                                          271  return result;
                                                          -
                                                          272 }
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ getFloatAttribute()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          float Parser::getFloatAttribute (xml_node<> * node,
                                                          std::string name 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Gets the floating point attributes of a node.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          nodeThe node to be parsed.
                                                          nameThe name of tag to be parsed.
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The floating point attributes of the node.
                                                          - -

                                                          Definition at line 274 of file Parser.cpp.

                                                          -
                                                          274  {
                                                          -
                                                          275  float result;
                                                          -
                                                          276  if (node->first_attribute(name.c_str()) == NULL) {
                                                          -
                                                          277  if (name == "stroke-width" || name == "stroke-opacity" ||
                                                          -
                                                          278  name == "fill-opacity" || name == "opacity")
                                                          -
                                                          279  result = 1;
                                                          -
                                                          280  else
                                                          -
                                                          281  result = 0;
                                                          -
                                                          282  } else {
                                                          -
                                                          283  result = std::stof(node->first_attribute(name.c_str())->value());
                                                          -
                                                          284  }
                                                          -
                                                          285  return result;
                                                          -
                                                          286 }
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ getTransformOrder()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - -
                                                          std::vector< std::string > Parser::getTransformOrder (xml_node<> * node)
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Gets the transform order of the element.

                                                          -
                                                          Parameters
                                                          - - -
                                                          nodeThe node to be parsed.
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The transform order of the element
                                                          - -

                                                          Definition at line 373 of file Parser.cpp.

                                                          -
                                                          373  {
                                                          -
                                                          374  std::string transform_tag = getAttribute(node, "transform");
                                                          -
                                                          375  std::vector< std::string > order;
                                                          -
                                                          376  std::stringstream ss(transform_tag);
                                                          -
                                                          377  std::string type;
                                                          -
                                                          378  while (ss >> type) {
                                                          -
                                                          379  if (type.find("translate") != std::string::npos ||
                                                          -
                                                          380  type.find("scale") != std::string::npos ||
                                                          -
                                                          381  type.find("rotate") != std::string::npos) {
                                                          -
                                                          382  while (type.find(")") == std::string::npos) {
                                                          -
                                                          383  std::string temp;
                                                          -
                                                          384  ss >> temp;
                                                          -
                                                          385  type += " " + temp;
                                                          -
                                                          386  }
                                                          -
                                                          387  std::string temp = type.substr(0, type.find("(") + 1);
                                                          -
                                                          388  temp.erase(std::remove(temp.begin(), temp.end(), ' '), temp.end());
                                                          -
                                                          389  type.erase(0, type.find("(") + 1);
                                                          -
                                                          390  type = temp + type;
                                                          -
                                                          391  order.push_back(type);
                                                          -
                                                          392  }
                                                          -
                                                          393  }
                                                          -
                                                          394  return order;
                                                          -
                                                          395 }
                                                          -
                                                          std::string getAttribute(xml_node<> *node, std::string name)
                                                          Gets the attributes of a node.
                                                          Definition: Parser.cpp:255
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parseCircle()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          Circle * Parser::parseCircle (xml_node<> * node,
                                                          const mColorfill_color,
                                                          const mColorstroke_color,
                                                          float stroke_width 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Parses the circle element.

                                                          -
                                                          Parameters
                                                          - - - - - -
                                                          nodeThe node to be parsed.
                                                          fill_colorThe color of the fill
                                                          stroke_colorThe color of the stroke
                                                          stroke_widthThe width of the stroke
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The circle element
                                                          - -

                                                          Definition at line 446 of file Parser.cpp.

                                                          -
                                                          447  {
                                                          -
                                                          448  float cx = getFloatAttribute(node, "cx");
                                                          -
                                                          449  float cy = getFloatAttribute(node, "cy");
                                                          -
                                                          450  float radius = getFloatAttribute(node, "r");
                                                          -
                                                          451  Circle *shape = new Circle(radius, Vector2Df(cx, cy), fill_color,
                                                          -
                                                          452  stroke_color, stroke_width);
                                                          -
                                                          453  return shape;
                                                          -
                                                          454 }
                                                          -
                                                          Represents a circle in 2D space.
                                                          Definition: Circle.hpp:13
                                                          -
                                                          float getFloatAttribute(xml_node<> *node, std::string name)
                                                          Gets the floating point attributes of a node.
                                                          Definition: Parser.cpp:274
                                                          - -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parseColor()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          mColor Parser::parseColor (xml_node<> * node,
                                                          std::string color 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Gets the color attributes of a node.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          nodeThe node to be parsed.
                                                          colorThe name of the color tag to be parsed.
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The color attributes of the node.
                                                          - -

                                                          Definition at line 288 of file Parser.cpp.

                                                          -
                                                          288  {
                                                          -
                                                          289  std::string color = getAttribute(node, name);
                                                          -
                                                          290  color.erase(std::remove(color.begin(), color.end(), ' '), color.end());
                                                          -
                                                          291  for (auto &c : color) c = tolower(c);
                                                          -
                                                          292  if (color == "none")
                                                          -
                                                          293  return mColor::Transparent;
                                                          -
                                                          294  else {
                                                          -
                                                          295  mColor result;
                                                          -
                                                          296  if (color.find("#") != std::string::npos) {
                                                          -
                                                          297  result = getHexColor(color);
                                                          -
                                                          298  } else if (color.find("rgb") != std::string::npos) {
                                                          -
                                                          299  result = getRgbColor(color);
                                                          -
                                                          300  } else {
                                                          -
                                                          301  auto color_code = color_map.find(color);
                                                          -
                                                          302  if (color_code == color_map.end()) {
                                                          -
                                                          303  std::cout << "Color " << color << " not found" << std::endl;
                                                          -
                                                          304  exit(-1);
                                                          -
                                                          305  }
                                                          -
                                                          306  result = color_code->second;
                                                          -
                                                          307  }
                                                          -
                                                          308 
                                                          -
                                                          309  result.a = result.a * getFloatAttribute(node, name + "-opacity") *
                                                          -
                                                          310  getFloatAttribute(node, "opacity");
                                                          -
                                                          311  return result;
                                                          -
                                                          312  }
                                                          -
                                                          313 }
                                                          -
                                                          Utility class for manipulating RGBA mColors.
                                                          Definition: Color.hpp:11
                                                          -
                                                          int a
                                                          Alpha (opacity) component.
                                                          Definition: Color.hpp:63
                                                          -
                                                          static const mColor Transparent
                                                          Transparent (black) predefined color.
                                                          Definition: Color.hpp:58
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parseElements()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - -
                                                          SVGElement * Parser::parseElements (std::string file_name)
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Parses the SVG file and creates a tree of SVGElements.

                                                          -
                                                          Parameters
                                                          - - -
                                                          file_nameThe name of the file to be parsed.
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The root of the tree of SVGElements.
                                                          - -

                                                          Definition at line 152 of file Parser.cpp.

                                                          -
                                                          152  {
                                                          -
                                                          153  xml_document<> doc;
                                                          -
                                                          154  std::ifstream file(file_name);
                                                          -
                                                          155  std::vector< char > buffer((std::istreambuf_iterator< char >(file)),
                                                          -
                                                          156  std::istreambuf_iterator< char >());
                                                          -
                                                          157  buffer.push_back('\0');
                                                          -
                                                          158  doc.parse< 0 >(&buffer[0]);
                                                          -
                                                          159 
                                                          -
                                                          160  xml_node<> *svg = doc.first_node();
                                                          -
                                                          161  xml_node<> *node = svg->first_node();
                                                          -
                                                          162  xml_node<> *prev = NULL;
                                                          -
                                                          163 
                                                          -
                                                          164  SVGElement *root = new Group();
                                                          -
                                                          165  SVGElement *current = root;
                                                          -
                                                          166 
                                                          -
                                                          167  while (node) {
                                                          -
                                                          168  if (std::string(node->name()) == "g") {
                                                          -
                                                          169  Group *group = dynamic_cast< Group * >(current);
                                                          -
                                                          170  for (auto group_attribute : group->getAttributes()) {
                                                          -
                                                          171  bool found = false;
                                                          -
                                                          172  for (auto attribute = node->first_attribute(); attribute;
                                                          -
                                                          173  attribute = attribute->next_attribute()) {
                                                          -
                                                          174  if (std::string(attribute->name()) ==
                                                          -
                                                          175  group_attribute.first) {
                                                          -
                                                          176  if (group_attribute.first == "opacity") {
                                                          -
                                                          177  std::string opacity = std::to_string(
                                                          -
                                                          178  std::stof(attribute->value()) *
                                                          -
                                                          179  std::stof(group_attribute.second));
                                                          -
                                                          180  char *value = doc.allocate_string(opacity.c_str());
                                                          -
                                                          181  attribute->value(value);
                                                          -
                                                          182  }
                                                          -
                                                          183  found = true;
                                                          -
                                                          184  break;
                                                          -
                                                          185  }
                                                          -
                                                          186  }
                                                          -
                                                          187  if (!found && group_attribute.first != "transform") {
                                                          -
                                                          188  char *name =
                                                          -
                                                          189  doc.allocate_string(group_attribute.first.c_str());
                                                          -
                                                          190  char *value =
                                                          -
                                                          191  doc.allocate_string(group_attribute.second.c_str());
                                                          -
                                                          192  xml_attribute<> *new_attribute =
                                                          -
                                                          193  doc.allocate_attribute(name, value);
                                                          -
                                                          194  node->append_attribute(new_attribute);
                                                          -
                                                          195  }
                                                          -
                                                          196  }
                                                          -
                                                          197  Group *new_group = new Group(xmlToString(node->first_attribute()));
                                                          -
                                                          198  new_group->setTransforms(getTransformOrder(node));
                                                          -
                                                          199  current->addElement(new_group);
                                                          -
                                                          200  current = new_group;
                                                          -
                                                          201  prev = node;
                                                          -
                                                          202  node = node->first_node();
                                                          -
                                                          203  } else {
                                                          -
                                                          204  Group *group = dynamic_cast< Group * >(current);
                                                          -
                                                          205  for (auto group_attribute : group->getAttributes()) {
                                                          -
                                                          206  bool found = false;
                                                          -
                                                          207  for (auto attribute = node->first_attribute(); attribute;
                                                          -
                                                          208  attribute = attribute->next_attribute()) {
                                                          -
                                                          209  if (std::string(attribute->name()) ==
                                                          -
                                                          210  group_attribute.first) {
                                                          -
                                                          211  if (group_attribute.first == "opacity") {
                                                          -
                                                          212  std::string opacity = std::to_string(
                                                          -
                                                          213  std::stof(attribute->value()) *
                                                          -
                                                          214  std::stof(group_attribute.second));
                                                          -
                                                          215  char *value = doc.allocate_string(opacity.c_str());
                                                          -
                                                          216  attribute->value(value);
                                                          -
                                                          217  }
                                                          -
                                                          218  found = true;
                                                          -
                                                          219  break;
                                                          -
                                                          220  }
                                                          -
                                                          221  }
                                                          -
                                                          222  if (!found && group_attribute.first != "transform") {
                                                          -
                                                          223  char *name =
                                                          -
                                                          224  doc.allocate_string(group_attribute.first.c_str());
                                                          -
                                                          225  char *value =
                                                          -
                                                          226  doc.allocate_string(group_attribute.second.c_str());
                                                          -
                                                          227  xml_attribute<> *new_attribute =
                                                          -
                                                          228  doc.allocate_attribute(name, value);
                                                          -
                                                          229  node->append_attribute(new_attribute);
                                                          -
                                                          230  }
                                                          -
                                                          231  }
                                                          -
                                                          232  SVGElement *shape = parseShape(node);
                                                          -
                                                          233  if (shape != NULL) current->addElement(shape);
                                                          -
                                                          234  prev = node;
                                                          -
                                                          235  node = node->next_sibling();
                                                          -
                                                          236  }
                                                          -
                                                          237  if (node == NULL && current != root) {
                                                          -
                                                          238  while (prev->parent()->next_sibling() == NULL) {
                                                          -
                                                          239  current = current->getParent();
                                                          -
                                                          240  prev = prev->parent();
                                                          -
                                                          241  if (prev == svg) {
                                                          -
                                                          242  break;
                                                          -
                                                          243  }
                                                          -
                                                          244  }
                                                          -
                                                          245  if (prev == svg) {
                                                          -
                                                          246  break;
                                                          -
                                                          247  }
                                                          -
                                                          248  current = current->getParent();
                                                          -
                                                          249  node = prev->parent()->next_sibling();
                                                          -
                                                          250  }
                                                          -
                                                          251  }
                                                          -
                                                          252  return root;
                                                          -
                                                          253 }
                                                          -
                                                          A composite class that contains a vector of shape pointers (polymorphic).
                                                          Definition: Group.hpp:19
                                                          -
                                                          Attributes getAttributes() const
                                                          Gets the attributes of the shape.
                                                          Definition: Group.cpp:15
                                                          -
                                                          SVGElement * parseShape(xml_node<> *node)
                                                          Parses the group of elements.
                                                          Definition: Parser.cpp:397
                                                          -
                                                          std::vector< std::string > getTransformOrder(xml_node<> *node)
                                                          Gets the transform order of the element.
                                                          Definition: Parser.cpp:373
                                                          -
                                                          Represents an element in an SVG file.
                                                          Definition: SVGElement.hpp:17
                                                          -
                                                          void setTransforms(const std::vector< std::string > &transforms)
                                                          Sets the transformations of the shape.
                                                          Definition: SVGElement.cpp:47
                                                          -
                                                          SVGElement * getParent() const
                                                          Parent pointer getter.
                                                          Definition: SVGElement.cpp:57
                                                          -
                                                          SVGElement * parent
                                                          Pointer to the group that contains the shape.
                                                          Definition: SVGElement.hpp:166
                                                          -
                                                          virtual void addElement(SVGElement *element)
                                                          Adds a shape to the composite group.
                                                          Definition: SVGElement.cpp:59
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parseEllipse()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          Ell * Parser::parseEllipse (xml_node<> * node,
                                                          const mColorfill_color,
                                                          const mColorstroke_color,
                                                          float stroke_width 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Parses the ellipse element.

                                                          -
                                                          Parameters
                                                          - - - - - -
                                                          nodeThe node to be parsed.
                                                          fill_colorThe color of the fill
                                                          stroke_colorThe color of the stroke
                                                          stroke_widthThe width of the stroke
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The ellipse element
                                                          - -

                                                          Definition at line 456 of file Parser.cpp.

                                                          -
                                                          457  {
                                                          -
                                                          458  float radius_x = getFloatAttribute(node, "rx");
                                                          -
                                                          459  float radius_y = getFloatAttribute(node, "ry");
                                                          -
                                                          460  float cx = getFloatAttribute(node, "cx");
                                                          -
                                                          461  float cy = getFloatAttribute(node, "cy");
                                                          -
                                                          462  Ell *shape = new Ell(Vector2Df(radius_x, radius_y), Vector2Df(cx, cy),
                                                          -
                                                          463  fill_color, stroke_color, stroke_width);
                                                          -
                                                          464  return shape;
                                                          -
                                                          465 }
                                                          -
                                                          Represents an ellipse in 2D space.
                                                          Definition: Ellipse.hpp:12
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parseLine()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          Line * Parser::parseLine (xml_node<> * node,
                                                          const mColorstroke_color,
                                                          float stroke_width 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Parses the line element.

                                                          -
                                                          Parameters
                                                          - - - - -
                                                          nodeThe node to be parsed.
                                                          stroke_colorThe color of the stroke
                                                          stroke_widthThe width of the stroke
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The line element
                                                          - -

                                                          Definition at line 424 of file Parser.cpp.

                                                          -
                                                          425  {
                                                          -
                                                          426  Line *shape = new Line(
                                                          -
                                                          427  Vector2Df(getFloatAttribute(node, "x1"), getFloatAttribute(node, "y1")),
                                                          -
                                                          428  Vector2Df(getFloatAttribute(node, "x2"), getFloatAttribute(node, "y2")),
                                                          -
                                                          429  stroke_color, stroke_width);
                                                          -
                                                          430  return shape;
                                                          -
                                                          431 }
                                                          -
                                                          Represents a line in 2D space.
                                                          Definition: Line.hpp:12
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parsePath()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          Path * Parser::parsePath (xml_node<> * node,
                                                          const mColorfill_color,
                                                          const mColorstroke_color,
                                                          float stroke_width 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Parses the path element.

                                                          -
                                                          Parameters
                                                          - - - - - -
                                                          nodeThe node to be parsed.
                                                          fill_colorThe color of the fill
                                                          stroke_colorThe color of the stroke
                                                          stroke_widthThe width of the stroke
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The path element
                                                          - -

                                                          Definition at line 523 of file Parser.cpp.

                                                          -
                                                          524  {
                                                          -
                                                          525  Path *shape = new Path(fill_color, stroke_color, stroke_width);
                                                          -
                                                          526  std::vector< PathPoint > points = parsePathPoints(node);
                                                          -
                                                          527  for (auto point : points) {
                                                          -
                                                          528  shape->addPoint(point);
                                                          -
                                                          529  }
                                                          -
                                                          530  std::string fill_rule = getAttribute(node, "fill-rule");
                                                          -
                                                          531  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
                                                          -
                                                          532  fill_rule.end());
                                                          -
                                                          533  shape->setFillRule(fill_rule);
                                                          -
                                                          534  return shape;
                                                          -
                                                          535 }
                                                          -
                                                          std::vector< PathPoint > parsePathPoints(xml_node<> *node)
                                                          Gets the points of the path element.
                                                          Definition: Parser.cpp:331
                                                          -
                                                          Represents a path element in 2D space.
                                                          Definition: Path.hpp:24
                                                          -
                                                          void setFillRule(std::string fill_rule)
                                                          Sets the fill rule of the path.
                                                          Definition: Path.cpp:15
                                                          -
                                                          void addPoint(PathPoint point)
                                                          Adds a point to the path.
                                                          Definition: Path.cpp:11
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parsePathPoints()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - -
                                                          std::vector< PathPoint > Parser::parsePathPoints (xml_node<> * node)
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Gets the points of the path element.

                                                          -
                                                          Parameters
                                                          - - -
                                                          nodeThe node to be parsed.
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The points of the path element
                                                          - -

                                                          Definition at line 331 of file Parser.cpp.

                                                          -
                                                          331  {
                                                          -
                                                          332  std::vector< PathPoint > points;
                                                          -
                                                          333  std::string path_string = getAttribute(node, "d");
                                                          -
                                                          334 
                                                          -
                                                          335  formatSvgPathString(path_string);
                                                          -
                                                          336  std::stringstream ss(path_string);
                                                          -
                                                          337  std::string element;
                                                          -
                                                          338  PathPoint pPoint{{0, 0}, 'M'};
                                                          -
                                                          339 
                                                          -
                                                          340  while (ss >> element) {
                                                          -
                                                          341  if (std::isalpha(element[0])) {
                                                          -
                                                          342  pPoint.TC = element[0];
                                                          -
                                                          343  if (tolower(pPoint.TC) == 'm' || tolower(pPoint.TC) == 'l' ||
                                                          -
                                                          344  tolower(pPoint.TC) == 'c')
                                                          -
                                                          345  ss >> pPoint.Point.x >> pPoint.Point.y;
                                                          -
                                                          346  else if (tolower(pPoint.TC) == 'h') {
                                                          -
                                                          347  ss >> pPoint.Point.x;
                                                          -
                                                          348  pPoint.Point.y = 0;
                                                          -
                                                          349  } else if (tolower(pPoint.TC) == 'v') {
                                                          -
                                                          350  ss >> pPoint.Point.y;
                                                          -
                                                          351  pPoint.Point.x = 0;
                                                          -
                                                          352  }
                                                          -
                                                          353  } else {
                                                          -
                                                          354  if (tolower(pPoint.TC) == 'm' || tolower(pPoint.TC) == 'l' ||
                                                          -
                                                          355  tolower(pPoint.TC) == 'c') {
                                                          -
                                                          356  if (tolower(pPoint.TC) == 'm') pPoint.TC = 'L';
                                                          -
                                                          357  pPoint.Point.x = std::stof(element);
                                                          -
                                                          358  ss >> pPoint.Point.y;
                                                          -
                                                          359  } else if (tolower(pPoint.TC) == 'h') {
                                                          -
                                                          360  pPoint.Point.x = std::stof(element);
                                                          -
                                                          361  pPoint.Point.y = 0;
                                                          -
                                                          362  } else if (tolower(pPoint.TC) == 'v') {
                                                          -
                                                          363  pPoint.Point.y = std::stof(element);
                                                          -
                                                          364  pPoint.Point.x = 0;
                                                          -
                                                          365  }
                                                          -
                                                          366  }
                                                          -
                                                          367  points.push_back(pPoint);
                                                          -
                                                          368  }
                                                          -
                                                          369 
                                                          -
                                                          370  return points;
                                                          -
                                                          371 }
                                                          -
                                                          A struct that contains a point and a type of point.
                                                          Definition: Path.hpp:10
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parsePoints()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - -
                                                          std::vector< Vector2Df > Parser::parsePoints (xml_node<> * node)
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Gets the points of the element.

                                                          -
                                                          Parameters
                                                          - - -
                                                          nodeThe node to be parsed.
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The points of the element
                                                          - -

                                                          Definition at line 315 of file Parser.cpp.

                                                          -
                                                          315  {
                                                          -
                                                          316  std::vector< Vector2Df > points;
                                                          -
                                                          317  std::string points_string = getAttribute(node, "points");
                                                          -
                                                          318 
                                                          -
                                                          319  std::stringstream ss(points_string);
                                                          -
                                                          320  float x, y;
                                                          -
                                                          321 
                                                          -
                                                          322  while (ss >> x) {
                                                          -
                                                          323  if (ss.peek() == ',') ss.ignore();
                                                          -
                                                          324  ss >> y;
                                                          -
                                                          325  points.push_back(Vector2Df(x, y));
                                                          -
                                                          326  }
                                                          -
                                                          327 
                                                          -
                                                          328  return points;
                                                          -
                                                          329 }
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parsePolygon()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          Plygon * Parser::parsePolygon (xml_node<> * node,
                                                          const mColorfill_color,
                                                          const mColorstroke_color,
                                                          float stroke_width 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Parses the polygon element.

                                                          -
                                                          Parameters
                                                          - - - - - -
                                                          nodeThe node to be parsed.
                                                          fill_colorThe color of the fill
                                                          stroke_colorThe color of the stroke
                                                          stroke_widthThe width of the stroke
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The polygon element
                                                          - -

                                                          Definition at line 467 of file Parser.cpp.

                                                          -
                                                          468  {
                                                          -
                                                          469  Plygon *shape = new Plygon(fill_color, stroke_color, stroke_width);
                                                          -
                                                          470  std::vector< Vector2Df > points = parsePoints(node);
                                                          -
                                                          471  for (auto point : points) {
                                                          -
                                                          472  shape->addPoint(point);
                                                          -
                                                          473  }
                                                          -
                                                          474  std::string fill_rule = getAttribute(node, "fill-rule");
                                                          -
                                                          475  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
                                                          -
                                                          476  fill_rule.end());
                                                          -
                                                          477  shape->setFillRule(fill_rule);
                                                          -
                                                          478  return shape;
                                                          -
                                                          479 }
                                                          -
                                                          std::vector< Vector2Df > parsePoints(xml_node<> *node)
                                                          Gets the points of the element.
                                                          Definition: Parser.cpp:315
                                                          -
                                                          Represents a polygon in 2D space.
                                                          Definition: Polygon.hpp:12
                                                          -
                                                          void setFillRule(std::string fill_rule)
                                                          Sets the fill rule of the polygon.
                                                          Definition: Polygon.cpp:8
                                                          -
                                                          virtual void addPoint(const Vector2Df &point)
                                                          Adds a vertex to the shape.
                                                          Definition: PolyShape.cpp:10
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parsePolyline()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          Plyline * Parser::parsePolyline (xml_node<> * node,
                                                          const mColorfill_color,
                                                          const mColorstroke_color,
                                                          float stroke_width 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Parses the polyline element.

                                                          -
                                                          Parameters
                                                          - - - - - -
                                                          nodeThe node to be parsed.
                                                          fill_colorThe color of the fill
                                                          stroke_colorThe color of the stroke
                                                          stroke_widthThe width of the stroke
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The polyline element
                                                          - -

                                                          Definition at line 481 of file Parser.cpp.

                                                          -
                                                          482  {
                                                          -
                                                          483  Plyline *shape = new Plyline(fill_color, stroke_color, stroke_width);
                                                          -
                                                          484  std::vector< Vector2Df > points = parsePoints(node);
                                                          -
                                                          485  for (auto point : points) {
                                                          -
                                                          486  shape->addPoint(point);
                                                          -
                                                          487  }
                                                          -
                                                          488  std::string fill_rule = getAttribute(node, "fill-rule");
                                                          -
                                                          489  fill_rule.erase(std::remove(fill_rule.begin(), fill_rule.end(), ' '),
                                                          -
                                                          490  fill_rule.end());
                                                          -
                                                          491  shape->setFillRule(fill_rule);
                                                          -
                                                          492  return shape;
                                                          -
                                                          493 }
                                                          -
                                                          Represents a polyline in 2D space.
                                                          Definition: Polyline.hpp:12
                                                          -
                                                          void setFillRule(std::string fill_rule)
                                                          Sets the fill rule of the polyline.
                                                          Definition: Polyline.cpp:8
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parseRect()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          Rect * Parser::parseRect (xml_node<> * node,
                                                          const mColorfill_color,
                                                          const mColorstroke_color,
                                                          float stroke_width 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Parses the rect element.

                                                          -
                                                          Parameters
                                                          - - - - - -
                                                          nodeThe node to be parsed.
                                                          fill_colorThe color of the fill
                                                          stroke_colorThe color of the stroke
                                                          stroke_widthThe width of the stroke
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The rect element
                                                          - -

                                                          Definition at line 433 of file Parser.cpp.

                                                          -
                                                          434  {
                                                          -
                                                          435  float x = getFloatAttribute(node, "x");
                                                          -
                                                          436  float y = getFloatAttribute(node, "y");
                                                          -
                                                          437  float rx = getFloatAttribute(node, "rx");
                                                          -
                                                          438  float ry = getFloatAttribute(node, "ry");
                                                          -
                                                          439  Rect *shape =
                                                          -
                                                          440  new Rect(getFloatAttribute(node, "width"),
                                                          -
                                                          441  getFloatAttribute(node, "height"), Vector2Df(x, y),
                                                          -
                                                          442  Vector2Df(rx, ry), fill_color, stroke_color, stroke_width);
                                                          -
                                                          443  return shape;
                                                          -
                                                          444 }
                                                          -
                                                          Represents a rectangle in 2D space.
                                                          Definition: Rect.hpp:13
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parseShape()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - -
                                                          SVGElement * Parser::parseShape (xml_node<> * node)
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Parses the group of elements.

                                                          -
                                                          Parameters
                                                          - - -
                                                          nodeThe node to be parsed.
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The group of elements
                                                          - -

                                                          Definition at line 397 of file Parser.cpp.

                                                          -
                                                          397  {
                                                          -
                                                          398  SVGElement *shape = NULL;
                                                          -
                                                          399  std::string type = node->name();
                                                          -
                                                          400  mColor stroke_color = parseColor(node, "stroke");
                                                          -
                                                          401  mColor fill_color = parseColor(node, "fill");
                                                          -
                                                          402  float stroke_width = getFloatAttribute(node, "stroke-width");
                                                          -
                                                          403  if (type == "line") {
                                                          -
                                                          404  shape = parseLine(node, stroke_color, stroke_width);
                                                          -
                                                          405  } else if (type == "rect") {
                                                          -
                                                          406  shape = parseRect(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          407  } else if (type == "circle") {
                                                          -
                                                          408  shape = parseCircle(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          409  } else if (type == "ellipse") {
                                                          -
                                                          410  shape = parseEllipse(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          411  } else if (type == "polygon") {
                                                          -
                                                          412  shape = parsePolygon(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          413  } else if (type == "polyline") {
                                                          -
                                                          414  shape = parsePolyline(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          415  } else if (type == "path") {
                                                          -
                                                          416  shape = parsePath(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          417  } else if (type == "text") {
                                                          -
                                                          418  return parseText(node, fill_color, stroke_color, stroke_width);
                                                          -
                                                          419  }
                                                          -
                                                          420  if (shape != NULL) shape->setTransforms(getTransformOrder(node));
                                                          -
                                                          421  return shape;
                                                          -
                                                          422 }
                                                          -
                                                          Path * parsePath(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the path element.
                                                          Definition: Parser.cpp:523
                                                          -
                                                          class Plyline * parsePolyline(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the polyline element.
                                                          Definition: Parser.cpp:481
                                                          -
                                                          Text * parseText(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the text element.
                                                          Definition: Parser.cpp:495
                                                          -
                                                          class Plygon * parsePolygon(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the polygon element.
                                                          Definition: Parser.cpp:467
                                                          -
                                                          Circle * parseCircle(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the circle element.
                                                          Definition: Parser.cpp:446
                                                          -
                                                          Rect * parseRect(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the rect element.
                                                          Definition: Parser.cpp:433
                                                          -
                                                          Line * parseLine(xml_node<> *node, const mColor &stroke_color, float stroke_width)
                                                          Parses the line element.
                                                          Definition: Parser.cpp:424
                                                          -
                                                          mColor parseColor(xml_node<> *node, std::string color)
                                                          Gets the color attributes of a node.
                                                          Definition: Parser.cpp:288
                                                          -
                                                          class Ell * parseEllipse(xml_node<> *node, const mColor &fill_color, const mColor &stroke_color, float stroke_width)
                                                          Parses the ellipse element.
                                                          Definition: Parser.cpp:456
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ parseText()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          Text * Parser::parseText (xml_node<> * node,
                                                          const mColorfill_color,
                                                          const mColorstroke_color,
                                                          float stroke_width 
                                                          )
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Parses the text element.

                                                          -
                                                          Parameters
                                                          - - - - - -
                                                          nodeThe node to be parsed.
                                                          fill_colorThe color of the fill
                                                          stroke_colorThe color of the stroke
                                                          stroke_widthThe width of the stroke
                                                          -
                                                          -
                                                          -
                                                          Returns
                                                          The text element
                                                          - -

                                                          Definition at line 495 of file Parser.cpp.

                                                          -
                                                          496  {
                                                          -
                                                          497  float x = getFloatAttribute(node, "x");
                                                          -
                                                          498  float y = getFloatAttribute(node, "y");
                                                          -
                                                          499  float font_size = getFloatAttribute(node, "font-size");
                                                          -
                                                          500  std::string text = getAttribute(node, "text");
                                                          -
                                                          501 
                                                          -
                                                          502  Text *shape = new Text(Vector2Df(x - 7, y - font_size + 5), text, font_size,
                                                          -
                                                          503  fill_color, stroke_color, stroke_width);
                                                          -
                                                          504 
                                                          -
                                                          505  std::string anchor = getAttribute(node, "text-anchor");
                                                          -
                                                          506  anchor.erase(std::remove(anchor.begin(), anchor.end(), ' '), anchor.end());
                                                          -
                                                          507  shape->setAnchor(anchor);
                                                          -
                                                          508 
                                                          -
                                                          509  std::string style = getAttribute(node, "font-style");
                                                          -
                                                          510  style.erase(std::remove(style.begin(), style.end(), ' '), style.end());
                                                          -
                                                          511  shape->setFontStyle(style);
                                                          -
                                                          512 
                                                          -
                                                          513  float dx = getFloatAttribute(node, "dx");
                                                          -
                                                          514  float dy = getFloatAttribute(node, "dy");
                                                          -
                                                          515  std::string transform =
                                                          -
                                                          516  "translate(" + std::to_string(dx) + " " + std::to_string(dy) + ")";
                                                          -
                                                          517  std::vector< std::string > transform_order = getTransformOrder(node);
                                                          -
                                                          518  transform_order.push_back(transform);
                                                          -
                                                          519  shape->setTransforms(transform_order);
                                                          -
                                                          520  return shape;
                                                          -
                                                          521 }
                                                          -
                                                          Represents text in 2D space.
                                                          Definition: Text.hpp:12
                                                          -
                                                          void setFontStyle(std::string style)
                                                          Sets the style of the text.
                                                          Definition: Text.cpp:26
                                                          -
                                                          void setAnchor(std::string anchor)
                                                          Sets the anchor of the text.
                                                          Definition: Text.cpp:22
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ printShapesData()

                                                          - -
                                                          -
                                                          - - - - - - - -
                                                          void Parser::printShapesData ()
                                                          -
                                                          - -

                                                          Prints the data of the shapes.

                                                          -
                                                          Note
                                                          This function is used for debugging.
                                                          - -

                                                          Definition at line 539 of file Parser.cpp.

                                                          -
                                                          539 { root->printData(); }
                                                          -
                                                          virtual void printData() const
                                                          Prints the data of the shape.
                                                          Definition: SVGElement.cpp:33
                                                          -
                                                          -
                                                          -
                                                          -
                                                          The documentation for this class was generated from the following files: -
                                                          -
                                                          - - - \ No newline at end of file diff --git a/docs/html/classParser.js b/docs/html/classParser.js deleted file mode 100644 index 56175796..00000000 --- a/docs/html/classParser.js +++ /dev/null @@ -1,27 +0,0 @@ -var classParser = -[ - [ "Parser", "classParser.html#a48044a8caa14a251cb4dad9fb363658e", null ], - [ "~Parser", "classParser.html#a3e658b5917a93a3ef648050d060e3a93", null ], - [ "Parser", "classParser.html#a350fc3e35535c5891cd9e36e79ee546a", null ], - [ "getAttribute", "classParser.html#aa1c81b338cab55b128d0c2b6f48843a5", null ], - [ "getFloatAttribute", "classParser.html#a23d95ecfeae834319e3ac55fbb213bb1", null ], - [ "getInstance", "classParser.html#a06952fa44f19fdb573c1355ac26454c5", null ], - [ "getRoot", "classParser.html#a59ed4455eaec306cde11939785c4e71a", null ], - [ "getTransformOrder", "classParser.html#abd879ea781803a60e89675479e1d75f6", null ], - [ "parseCircle", "classParser.html#ab48a0797fe7ab0b7d4d00d4309a1b49f", null ], - [ "parseColor", "classParser.html#af3820c3ea6da58ce2e7d897d5d0b59cb", null ], - [ "parseElements", "classParser.html#aaf9f19591ff93f0c0c2fd68955e4a4af", null ], - [ "parseEllipse", "classParser.html#af7bd35de9ae9990807b8d63fc8433384", null ], - [ "parseLine", "classParser.html#ae4f868faab1653fc9bb53902c3284dc3", null ], - [ "parsePath", "classParser.html#a118d55f338510ccaf3b9352e88237759", null ], - [ "parsePathPoints", "classParser.html#a84d781820ab7c167496def7ae93fa3df", null ], - [ "parsePoints", "classParser.html#af42401b34e756cf3d19940d795e9be37", null ], - [ "parsePolygon", "classParser.html#a95b6a4c1e523ac49e891c4abc1cb664b", null ], - [ "parsePolyline", "classParser.html#a7556a6ba41ab1a14aaa77ef4734e0f12", null ], - [ "parseRect", "classParser.html#ade5b3a22b5aa10f986ae56218701a312", null ], - [ "parseShape", "classParser.html#a6835a56be443bac2712300d85f08a1f0", null ], - [ "parseText", "classParser.html#a9063a336c4ab03d9476990aedaa76ff5", null ], - [ "printShapesData", "classParser.html#a3d8927f2e26abf6a63bd850c154b23c6", null ], - [ "instance", "classParser.html#ae3a28c02c18171f4e83fae54b9f21a90", null ], - [ "root", "classParser.html#a13a5e2fdac62670c1584de1edbba77f2", null ] -]; \ No newline at end of file diff --git a/docs/html/classParser__coll__graph.map b/docs/html/classParser__coll__graph.map deleted file mode 100644 index b70b6400..00000000 --- a/docs/html/classParser__coll__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/html/classParser__coll__graph.md5 b/docs/html/classParser__coll__graph.md5 deleted file mode 100644 index 8d585233..00000000 --- a/docs/html/classParser__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -0a420845e7168b84b0ce9ddb22a28294 \ No newline at end of file diff --git a/docs/html/classParser__coll__graph.svg b/docs/html/classParser__coll__graph.svg deleted file mode 100644 index 847c9ff2..00000000 --- a/docs/html/classParser__coll__graph.svg +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - -Parser - - -Node1 - - -Parser - - - - - -Node1->Node1 - - - instance - - - -Node2 - - -SVGElement - - - - - -Node2->Node1 - - - root - - - -Node2->Node2 - - - parent - - - -Node3 - - -Vector2D< float > - - - - - -Node3->Node2 - - - position - - - -Node4 - - -mColor - - - - - -Node4->Node2 - - - fill -stroke - - - -Node4->Node4 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classPath__coll__graph.map b/docs/html/classPath__coll__graph.map deleted file mode 100644 index 06d33846..00000000 --- a/docs/html/classPath__coll__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/html/classPath__coll__graph.md5 b/docs/html/classPath__coll__graph.md5 deleted file mode 100644 index 324468fc..00000000 --- a/docs/html/classPath__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -fe1183df5f26cdcc7a75e96a1a5a3f5f \ No newline at end of file diff --git a/docs/html/classPath__coll__graph.svg b/docs/html/classPath__coll__graph.svg deleted file mode 100644 index 97fb1493..00000000 --- a/docs/html/classPath__coll__graph.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - -Path - - -Node1 - - -Path - - - - - -Node2 - - -SVGElement - - - - - -Node2->Node1 - - - - - -Node2->Node2 - - - parent - - - -Node3 - - -Vector2D< float > - - - - - -Node3->Node2 - - - position - - - -Node4 - - -mColor - - - - - -Node4->Node2 - - - fill -stroke - - - -Node4->Node4 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classPlygon.js b/docs/html/classPlygon.js deleted file mode 100644 index 4a5c4678..00000000 --- a/docs/html/classPlygon.js +++ /dev/null @@ -1,8 +0,0 @@ -var classPlygon = -[ - [ "Plygon", "classPlygon.html#ac3f4fb224f4f84c3bd6e41093cd847cd", null ], - [ "getClass", "classPlygon.html#aab00a0d0230ea320271e96c326c6b919", null ], - [ "getFillRule", "classPlygon.html#a97b4c008055f2b2514e7a101fcbdb9b3", null ], - [ "setFillRule", "classPlygon.html#ac18faac47e1fa6bce3c7167f1e87bef4", null ], - [ "fill_rule", "classPlygon.html#a91c207c3142183a6714a700ee468a359", null ] -]; \ No newline at end of file diff --git a/docs/html/classPlygon__coll__graph.map b/docs/html/classPlygon__coll__graph.map deleted file mode 100644 index 33bca63c..00000000 --- a/docs/html/classPlygon__coll__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/docs/html/classPlygon__coll__graph.md5 b/docs/html/classPlygon__coll__graph.md5 deleted file mode 100644 index b1e272e1..00000000 --- a/docs/html/classPlygon__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -215ad64170b2449f8e7a05a34b58baf3 \ No newline at end of file diff --git a/docs/html/classPlygon__coll__graph.svg b/docs/html/classPlygon__coll__graph.svg deleted file mode 100644 index c79b8399..00000000 --- a/docs/html/classPlygon__coll__graph.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - -Plygon - - -Node1 - - -Plygon - - - - - -Node2 - - -PolyShape - - - - - -Node2->Node1 - - - - - -Node3 - - -SVGElement - - - - - -Node3->Node2 - - - - - -Node3->Node3 - - - parent - - - -Node4 - - -Vector2D< float > - - - - - -Node4->Node3 - - - position - - - -Node5 - - -mColor - - - - - -Node5->Node3 - - - fill -stroke - - - -Node5->Node5 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classPlyline.js b/docs/html/classPlyline.js deleted file mode 100644 index 88f7f17f..00000000 --- a/docs/html/classPlyline.js +++ /dev/null @@ -1,8 +0,0 @@ -var classPlyline = -[ - [ "Plyline", "classPlyline.html#a8bf7677d7adb76f146607ef1aaa49bd3", null ], - [ "getClass", "classPlyline.html#a5b9d86c75604d329037cd47e8ba3d5b9", null ], - [ "getFillRule", "classPlyline.html#ad386f98aea56800553a8268ab78ce374", null ], - [ "setFillRule", "classPlyline.html#ab6d84eb184e27476516fb6d9aa9e9cf4", null ], - [ "fill_rule", "classPlyline.html#a71e8a6587d4656f6381e06925ad305d6", null ] -]; \ No newline at end of file diff --git a/docs/html/classPlyline__coll__graph.map b/docs/html/classPlyline__coll__graph.map deleted file mode 100644 index d92f71d9..00000000 --- a/docs/html/classPlyline__coll__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/docs/html/classPlyline__coll__graph.md5 b/docs/html/classPlyline__coll__graph.md5 deleted file mode 100644 index 36bbbdfa..00000000 --- a/docs/html/classPlyline__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -423ffae4b7e65c9c7bde294ff4aa995b \ No newline at end of file diff --git a/docs/html/classPlyline__coll__graph.svg b/docs/html/classPlyline__coll__graph.svg deleted file mode 100644 index a249b952..00000000 --- a/docs/html/classPlyline__coll__graph.svg +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - -Plyline - - -Node1 - - -Plyline - - - - - -Node2 - - -PolyShape - - - - - -Node2->Node1 - - - - - -Node3 - - -SVGElement - - - - - -Node3->Node2 - - - - - -Node3->Node3 - - - parent - - - -Node4 - - -Vector2D< float > - - - - - -Node4->Node3 - - - position - - - -Node5 - - -mColor - - - - - -Node5->Node3 - - - fill -stroke - - - -Node5->Node5 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classPolyShape__coll__graph.map b/docs/html/classPolyShape__coll__graph.map deleted file mode 100644 index 3509526a..00000000 --- a/docs/html/classPolyShape__coll__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/html/classPolyShape__coll__graph.md5 b/docs/html/classPolyShape__coll__graph.md5 deleted file mode 100644 index 8238f663..00000000 --- a/docs/html/classPolyShape__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -4031ffa6a59b9c41b807b3c13d3f1db8 \ No newline at end of file diff --git a/docs/html/classPolyShape__coll__graph.svg b/docs/html/classPolyShape__coll__graph.svg deleted file mode 100644 index 9e781e65..00000000 --- a/docs/html/classPolyShape__coll__graph.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - -PolyShape - - -Node1 - - -PolyShape - - - - - -Node2 - - -SVGElement - - - - - -Node2->Node1 - - - - - -Node2->Node2 - - - parent - - - -Node3 - - -Vector2D< float > - - - - - -Node3->Node2 - - - position - - - -Node4 - - -mColor - - - - - -Node4->Node2 - - - fill -stroke - - - -Node4->Node4 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classPolyShape__inherit__graph.md5 b/docs/html/classPolyShape__inherit__graph.md5 deleted file mode 100644 index a18a9aaf..00000000 --- a/docs/html/classPolyShape__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -fa728a9e0115904419bad92b05fd8fc7 \ No newline at end of file diff --git a/docs/html/classRect__coll__graph.map b/docs/html/classRect__coll__graph.map deleted file mode 100644 index f37c6dcd..00000000 --- a/docs/html/classRect__coll__graph.map +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/docs/html/classRect__coll__graph.md5 b/docs/html/classRect__coll__graph.md5 deleted file mode 100644 index c1a4b965..00000000 --- a/docs/html/classRect__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -e07f59b9992f65d809f23da229df32e7 \ No newline at end of file diff --git a/docs/html/classRect__coll__graph.svg b/docs/html/classRect__coll__graph.svg deleted file mode 100644 index 8b6e7297..00000000 --- a/docs/html/classRect__coll__graph.svg +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - -Rect - - -Node1 - - -Rect - - - - - -Node2 - - -PolyShape - - - - - -Node2->Node1 - - - - - -Node3 - - -SVGElement - - - - - -Node3->Node2 - - - - - -Node3->Node3 - - - parent - - - -Node4 - - -Vector2D< float > - - - - - -Node4->Node1 - - - radius - - - -Node4->Node3 - - - position - - - -Node5 - - -mColor - - - - - -Node5->Node3 - - - fill -stroke - - - -Node5->Node5 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classRect__inherit__graph.map b/docs/html/classRect__inherit__graph.map deleted file mode 100644 index 8aadc8fc..00000000 --- a/docs/html/classRect__inherit__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/html/classRect__inherit__graph.md5 b/docs/html/classRect__inherit__graph.md5 deleted file mode 100644 index 87865cf5..00000000 --- a/docs/html/classRect__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -fb3ec957207ddefd0c0a784b858b3c61 \ No newline at end of file diff --git a/docs/html/classRenderer.html b/docs/html/classRenderer.html deleted file mode 100644 index b05c4392..00000000 --- a/docs/html/classRenderer.html +++ /dev/null @@ -1,1086 +0,0 @@ - - - - - - - - - - - - - - - - - - -svg-reader: Renderer Class Reference - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          -
                                                          - - - - - - -
                                                          -
                                                          svg-reader -  0.2 -
                                                          -
                                                          Parse and render SVG files, handle user interactions.
                                                          -
                                                          -
                                                          - - - - - - - -
                                                          -
                                                          - -
                                                          -
                                                          -
                                                          - -
                                                          - -
                                                          -
                                                          - - -
                                                          - -
                                                          - - -
                                                          - -

                                                          Singleton class responsible for rendering shapes using GDI+. - More...

                                                          - -

                                                          #include <Renderer.hpp>

                                                          -
                                                          -Collaboration diagram for Renderer:
                                                          -
                                                          -
                                                          -
                                                          [legend]
                                                          - - - - - - - - - - - -

                                                          -Public Member Functions

                                                          Renderer (const Renderer &)=delete
                                                           Deleted copy constructor to enforce the singleton pattern.
                                                           
                                                          -void operator= (const Renderer &)=delete
                                                           Deleted copy assignment operator to enforce the singleton pattern.
                                                           
                                                          void draw (Gdiplus::Graphics &graphics, Group *group) const
                                                           Draws a shape using Gdiplus::Graphics based on its type. More...
                                                           
                                                          - - - - -

                                                          -Static Public Member Functions

                                                          static RenderergetInstance ()
                                                           Gets the singleton instance of the Renderer class. More...
                                                           
                                                          - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

                                                          -Private Member Functions

                                                          void applyTransform (std::vector< std::string > transform_order, Gdiplus::Graphics &graphics) const
                                                           Utility function to apply a series of transformations to the graphics context. More...
                                                           
                                                          void drawLine (Gdiplus::Graphics &graphics, Line *line) const
                                                           Draws a line shape using Gdiplus::Graphics. More...
                                                           
                                                          void drawRectangle (Gdiplus::Graphics &graphics, Rect *rectangle) const
                                                           Draws a rectangle shape using Gdiplus::Graphics. More...
                                                           
                                                          void drawCircle (Gdiplus::Graphics &graphics, Circle *circle) const
                                                           Draws a circle shape using Gdiplus::Graphics. More...
                                                           
                                                          void drawEllipse (Gdiplus::Graphics &graphics, Ell *ellipse) const
                                                           Draws an ellipse shape using Gdiplus::Graphics. More...
                                                           
                                                          void drawPolygon (Gdiplus::Graphics &graphics, Plygon *polygon) const
                                                           Draws a polygon shape using Gdiplus::Graphics. More...
                                                           
                                                          void drawText (Gdiplus::Graphics &graphics, Text *text) const
                                                           Draws text using Gdiplus::Graphics. More...
                                                           
                                                          void drawPolyline (Gdiplus::Graphics &graphics, Plyline *polyline) const
                                                           Draws a polyline shape using Gdiplus::Graphics. More...
                                                           
                                                          void drawPath (Gdiplus::Graphics &graphics, Path *path) const
                                                           Draws a path shape using Gdiplus::Graphics. More...
                                                           
                                                          Renderer ()
                                                           Private constructor for the Renderer class.
                                                           
                                                          - - - - -

                                                          -Static Private Attributes

                                                          -static Rendererinstance = nullptr
                                                           Singleton instance of the Renderer class.
                                                           
                                                          -

                                                          Detailed Description

                                                          -

                                                          Singleton class responsible for rendering shapes using GDI+.

                                                          -

                                                          The Renderer class provides a singleton instance for drawing SVGElement-based shapes using Gdiplus::Graphics. It supports various shapes such as lines, rectangles, circles, ellipses, text, polygons, polylines, and paths. The shapes are drawn in a polymorphic manner using the draw function, which takes a Gdiplus::Graphics context and an SVGElement. The draw function dynamically determines the type of the shape and invokes the corresponding draw method to render the shape with all necessary details. The detailed information for each shape is obtained from an SVG file and processed through the draw function in a polymorphic way.

                                                          - -

                                                          Definition at line 24 of file Renderer.hpp.

                                                          -

                                                          Member Function Documentation

                                                          - -

                                                          ◆ applyTransform()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          void Renderer::applyTransform (std::vector< std::string > transform_order,
                                                          Gdiplus::Graphics & graphics 
                                                          ) const
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Utility function to apply a series of transformations to the graphics context.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          transform_orderThe order in which transformations should be applied.
                                                          graphicsThe Gdiplus::Graphics context to apply transformations to.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 46 of file Renderer.cpp.

                                                          -
                                                          47  {
                                                          -
                                                          48  for (auto type : transform_order) {
                                                          -
                                                          49  if (type.find("translate") != std::string::npos) {
                                                          -
                                                          50  float trans_x = getTranslate(type).first,
                                                          -
                                                          51  trans_y = getTranslate(type).second;
                                                          -
                                                          52  graphics.TranslateTransform(trans_x, trans_y);
                                                          -
                                                          53  } else if (type.find("rotate") != std::string::npos) {
                                                          -
                                                          54  float degree = getRotate(type);
                                                          -
                                                          55  graphics.RotateTransform(degree);
                                                          -
                                                          56  } else if (type.find("scale") != std::string::npos) {
                                                          -
                                                          57  if (type.find(",") != std::string::npos) {
                                                          -
                                                          58  float scale_x = getScaleXY(type).first,
                                                          -
                                                          59  scale_y = getScaleXY(type).second;
                                                          -
                                                          60  graphics.ScaleTransform(scale_x, scale_y);
                                                          -
                                                          61  } else {
                                                          -
                                                          62  float scale = getScale(type);
                                                          -
                                                          63  graphics.ScaleTransform(scale, scale);
                                                          -
                                                          64  }
                                                          -
                                                          65  }
                                                          -
                                                          66  }
                                                          -
                                                          67 }
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ draw()

                                                          - -
                                                          -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          void Renderer::draw (Gdiplus::Graphics & graphics,
                                                          Groupgroup 
                                                          ) const
                                                          -
                                                          - -

                                                          Draws a shape using Gdiplus::Graphics based on its type.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          graphicsThe Gdiplus::Graphics context for drawing.
                                                          shapeThe SVGElement representing the shape to be drawn.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 69 of file Renderer.cpp.

                                                          -
                                                          69  {
                                                          -
                                                          70  for (auto shape : group->getElements()) {
                                                          -
                                                          71  Gdiplus::Matrix original;
                                                          -
                                                          72  graphics.GetTransform(&original);
                                                          -
                                                          73  applyTransform(shape->getTransforms(), graphics);
                                                          -
                                                          74  if (shape->getClass() == "Group") {
                                                          -
                                                          75  Group* group = dynamic_cast< Group* >(shape);
                                                          -
                                                          76  draw(graphics, group);
                                                          -
                                                          77  } else if (shape->getClass() == "Polyline") {
                                                          -
                                                          78  Plyline* polyline = dynamic_cast< Plyline* >(shape);
                                                          -
                                                          79  drawPolyline(graphics, polyline);
                                                          -
                                                          80  } else if (shape->getClass() == "Text") {
                                                          -
                                                          81  Text* text = dynamic_cast< Text* >(shape);
                                                          -
                                                          82  drawText(graphics, text);
                                                          -
                                                          83  } else if (shape->getClass() == "Rect") {
                                                          -
                                                          84  Rect* rectangle = dynamic_cast< Rect* >(shape);
                                                          -
                                                          85  drawRectangle(graphics, rectangle);
                                                          -
                                                          86  } else if (shape->getClass() == "Circle") {
                                                          -
                                                          87  Circle* circle = dynamic_cast< Circle* >(shape);
                                                          -
                                                          88  drawCircle(graphics, circle);
                                                          -
                                                          89  } else if (shape->getClass() == "Ellipse") {
                                                          -
                                                          90  Ell* ellipse = dynamic_cast< Ell* >(shape);
                                                          -
                                                          91  drawEllipse(graphics, ellipse);
                                                          -
                                                          92  } else if (shape->getClass() == "Line") {
                                                          -
                                                          93  Line* line = dynamic_cast< Line* >(shape);
                                                          -
                                                          94  drawLine(graphics, line);
                                                          -
                                                          95  } else if (shape->getClass() == "Polygon") {
                                                          -
                                                          96  Plygon* polygon = dynamic_cast< Plygon* >(shape);
                                                          -
                                                          97  drawPolygon(graphics, polygon);
                                                          -
                                                          98  } else if (shape->getClass() == "Path") {
                                                          -
                                                          99  Path* path = dynamic_cast< Path* >(shape);
                                                          -
                                                          100  drawPath(graphics, path);
                                                          -
                                                          101  }
                                                          -
                                                          102  graphics.SetTransform(&original);
                                                          -
                                                          103  }
                                                          -
                                                          104 }
                                                          -
                                                          Represents a circle in 2D space.
                                                          Definition: Circle.hpp:13
                                                          -
                                                          Represents an ellipse in 2D space.
                                                          Definition: Ellipse.hpp:12
                                                          -
                                                          A composite class that contains a vector of shape pointers (polymorphic).
                                                          Definition: Group.hpp:19
                                                          -
                                                          std::vector< SVGElement * > getElements() const
                                                          Gets the vector of shapes in the composite group.
                                                          Definition: Group.cpp:22
                                                          -
                                                          Represents a line in 2D space.
                                                          Definition: Line.hpp:12
                                                          -
                                                          Represents a path element in 2D space.
                                                          Definition: Path.hpp:24
                                                          -
                                                          Represents a polygon in 2D space.
                                                          Definition: Polygon.hpp:12
                                                          -
                                                          Represents a polyline in 2D space.
                                                          Definition: Polyline.hpp:12
                                                          -
                                                          Represents a rectangle in 2D space.
                                                          Definition: Rect.hpp:13
                                                          -
                                                          void draw(Gdiplus::Graphics &graphics, Group *group) const
                                                          Draws a shape using Gdiplus::Graphics based on its type.
                                                          Definition: Renderer.cpp:69
                                                          -
                                                          void drawPolygon(Gdiplus::Graphics &graphics, Plygon *polygon) const
                                                          Draws a polygon shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:182
                                                          -
                                                          void drawPolyline(Gdiplus::Graphics &graphics, Plyline *polyline) const
                                                          Draws a polyline shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:254
                                                          -
                                                          void drawPath(Gdiplus::Graphics &graphics, Path *path) const
                                                          Draws a path shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:286
                                                          -
                                                          void drawText(Gdiplus::Graphics &graphics, Text *text) const
                                                          Draws text using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:212
                                                          -
                                                          void applyTransform(std::vector< std::string > transform_order, Gdiplus::Graphics &graphics) const
                                                          Utility function to apply a series of transformations to the graphics context.
                                                          Definition: Renderer.cpp:46
                                                          -
                                                          void drawCircle(Gdiplus::Graphics &graphics, Circle *circle) const
                                                          Draws a circle shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:145
                                                          -
                                                          void drawLine(Gdiplus::Graphics &graphics, Line *line) const
                                                          Draws a line shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:106
                                                          -
                                                          void drawRectangle(Gdiplus::Graphics &graphics, Rect *rectangle) const
                                                          Draws a rectangle shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:115
                                                          -
                                                          void drawEllipse(Gdiplus::Graphics &graphics, Ell *ellipse) const
                                                          Draws an ellipse shape using Gdiplus::Graphics.
                                                          Definition: Renderer.cpp:163
                                                          -
                                                          Represents text in 2D space.
                                                          Definition: Text.hpp:12
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ drawCircle()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          void Renderer::drawCircle (Gdiplus::Graphics & graphics,
                                                          Circlecircle 
                                                          ) const
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Draws a circle shape using Gdiplus::Graphics.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          graphicsThe Gdiplus::Graphics context for drawing.
                                                          circleThe Circle object representing the circle to be drawn.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 145 of file Renderer.cpp.

                                                          -
                                                          145  {
                                                          -
                                                          146  mColor fill_color = circle->getFillColor();
                                                          -
                                                          147  mColor outline_color = circle->getOutlineColor();
                                                          -
                                                          148  Gdiplus::Pen circleOutline(Gdiplus::Color(outline_color.a, outline_color.r,
                                                          -
                                                          149  outline_color.g, outline_color.b),
                                                          -
                                                          150  circle->getOutlineThickness());
                                                          -
                                                          151  Gdiplus::SolidBrush circleFill(
                                                          -
                                                          152  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          153  graphics.FillEllipse(&circleFill,
                                                          -
                                                          154  circle->getPosition().x - circle->getRadius().x,
                                                          -
                                                          155  circle->getPosition().y - circle->getRadius().y,
                                                          -
                                                          156  circle->getRadius().x * 2, circle->getRadius().y * 2);
                                                          -
                                                          157  graphics.DrawEllipse(&circleOutline,
                                                          -
                                                          158  circle->getPosition().x - circle->getRadius().x,
                                                          -
                                                          159  circle->getPosition().y - circle->getRadius().y,
                                                          -
                                                          160  circle->getRadius().x * 2, circle->getRadius().x * 2);
                                                          -
                                                          161 }
                                                          -
                                                          Vector2Df getRadius() const
                                                          Gets the radius of the ellipse.
                                                          Definition: Ellipse.cpp:18
                                                          -
                                                          float getOutlineThickness() const
                                                          Gets the outline thickness of the shape.
                                                          Definition: SVGElement.cpp:20
                                                          -
                                                          Vector2Df getPosition() const
                                                          Get the current position of the shape.
                                                          Definition: SVGElement.cpp:31
                                                          -
                                                          const mColor & getOutlineColor() const
                                                          Gets the outline color of the shape.
                                                          Definition: SVGElement.cpp:14
                                                          -
                                                          const mColor & getFillColor() const
                                                          Gets the fill color of the shape.
                                                          Definition: SVGElement.cpp:10
                                                          -
                                                          T x
                                                          X coordinate of the vector.
                                                          Definition: Vector2D.hpp:45
                                                          -
                                                          T y
                                                          Y coordinate of the vector.
                                                          Definition: Vector2D.hpp:46
                                                          -
                                                          Utility class for manipulating RGBA mColors.
                                                          Definition: Color.hpp:11
                                                          -
                                                          int g
                                                          Green component.
                                                          Definition: Color.hpp:61
                                                          -
                                                          int r
                                                          Red component.
                                                          Definition: Color.hpp:60
                                                          -
                                                          int a
                                                          Alpha (opacity) component.
                                                          Definition: Color.hpp:63
                                                          -
                                                          int b
                                                          Blue component.
                                                          Definition: Color.hpp:62
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ drawEllipse()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          void Renderer::drawEllipse (Gdiplus::Graphics & graphics,
                                                          Ellellipse 
                                                          ) const
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Draws an ellipse shape using Gdiplus::Graphics.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          graphicsThe Gdiplus::Graphics context for drawing.
                                                          ellipseThe Ell object representing the ellipse to be drawn.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 163 of file Renderer.cpp.

                                                          -
                                                          163  {
                                                          -
                                                          164  mColor fill_color = ellipse->getFillColor();
                                                          -
                                                          165  mColor outline_color = ellipse->getOutlineColor();
                                                          -
                                                          166  Gdiplus::Pen ellipseOutline(
                                                          -
                                                          167  Gdiplus::Color(outline_color.a, outline_color.r, outline_color.g,
                                                          -
                                                          168  outline_color.b),
                                                          -
                                                          169  ellipse->getOutlineThickness());
                                                          -
                                                          170  Gdiplus::SolidBrush ellipseFill(
                                                          -
                                                          171  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          172  graphics.FillEllipse(
                                                          -
                                                          173  &ellipseFill, ellipse->getPosition().x - ellipse->getRadius().x,
                                                          -
                                                          174  ellipse->getPosition().y - ellipse->getRadius().y,
                                                          -
                                                          175  ellipse->getRadius().x * 2, ellipse->getRadius().y * 2);
                                                          -
                                                          176  graphics.DrawEllipse(
                                                          -
                                                          177  &ellipseOutline, ellipse->getPosition().x - ellipse->getRadius().x,
                                                          -
                                                          178  ellipse->getPosition().y - ellipse->getRadius().y,
                                                          -
                                                          179  ellipse->getRadius().x * 2, ellipse->getRadius().y * 2);
                                                          -
                                                          180 }
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ drawLine()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          void Renderer::drawLine (Gdiplus::Graphics & graphics,
                                                          Lineline 
                                                          ) const
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Draws a line shape using Gdiplus::Graphics.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          graphicsThe Gdiplus::Graphics context for drawing.
                                                          lineThe Line object representing the line to be drawn.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 106 of file Renderer.cpp.

                                                          -
                                                          106  {
                                                          -
                                                          107  mColor color = line->getOutlineColor();
                                                          -
                                                          108  Gdiplus::Pen linePen(Gdiplus::Color(color.a, color.r, color.g, color.b),
                                                          -
                                                          109  line->getOutlineThickness());
                                                          -
                                                          110  Gdiplus::PointF startPoint(line->getPosition().x, line->getPosition().y);
                                                          -
                                                          111  Gdiplus::PointF endPoint(line->getDirection().x, line->getDirection().y);
                                                          -
                                                          112  graphics.DrawLine(&linePen, startPoint, endPoint);
                                                          -
                                                          113 }
                                                          -
                                                          Vector2Df getDirection() const
                                                          Gets the direction of the line.
                                                          Definition: Line.cpp:19
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ drawPath()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          void Renderer::drawPath (Gdiplus::Graphics & graphics,
                                                          Pathpath 
                                                          ) const
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Draws a path shape using Gdiplus::Graphics.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          graphicsThe Gdiplus::Graphics context for drawing.
                                                          pathThe Path object representing the path to be drawn.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 286 of file Renderer.cpp.

                                                          -
                                                          286  {
                                                          -
                                                          287  mColor outline_color = path->getOutlineColor();
                                                          -
                                                          288  mColor fill_color = path->getFillColor();
                                                          -
                                                          289  Gdiplus::Pen pathPen(Gdiplus::Color(outline_color.a, outline_color.r,
                                                          -
                                                          290  outline_color.g, outline_color.b),
                                                          -
                                                          291  path->getOutlineThickness());
                                                          -
                                                          292  Gdiplus::SolidBrush pathFill(
                                                          -
                                                          293  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          294 
                                                          -
                                                          295  Gdiplus::FillMode fillMode;
                                                          -
                                                          296  if (path->getFillRule() == "evenodd") {
                                                          -
                                                          297  fillMode = Gdiplus::FillModeAlternate;
                                                          -
                                                          298  } else if (path->getFillRule() == "nonzero") {
                                                          -
                                                          299  fillMode = Gdiplus::FillModeWinding;
                                                          -
                                                          300  }
                                                          -
                                                          301  Gdiplus::GraphicsPath gdiPath(fillMode);
                                                          -
                                                          302 
                                                          -
                                                          303  const std::vector< PathPoint >& points = path->getPoints();
                                                          -
                                                          304  int n = points.size();
                                                          -
                                                          305  Vector2Df firstPoint{0, 0}, curPoint{0, 0};
                                                          -
                                                          306 
                                                          -
                                                          307  for (int i = 0; i < n; ++i) {
                                                          -
                                                          308  if (points[i].TC == 'M') {
                                                          -
                                                          309  firstPoint = points[i].Point;
                                                          -
                                                          310  gdiPath.StartFigure();
                                                          -
                                                          311  curPoint = firstPoint;
                                                          -
                                                          312  } else if (points[i].TC == 'm') {
                                                          -
                                                          313  firstPoint.x = curPoint.x + points[i].Point.x;
                                                          -
                                                          314  firstPoint.y = curPoint.y + points[i].Point.y;
                                                          -
                                                          315  gdiPath.StartFigure();
                                                          -
                                                          316  curPoint = firstPoint;
                                                          -
                                                          317  } else if (points[i].TC == 'L') {
                                                          -
                                                          318  gdiPath.AddLine(curPoint.x, curPoint.y, points[i].Point.x,
                                                          -
                                                          319  points[i].Point.y);
                                                          -
                                                          320  curPoint = points[i].Point;
                                                          -
                                                          321  } else if (points[i].TC == 'l') {
                                                          -
                                                          322  Vector2Df endPoint{curPoint.x + points[i].Point.x,
                                                          -
                                                          323  curPoint.y + points[i].Point.y};
                                                          -
                                                          324  gdiPath.AddLine(curPoint.x, curPoint.y, endPoint.x, endPoint.y);
                                                          -
                                                          325  curPoint = endPoint;
                                                          -
                                                          326  } else if (points[i].TC == 'H') {
                                                          -
                                                          327  Vector2Df endPoint{points[i].Point.x, curPoint.y};
                                                          -
                                                          328  gdiPath.AddLine(curPoint.x, curPoint.y, endPoint.x, endPoint.y);
                                                          -
                                                          329  curPoint = endPoint;
                                                          -
                                                          330  } else if (points[i].TC == 'h') {
                                                          -
                                                          331  Vector2Df endPoint{curPoint.x + points[i].Point.x, curPoint.y};
                                                          -
                                                          332  gdiPath.AddLine(curPoint.x, curPoint.y, endPoint.x, endPoint.y);
                                                          -
                                                          333  curPoint = endPoint;
                                                          -
                                                          334  } else if (points[i].TC == 'V') {
                                                          -
                                                          335  Vector2Df endPoint{curPoint.x, points[i].Point.y};
                                                          -
                                                          336  gdiPath.AddLine(curPoint.x, curPoint.y, endPoint.x, endPoint.y);
                                                          -
                                                          337  curPoint = endPoint;
                                                          -
                                                          338  } else if (points[i].TC == 'v') {
                                                          -
                                                          339  Vector2Df endPoint{curPoint.x, curPoint.y + points[i].Point.y};
                                                          -
                                                          340  gdiPath.AddLine(curPoint.x, curPoint.y, endPoint.x, endPoint.y);
                                                          -
                                                          341  curPoint = endPoint;
                                                          -
                                                          342  } else if (points[i].TC == 'C') {
                                                          -
                                                          343  if (i + 2 < n) {
                                                          -
                                                          344  Vector2Df controlPoint1 = points[i].Point;
                                                          -
                                                          345  Vector2Df controlPoint2 = points[i + 1].Point;
                                                          -
                                                          346  Vector2Df controlPoint3 = points[i + 2].Point;
                                                          -
                                                          347  gdiPath.AddBezier(curPoint.x, curPoint.y, controlPoint1.x,
                                                          -
                                                          348  controlPoint1.y, controlPoint2.x,
                                                          -
                                                          349  controlPoint2.y, controlPoint3.x,
                                                          -
                                                          350  controlPoint3.y);
                                                          -
                                                          351  i += 2;
                                                          -
                                                          352  curPoint = controlPoint3;
                                                          -
                                                          353  }
                                                          -
                                                          354  } else if (points[i].TC == 'c') {
                                                          -
                                                          355  if (i + 2 < n) {
                                                          -
                                                          356  Vector2Df controlPoint1 =
                                                          -
                                                          357  Vector2Df{curPoint.x + points[i].Point.x,
                                                          -
                                                          358  curPoint.y + points[i].Point.y};
                                                          -
                                                          359  Vector2Df controlPoint2 =
                                                          -
                                                          360  Vector2Df{curPoint.x + points[i + 1].Point.x,
                                                          -
                                                          361  curPoint.y + points[i + 1].Point.y};
                                                          -
                                                          362  Vector2Df controlPoint3 =
                                                          -
                                                          363  Vector2Df{curPoint.x + points[i + 2].Point.x,
                                                          -
                                                          364  curPoint.y + points[i + 2].Point.y};
                                                          -
                                                          365  gdiPath.AddBezier(curPoint.x, curPoint.y, controlPoint1.x,
                                                          -
                                                          366  controlPoint1.y, controlPoint2.x,
                                                          -
                                                          367  controlPoint2.y, controlPoint3.x,
                                                          -
                                                          368  controlPoint3.y);
                                                          -
                                                          369  i += 2;
                                                          -
                                                          370  curPoint = controlPoint3;
                                                          -
                                                          371  }
                                                          -
                                                          372  } else if (points[i].TC == 'Z' || points[i].TC == 'z') {
                                                          -
                                                          373  gdiPath.CloseFigure();
                                                          -
                                                          374  curPoint = firstPoint;
                                                          -
                                                          375  }
                                                          -
                                                          376  }
                                                          -
                                                          377  graphics.FillPath(&pathFill, &gdiPath);
                                                          -
                                                          378  graphics.DrawPath(&pathPen, &gdiPath);
                                                          -
                                                          379 }
                                                          -
                                                          std::string getFillRule() const
                                                          Gets the current fill rule of the path.
                                                          Definition: Path.cpp:17
                                                          -
                                                          std::vector< PathPoint > getPoints() const
                                                          Gets the vector of points in the path.
                                                          Definition: Path.cpp:13
                                                          - -
                                                          -
                                                          -
                                                          - -

                                                          ◆ drawPolygon()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          void Renderer::drawPolygon (Gdiplus::Graphics & graphics,
                                                          Plygonpolygon 
                                                          ) const
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Draws a polygon shape using Gdiplus::Graphics.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          graphicsThe Gdiplus::Graphics context for drawing.
                                                          polygonThe Plygon object representing the polygon to be drawn.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 182 of file Renderer.cpp.

                                                          -
                                                          182  {
                                                          -
                                                          183  mColor fill_color = polygon->getFillColor();
                                                          -
                                                          184  mColor outline_color = polygon->getOutlineColor();
                                                          -
                                                          185  Gdiplus::Pen polygonOutline(
                                                          -
                                                          186  Gdiplus::Color(outline_color.a, outline_color.r, outline_color.g,
                                                          -
                                                          187  outline_color.b),
                                                          -
                                                          188  polygon->getOutlineThickness());
                                                          -
                                                          189  Gdiplus::SolidBrush polygonFill(
                                                          -
                                                          190  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          191 
                                                          -
                                                          192  Gdiplus::PointF* points = new Gdiplus::PointF[polygon->getPoints().size()];
                                                          -
                                                          193  int idx = 0;
                                                          -
                                                          194  const std::vector< Vector2Df >& vertices = polygon->getPoints();
                                                          -
                                                          195  for (const Vector2Df vertex : vertices) {
                                                          -
                                                          196  points[idx++] = Gdiplus::PointF(vertex.x, vertex.y);
                                                          -
                                                          197  }
                                                          -
                                                          198 
                                                          -
                                                          199  Gdiplus::FillMode fillMode;
                                                          -
                                                          200  if (polygon->getFillRule() == "evenodd") {
                                                          -
                                                          201  fillMode = Gdiplus::FillModeAlternate;
                                                          -
                                                          202  } else if (polygon->getFillRule() == "nonzero") {
                                                          -
                                                          203  fillMode = Gdiplus::FillModeWinding;
                                                          -
                                                          204  }
                                                          -
                                                          205  graphics.FillPolygon(&polygonFill, points, idx, fillMode);
                                                          -
                                                          206  graphics.DrawPolygon(&polygonOutline, points, idx);
                                                          -
                                                          207  delete[] points;
                                                          -
                                                          208 }
                                                          -
                                                          std::string getFillRule() const
                                                          Gets the fill rule of the polygon.
                                                          Definition: Polygon.cpp:10
                                                          -
                                                          const std::vector< Vector2Df > & getPoints() const
                                                          Gets the total number of vertices representing the shape.
                                                          Definition: PolyShape.cpp:12
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ drawPolyline()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          void Renderer::drawPolyline (Gdiplus::Graphics & graphics,
                                                          Plylinepolyline 
                                                          ) const
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Draws a polyline shape using Gdiplus::Graphics.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          graphicsThe Gdiplus::Graphics context for drawing.
                                                          polylineThe Plyline object representing the polyline to be drawn.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 254 of file Renderer.cpp.

                                                          -
                                                          255  {
                                                          -
                                                          256  mColor outline_color = polyline->getOutlineColor();
                                                          -
                                                          257  mColor fill_color = polyline->getFillColor();
                                                          -
                                                          258  Gdiplus::Pen polylinePen(Gdiplus::Color(outline_color.a, outline_color.r,
                                                          -
                                                          259  outline_color.g, outline_color.b),
                                                          -
                                                          260  polyline->getOutlineThickness());
                                                          -
                                                          261  Gdiplus::SolidBrush polylineFill(
                                                          -
                                                          262  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          263 
                                                          -
                                                          264  Gdiplus::FillMode fillMode;
                                                          -
                                                          265  if (polyline->getFillRule() == "evenodd") {
                                                          -
                                                          266  fillMode = Gdiplus::FillModeAlternate;
                                                          -
                                                          267  } else if (polyline->getFillRule() == "nonzero") {
                                                          -
                                                          268  fillMode = Gdiplus::FillModeWinding;
                                                          -
                                                          269  }
                                                          -
                                                          270  Gdiplus::GraphicsPath path(fillMode);
                                                          -
                                                          271  const std::vector< Vector2Df >& points = polyline->getPoints();
                                                          -
                                                          272  if (points.size() < 2) {
                                                          -
                                                          273  return;
                                                          -
                                                          274  }
                                                          -
                                                          275 
                                                          -
                                                          276  path.StartFigure();
                                                          -
                                                          277  path.AddLine(points[0].x, points[0].y, points[1].x, points[1].y);
                                                          -
                                                          278  for (size_t i = 2; i < points.size(); ++i) {
                                                          -
                                                          279  path.AddLine(points[i - 1].x, points[i - 1].y, points[i].x,
                                                          -
                                                          280  points[i].y);
                                                          -
                                                          281  }
                                                          -
                                                          282  graphics.FillPath(&polylineFill, &path);
                                                          -
                                                          283  graphics.DrawPath(&polylinePen, &path);
                                                          -
                                                          284 }
                                                          -
                                                          std::string getFillRule() const
                                                          Gets the fill rule of the polyline.
                                                          Definition: Polyline.cpp:12
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ drawRectangle()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          void Renderer::drawRectangle (Gdiplus::Graphics & graphics,
                                                          Rectrectangle 
                                                          ) const
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Draws a rectangle shape using Gdiplus::Graphics.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          graphicsThe Gdiplus::Graphics context for drawing.
                                                          rectangleThe Rect object representing the rectangle to be drawn.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 115 of file Renderer.cpp.

                                                          -
                                                          116  {
                                                          -
                                                          117  float x = rectangle->getPosition().x;
                                                          -
                                                          118  float y = rectangle->getPosition().y;
                                                          -
                                                          119  float width = rectangle->getWidth();
                                                          -
                                                          120  float height = rectangle->getHeight();
                                                          -
                                                          121  mColor fill_color = rectangle->getFillColor();
                                                          -
                                                          122  mColor outline_color = rectangle->getOutlineColor();
                                                          -
                                                          123  Gdiplus::Pen RectOutline(Gdiplus::Color(outline_color.a, outline_color.r,
                                                          -
                                                          124  outline_color.g, outline_color.b),
                                                          -
                                                          125  rectangle->getOutlineThickness());
                                                          -
                                                          126  Gdiplus::SolidBrush RectFill(
                                                          -
                                                          127  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          128  if (rectangle->getRadius().x != 0 || rectangle->getRadius().y != 0) {
                                                          -
                                                          129  float dx = rectangle->getRadius().x * 2;
                                                          -
                                                          130  float dy = rectangle->getRadius().y * 2;
                                                          -
                                                          131  Gdiplus::GraphicsPath path;
                                                          -
                                                          132  path.AddArc(x, y, dx, dy, 180, 90);
                                                          -
                                                          133  path.AddArc(x + width - dx, y, dx, dy, 270, 90);
                                                          -
                                                          134  path.AddArc(x + width - dx, y + height - dy, dx, dy, 0, 90);
                                                          -
                                                          135  path.AddArc(x, y + height - dy, dx, dy, 90, 90);
                                                          -
                                                          136  path.CloseFigure();
                                                          -
                                                          137  graphics.FillPath(&RectFill, &path);
                                                          -
                                                          138  graphics.DrawPath(&RectOutline, &path);
                                                          -
                                                          139  } else {
                                                          -
                                                          140  graphics.FillRectangle(&RectFill, x, y, width, height);
                                                          -
                                                          141  graphics.DrawRectangle(&RectOutline, x, y, width, height);
                                                          -
                                                          142  }
                                                          -
                                                          143 }
                                                          -
                                                          Vector2Df getRadius() const
                                                          Gets the radii of the rectangle.
                                                          Definition: Rect.cpp:34
                                                          -
                                                          float getHeight() const
                                                          Gets the height of the rectangle.
                                                          Definition: Rect.cpp:30
                                                          -
                                                          float getWidth() const
                                                          Gets the width of the rectangle.
                                                          Definition: Rect.cpp:22
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ drawText()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - - - - - - - - - - - - -
                                                          void Renderer::drawText (Gdiplus::Graphics & graphics,
                                                          Texttext 
                                                          ) const
                                                          -
                                                          -private
                                                          -
                                                          - -

                                                          Draws text using Gdiplus::Graphics.

                                                          -
                                                          Parameters
                                                          - - - -
                                                          graphicsThe Gdiplus::Graphics context for drawing.
                                                          textThe Text object representing the text to be drawn.
                                                          -
                                                          -
                                                          - -

                                                          Definition at line 212 of file Renderer.cpp.

                                                          -
                                                          212  {
                                                          -
                                                          213  mColor outline_color = text->getOutlineColor();
                                                          -
                                                          214  mColor fill_color = text->getFillColor();
                                                          -
                                                          215 
                                                          -
                                                          216  graphics.SetTextRenderingHint(Gdiplus::TextRenderingHintAntiAliasGridFit);
                                                          -
                                                          217 
                                                          -
                                                          218  Gdiplus::SolidBrush textFill(
                                                          -
                                                          219  Gdiplus::Color(fill_color.a, fill_color.r, fill_color.g, fill_color.b));
                                                          -
                                                          220 
                                                          -
                                                          221  Gdiplus::Pen textOutline(Gdiplus::Color(outline_color.a, outline_color.r,
                                                          -
                                                          222  outline_color.g, outline_color.b),
                                                          -
                                                          223  text->getOutlineThickness());
                                                          -
                                                          224 
                                                          -
                                                          225  Gdiplus::FontFamily fontFamily(L"Times New Roman");
                                                          -
                                                          226 
                                                          -
                                                          227  Gdiplus::PointF position(text->getPosition().x, text->getPosition().y);
                                                          -
                                                          228  Gdiplus::GraphicsPath path;
                                                          -
                                                          229 
                                                          -
                                                          230  std::wstring_convert< std::codecvt_utf8_utf16< wchar_t > > converter;
                                                          -
                                                          231  std::wstring wideContent = converter.from_bytes(text->getContent());
                                                          -
                                                          232  Gdiplus::StringFormat stringFormat;
                                                          -
                                                          233  if (text->getAnchor() == "middle") {
                                                          -
                                                          234  stringFormat.SetAlignment(Gdiplus::StringAlignmentCenter);
                                                          -
                                                          235  position.X += 7;
                                                          -
                                                          236  } else if (text->getAnchor() == "end") {
                                                          -
                                                          237  stringFormat.SetAlignment(Gdiplus::StringAlignmentFar);
                                                          -
                                                          238  position.X += 14;
                                                          -
                                                          239  } else {
                                                          -
                                                          240  stringFormat.SetAlignment(Gdiplus::StringAlignmentNear);
                                                          -
                                                          241  }
                                                          -
                                                          242  Gdiplus::FontStyle fontStyle = Gdiplus::FontStyleRegular;
                                                          -
                                                          243  if (text->getFontStyle() == "italic" || text->getFontStyle() == "oblique") {
                                                          -
                                                          244  fontStyle = Gdiplus::FontStyleItalic;
                                                          -
                                                          245  position.Y -= 1;
                                                          -
                                                          246  }
                                                          -
                                                          247 
                                                          -
                                                          248  path.AddString(wideContent.c_str(), wideContent.size(), &fontFamily,
                                                          -
                                                          249  fontStyle, text->getFontSize(), position, &stringFormat);
                                                          -
                                                          250  graphics.FillPath(&textFill, &path);
                                                          -
                                                          251  graphics.DrawPath(&textOutline, &path);
                                                          -
                                                          252 }
                                                          -
                                                          std::string getAnchor() const
                                                          Gets the anchor of the text.
                                                          Definition: Text.cpp:24
                                                          -
                                                          float getFontSize() const
                                                          Gets the font size of the text.
                                                          Definition: Text.cpp:16
                                                          -
                                                          std::string getFontStyle() const
                                                          Gets the style of the text.
                                                          Definition: Text.cpp:28
                                                          -
                                                          std::string getContent() const
                                                          Gets the string of the text.
                                                          Definition: Text.cpp:20
                                                          -
                                                          -
                                                          -
                                                          - -

                                                          ◆ getInstance()

                                                          - -
                                                          -
                                                          - - - - - -
                                                          - - - - - - - -
                                                          Renderer * Renderer::getInstance ()
                                                          -
                                                          -static
                                                          -
                                                          - -

                                                          Gets the singleton instance of the Renderer class.

                                                          -
                                                          Returns
                                                          The singleton instance of the Renderer class.
                                                          - -

                                                          Definition at line 7 of file Renderer.cpp.

                                                          -
                                                          7  {
                                                          -
                                                          8  if (instance == nullptr) {
                                                          -
                                                          9  instance = new Renderer();
                                                          -
                                                          10  }
                                                          -
                                                          11  return instance;
                                                          -
                                                          12 }
                                                          -
                                                          static Renderer * instance
                                                          Singleton instance of the Renderer class.
                                                          Definition: Renderer.hpp:133
                                                          -
                                                          Renderer()
                                                          Private constructor for the Renderer class.
                                                          Definition: Renderer.cpp:5
                                                          -
                                                          -
                                                          -
                                                          -
                                                          The documentation for this class was generated from the following files: -
                                                          -
                                                          - - - \ No newline at end of file diff --git a/docs/html/classSVGElement__coll__graph.map b/docs/html/classSVGElement__coll__graph.map deleted file mode 100644 index df2c247e..00000000 --- a/docs/html/classSVGElement__coll__graph.map +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/html/classSVGElement__coll__graph.md5 b/docs/html/classSVGElement__coll__graph.md5 deleted file mode 100644 index d7cead40..00000000 --- a/docs/html/classSVGElement__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -8abe0fc579e274a181f60254fc7b22a2 \ No newline at end of file diff --git a/docs/html/classSVGElement__coll__graph.svg b/docs/html/classSVGElement__coll__graph.svg deleted file mode 100644 index 764a571a..00000000 --- a/docs/html/classSVGElement__coll__graph.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - -SVGElement - - -Node1 - - -SVGElement - - - - - -Node1->Node1 - - - parent - - - -Node2 - - -Vector2D< float > - - - - - -Node2->Node1 - - - position - - - -Node3 - - -mColor - - - - - -Node3->Node1 - - - fill -stroke - - - -Node3->Node3 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classSVGElement__inherit__graph.md5 b/docs/html/classSVGElement__inherit__graph.md5 deleted file mode 100644 index d1c8747d..00000000 --- a/docs/html/classSVGElement__inherit__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -3c2571a504fb461f5a1d0458c9a52e64 \ No newline at end of file diff --git a/docs/html/classText__coll__graph.map b/docs/html/classText__coll__graph.map deleted file mode 100644 index 4bfa08c7..00000000 --- a/docs/html/classText__coll__graph.map +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/docs/html/classText__coll__graph.md5 b/docs/html/classText__coll__graph.md5 deleted file mode 100644 index bab964e6..00000000 --- a/docs/html/classText__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -d69915713521f83f3656fcaafadeb55a \ No newline at end of file diff --git a/docs/html/classText__coll__graph.svg b/docs/html/classText__coll__graph.svg deleted file mode 100644 index 74dd8207..00000000 --- a/docs/html/classText__coll__graph.svg +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - -Text - - -Node1 - - -Text - - - - - -Node2 - - -SVGElement - - - - - -Node2->Node1 - - - - - -Node2->Node2 - - - parent - - - -Node3 - - -Vector2D< float > - - - - - -Node3->Node2 - - - position - - - -Node4 - - -mColor - - - - - -Node4->Node2 - - - fill -stroke - - - -Node4->Node4 - - - Black -Blue -Cyan -Green -Magenta -Red -Transparent -White -Yellow - - - diff --git a/docs/html/classViewer__coll__graph.map b/docs/html/classViewer__coll__graph.map deleted file mode 100644 index 0ac7d52a..00000000 --- a/docs/html/classViewer__coll__graph.map +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/docs/html/classViewer__coll__graph.md5 b/docs/html/classViewer__coll__graph.md5 deleted file mode 100644 index fc695bef..00000000 --- a/docs/html/classViewer__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -d8d69b4027a68d18c51615110be12773 \ No newline at end of file diff --git a/docs/html/classViewer__coll__graph.svg b/docs/html/classViewer__coll__graph.svg deleted file mode 100644 index 2b9bd98b..00000000 --- a/docs/html/classViewer__coll__graph.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - -Viewer - - -Node1 - - -Viewer - - - - - -Node1->Node1 - - - instance - - - diff --git a/docs/html/functions.html b/docs/html/functions.html deleted file mode 100644 index 3cb81e8f..00000000 --- a/docs/html/functions.html +++ /dev/null @@ -1,662 +0,0 @@ - - - - - - - - - - - - - - - - - - -svg-reader: Class Members - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                                                          -
                                                          - - - - - - -
                                                          -
                                                          svg-reader -  0.2 -
                                                          -
                                                          Parse and render SVG files, handle user interactions.
                                                          -
                                                          -
                                                          - - - - - - - -
                                                          -
                                                          - -
                                                          -
                                                          -
                                                          - -
                                                          - -
                                                          -
                                                          - - -
                                                          - -
                                                          - -
                                                          -
                                                          Here is a list of all documented class members with links to the class documentation for each member:
                                                          - -

                                                          - a -

                                                          - - -

                                                          - b -

                                                          - - -

                                                          - c -

                                                          - - -

                                                          - d -

                                                          - - -

                                                          - e -

                                                            -
                                                          • Ell() -: Ell -
                                                          • -
                                                          - - -

                                                          - f -

                                                          - - -

                                                          - g -

                                                          - - -

                                                          - h -

                                                            -
                                                          • handleKeyDown() -: Viewer -
                                                          • -
                                                          • handleKeyEvent() -: Viewer -
                                                          • -
                                                          • handleLeftButtonDown() -: Viewer -
                                                          • -
                                                          • handleLeftButtonUp() -: Viewer -
                                                          • -
                                                          • handleMouseEvent() -: Viewer -
                                                          • -
                                                          • handleMouseMove() -: Viewer -
                                                          • -
                                                          • handleMouseWheel() -: Viewer -
                                                          • -
                                                          • height -: Rect -
                                                          • -
                                                          - - -

                                                          - i -

                                                          - - -

                                                          - l -

                                                          - - -

                                                          - m -

                                                          - - -

                                                          - n -

                                                          - - -

                                                          - o -

                                                          - - -

                                                          - p -

                                                          - - -

                                                          - r -

                                                          - - -

                                                          - s -

                                                          - - -

                                                          - t -

                                                          - - -

                                                          - v -

                                                          - - -

                                                          - w -

                                                          - - -

                                                          - x -

                                                          - - -

                                                          - y -

                                                          - - -

                                                          - z -

                                                          - - -

                                                          - ~ -

                                                          -
                                                          -
                                                          - - - \ No newline at end of file diff --git a/docs/html/inherit_graph_4.md5 b/docs/html/inherit_graph_4.md5 deleted file mode 100644 index 991e1b30..00000000 --- a/docs/html/inherit_graph_4.md5 +++ /dev/null @@ -1 +0,0 @@ -327ed9ca1ca02d174ae42d852c6bf1c6 \ No newline at end of file diff --git a/docs/html/navtreeindex0.js b/docs/html/navtreeindex0.js deleted file mode 100644 index 824dd06d..00000000 --- a/docs/html/navtreeindex0.js +++ /dev/null @@ -1,248 +0,0 @@ -var NAVTREEINDEX0 = -{ -"Circle_8cpp_source.html":[1,0,0,0,0], -"Circle_8hpp_source.html":[1,0,0,0,1], -"Color_8cpp_source.html":[1,0,0,0,2], -"Color_8hpp_source.html":[1,0,0,0,3], -"Ellipse_8cpp_source.html":[1,0,0,0,4], -"Ellipse_8hpp_source.html":[1,0,0,0,5], -"Graphics_8hpp_source.html":[1,0,0,1], -"Group_8cpp_source.html":[1,0,0,0,6], -"Group_8hpp_source.html":[1,0,0,0,7], -"Line_8cpp_source.html":[1,0,0,0,8], -"Line_8hpp_source.html":[1,0,0,0,9], -"Parser_8cpp_source.html":[1,0,0,3], -"Parser_8hpp_source.html":[1,0,0,4], -"Path_8cpp_source.html":[1,0,0,0,10], -"Path_8hpp_source.html":[1,0,0,0,11], -"PolyShape_8cpp_source.html":[1,0,0,0,16], -"PolyShape_8hpp_source.html":[1,0,0,0,17], -"Polygon_8cpp_source.html":[1,0,0,0,12], -"Polygon_8hpp_source.html":[1,0,0,0,13], -"Polyline_8cpp_source.html":[1,0,0,0,14], -"Polyline_8hpp_source.html":[1,0,0,0,15], -"Rect_8cpp_source.html":[1,0,0,0,18], -"Rect_8hpp_source.html":[1,0,0,0,19], -"Renderer_8cpp_source.html":[1,0,0,5], -"Renderer_8hpp_source.html":[1,0,0,6], -"SVGElement_8cpp_source.html":[1,0,0,0,20], -"SVGElement_8hpp_source.html":[1,0,0,0,21], -"Text_8cpp_source.html":[1,0,0,0,22], -"Text_8hpp_source.html":[1,0,0,0,23], -"Vector2D_8hpp_source.html":[1,0,0,0,24], -"Viewer_8cpp_source.html":[1,0,0,7], -"Viewer_8hpp_source.html":[1,0,0,8], -"annotated.html":[0,0], -"classCircle.html":[0,0,0], -"classCircle.html#a09523e46318092d42a5969a1da5613bb":[0,0,0,1], -"classCircle.html#a5d018c51bfa1fa3d1081e3deef5eddc0":[0,0,0,0], -"classEll.html":[0,0,1], -"classEll.html#a00d607a5238705b552ec61b4409b76c1":[0,0,1,2], -"classEll.html#a0d0a2a70c06878c5769bd7d092277892":[0,0,1,1], -"classEll.html#a1d6d60039d2405f2b7aa117206d128fb":[0,0,1,3], -"classEll.html#a4a9956ca82cb9f957e993fa0c0faced6":[0,0,1,0], -"classEll.html#a9f67131ba02c02fccf42c52f5f04525e":[0,0,1,4], -"classEll.html#af57a48abe0e2bc8806e73dfa7762388f":[0,0,1,5], -"classGroup.html":[0,0,2], -"classGroup.html#a070e010084eaac6131e1bf814d10d234":[0,0,2,5], -"classGroup.html#a123cdaf1fb7cdf873740757d3864a4a6":[0,0,2,1], -"classGroup.html#a310fa83ccb20841373c11b6b4ac1d336":[0,0,2,6], -"classGroup.html#a317fcd42fd61b83c0d932bd1eb2c753f":[0,0,2,4], -"classGroup.html#a42fa18c4215ad3669db32b78e22303fa":[0,0,2,7], -"classGroup.html#a6ff10d6fceb2a78103db2d9783de6f41":[0,0,2,9], -"classGroup.html#a7b74f9ac68e0504ccf2e2854b7355ff1":[0,0,2,0], -"classGroup.html#a9308f587c63720ccbe2bfd1bad868547":[0,0,2,8], -"classGroup.html#aed00a22ff227ee2657ae44a5cbcedf7c":[0,0,2,2], -"classGroup.html#af4dafed0506ca5e9ea9e1028b1504919":[0,0,2,3], -"classLine.html":[0,0,3], -"classLine.html#a3fe45077492213ef490739c6137200d1":[0,0,3,5], -"classLine.html#a745f295541d412b49dac89423bd957a6":[0,0,3,1], -"classLine.html#ab46a879365e623e8b360c2db54d76782":[0,0,3,4], -"classLine.html#ab6e165ec2c3f412d5e5a860b28a52b4c":[0,0,3,0], -"classLine.html#adb348ce7ddf4b500c3593b7126aa4451":[0,0,3,2], -"classLine.html#afe6672bc7667cf45739c46f9fc8cb237":[0,0,3,3], -"classParser.html":[0,0,5], -"classParser.html#a06952fa44f19fdb573c1355ac26454c5":[0,0,5,5], -"classParser.html#a118d55f338510ccaf3b9352e88237759":[0,0,5,13], -"classParser.html#a13a5e2fdac62670c1584de1edbba77f2":[0,0,5,23], -"classParser.html#a23d95ecfeae834319e3ac55fbb213bb1":[0,0,5,4], -"classParser.html#a350fc3e35535c5891cd9e36e79ee546a":[0,0,5,2], -"classParser.html#a3d8927f2e26abf6a63bd850c154b23c6":[0,0,5,21], -"classParser.html#a3e658b5917a93a3ef648050d060e3a93":[0,0,5,1], -"classParser.html#a48044a8caa14a251cb4dad9fb363658e":[0,0,5,0], -"classParser.html#a59ed4455eaec306cde11939785c4e71a":[0,0,5,6], -"classParser.html#a6835a56be443bac2712300d85f08a1f0":[0,0,5,19], -"classParser.html#a7556a6ba41ab1a14aaa77ef4734e0f12":[0,0,5,17], -"classParser.html#a84d781820ab7c167496def7ae93fa3df":[0,0,5,14], -"classParser.html#a9063a336c4ab03d9476990aedaa76ff5":[0,0,5,20], -"classParser.html#a95b6a4c1e523ac49e891c4abc1cb664b":[0,0,5,16], -"classParser.html#aa1c81b338cab55b128d0c2b6f48843a5":[0,0,5,3], -"classParser.html#aaf9f19591ff93f0c0c2fd68955e4a4af":[0,0,5,10], -"classParser.html#ab48a0797fe7ab0b7d4d00d4309a1b49f":[0,0,5,8], -"classParser.html#abd879ea781803a60e89675479e1d75f6":[0,0,5,7], -"classParser.html#ade5b3a22b5aa10f986ae56218701a312":[0,0,5,18], -"classParser.html#ae3a28c02c18171f4e83fae54b9f21a90":[0,0,5,22], -"classParser.html#ae4f868faab1653fc9bb53902c3284dc3":[0,0,5,12], -"classParser.html#af3820c3ea6da58ce2e7d897d5d0b59cb":[0,0,5,9], -"classParser.html#af42401b34e756cf3d19940d795e9be37":[0,0,5,15], -"classParser.html#af7bd35de9ae9990807b8d63fc8433384":[0,0,5,11], -"classPath.html":[0,0,6], -"classPath.html#a089f2f59cc5574ce9e93826891044378":[0,0,6,0], -"classPath.html#a1880b844baafdeca91a7cf5d155cf9f1":[0,0,6,8], -"classPath.html#a3d2df8f3367db525772586065e16151e":[0,0,6,5], -"classPath.html#a9395325e65f86fd2a4be2dc24408753a":[0,0,6,3], -"classPath.html#a9d701e9231022249523970101bbc749c":[0,0,6,4], -"classPath.html#ac5abd8d5994a75cca56205c7e55a5b4f":[0,0,6,7], -"classPath.html#ac99ffb44f19586a10ee39aa70fd4a260":[0,0,6,2], -"classPath.html#ad2ba583a2dd567c3295ea62817b541e9":[0,0,6,6], -"classPath.html#ad4273c2a1b288fe43dd86375afc16f66":[0,0,6,1], -"classPlygon.html":[0,0,8], -"classPlygon.html#a91c207c3142183a6714a700ee468a359":[0,0,8,4], -"classPlygon.html#a97b4c008055f2b2514e7a101fcbdb9b3":[0,0,8,2], -"classPlygon.html#aab00a0d0230ea320271e96c326c6b919":[0,0,8,1], -"classPlygon.html#ac18faac47e1fa6bce3c7167f1e87bef4":[0,0,8,3], -"classPlygon.html#ac3f4fb224f4f84c3bd6e41093cd847cd":[0,0,8,0], -"classPlyline.html":[0,0,9], -"classPlyline.html#a5b9d86c75604d329037cd47e8ba3d5b9":[0,0,9,1], -"classPlyline.html#a71e8a6587d4656f6381e06925ad305d6":[0,0,9,4], -"classPlyline.html#a8bf7677d7adb76f146607ef1aaa49bd3":[0,0,9,0], -"classPlyline.html#ab6d84eb184e27476516fb6d9aa9e9cf4":[0,0,9,3], -"classPlyline.html#ad386f98aea56800553a8268ab78ce374":[0,0,9,2], -"classPolyShape.html":[0,0,10], -"classPolyShape.html#a27704ef9fd50c041d1d233e9d99a4fd4":[0,0,10,3], -"classPolyShape.html#a3a5e4952aff469f241ee1c9b92833f55":[0,0,10,1], -"classPolyShape.html#a40a83ac567156de6da65adb1a4380c7c":[0,0,10,4], -"classPolyShape.html#a6fd054647bea080272ed79bbea7080ac":[0,0,10,0], -"classPolyShape.html#acbd1d536ad25e34b160e849a0fc12697":[0,0,10,5], -"classPolyShape.html#afc263d5407ca7ea50e30d641d779b73b":[0,0,10,2], -"classRect.html":[0,0,11], -"classRect.html#a28b51c4f99cfa0208a2a5cef350c2a5e":[0,0,11,7], -"classRect.html#a31428cce67b56b6daf168131c7dbe1e8":[0,0,11,9], -"classRect.html#a31ca84cc8755233b5e61d22189f637b0":[0,0,11,3], -"classRect.html#a418fffe5bb9368f4e158b63e13faba16":[0,0,11,2], -"classRect.html#a4f6ba1c3eef4054847a89da472f392cd":[0,0,11,1], -"classRect.html#a66351fe7a171c2b3ed5f4bdf8d6661ba":[0,0,11,5], -"classRect.html#a7857e3568d2a2a35bf0c6b28028005b5":[0,0,11,10], -"classRect.html#a800053c390ccb818add47e627e535a5e":[0,0,11,11], -"classRect.html#a964a6107f787f612798bda5c0423fb5b":[0,0,11,6], -"classRect.html#a9c1dd853ea5df8e7c96a11bba72cc67a":[0,0,11,4], -"classRect.html#ad52d66e844d848d0e95f744b697e7beb":[0,0,11,0], -"classRect.html#ae11a39d12f7a766f773e662b0830848d":[0,0,11,8], -"classRenderer.html":[0,0,12], -"classRenderer.html#a1fac47f9b1c4c3fb1151f2b6ecb282f6":[0,0,12,3], -"classRenderer.html#a27b883787b8f38afd04924edc97b5a04":[0,0,12,8], -"classRenderer.html#a4e73148b7da0f585084520d12c514344":[0,0,12,9], -"classRenderer.html#a6cbcbb11e386c26eacef0b97342fee77":[0,0,12,7], -"classRenderer.html#a7431a2f9b03f35752e034410ffebfbe1":[0,0,12,14], -"classRenderer.html#a7ebf46f54dab9905f79b80f7fddb76a6":[0,0,12,1], -"classRenderer.html#a87ce996c3ed0f963de9ef6c293ee3aec":[0,0,12,11], -"classRenderer.html#a8c6e15f666cb188a936004add75e6c6b":[0,0,12,0], -"classRenderer.html#a8d159bc1ea8f4152339d6c5eead27e45":[0,0,12,2], -"classRenderer.html#a9b5ca422ec7f1328d854cc4bff269858":[0,0,12,4], -"classRenderer.html#aa42607899757d0a1c5e8fe0aa4cb5a7f":[0,0,12,13], -"classRenderer.html#ab68c9e02c7eadf1f18286c9ecf0d90ca":[0,0,12,6], -"classRenderer.html#abf163a7895594e0a4ee5662805b1b572":[0,0,12,10], -"classRenderer.html#ac1bf10ff8b4f967f0d416a26d482abd6":[0,0,12,12], -"classRenderer.html#af4d92e92abb79e4431f7331f792194d9":[0,0,12,5], -"classSVGElement.html":[0,0,13], -"classSVGElement.html#a00fef2ebc5df4838b3f9bd7111b117c5":[0,0,13,17], -"classSVGElement.html#a1b075314d4cda4fa895688979fe462fd":[0,0,13,7], -"classSVGElement.html#a2e4b1a48bfbc34a6a9f17bfd4b89eb51":[0,0,13,6], -"classSVGElement.html#a43b3bf06fae88a1634a189272088d11d":[0,0,13,14], -"classSVGElement.html#a4e1ed8bb29fd4dbeb35471315976b3a2":[0,0,13,8], -"classSVGElement.html#a5087280fd4bbb637c3cde64e44e974f1":[0,0,13,0], -"classSVGElement.html#a5f111964efd20e98eafafb3d168a1e87":[0,0,13,9], -"classSVGElement.html#a6d3a39e763d3273715ea11f8959f81b1":[0,0,13,18], -"classSVGElement.html#a77aefe4b7e9dbf180cc531c969d0116d":[0,0,13,16], -"classSVGElement.html#a88449b487a890e3765ae20e96ee95c06":[0,0,13,22], -"classSVGElement.html#a88653ebe8b92ec881ab436ea968375a8":[0,0,13,13], -"classSVGElement.html#a9a243b2b8464d57df28f3f3e8c52511e":[0,0,13,5], -"classSVGElement.html#aab937dcb566cd83d94d00d69b4083f13":[0,0,13,21], -"classSVGElement.html#abb012cad5d6e9ee7a413f46042f99429":[0,0,13,4], -"classSVGElement.html#abf7eef6d09fedba0d0f50a0f1a4be2fb":[0,0,13,11], -"classSVGElement.html#ac0cc2f6d2e01d364a695bebaa7db18d2":[0,0,13,12], -"classSVGElement.html#acf9b9906b6d0cba8bb5c0b38b032e40f":[0,0,13,20], -"classSVGElement.html#ad30205005009d2ba4820d3ce372e81ea":[0,0,13,1], -"classSVGElement.html#ad4bcd981ae7431161013811024b452e1":[0,0,13,10], -"classSVGElement.html#adc98ebac66965dd303283cbf7ff28f38":[0,0,13,3], -"classSVGElement.html#adee748c3014de1c1ebd20411a52e824a":[0,0,13,19], -"classSVGElement.html#aec8a2f582f21a559c05d791e017efbd5":[0,0,13,15], -"classSVGElement.html#aefeee5c1de3e802d9f5f0a54078170e6":[0,0,13,23], -"classSVGElement.html#af699f9aa795572c2873e520849579881":[0,0,13,2], -"classText.html":[0,0,14], -"classText.html#a12e8ae19a8e677eb6f1c2dc2716dcab0":[0,0,14,8], -"classText.html#a12ee81ccf865a414867d4101c8dbbdb2":[0,0,14,14], -"classText.html#a33f5c94508241a960c139923c284491e":[0,0,14,11], -"classText.html#a405fac6f66711e0063e18e9e211e3a62":[0,0,14,2], -"classText.html#a40e38d59ba9b34df9900375409f6f03f":[0,0,14,6], -"classText.html#a445117756f52b37ae8bce225e254bea6":[0,0,14,1], -"classText.html#a4f24f78f8a962e758b70c5d9fd85b7cb":[0,0,14,10], -"classText.html#a6a04680d93c625645278b1d1111420bb":[0,0,14,9], -"classText.html#a6e799a9b0ba6f88e704eea12599d3d5c":[0,0,14,4], -"classText.html#a71158226b190f16477820e45b549133f":[0,0,14,13], -"classText.html#a86fd1927b692d6691c8dd3901b6f6e48":[0,0,14,5], -"classText.html#a92c5df61031c3a9af813f9cc6978f34a":[0,0,14,0], -"classText.html#a9336f13d0d4a26d41c2fd2e103ac5dde":[0,0,14,12], -"classText.html#aa503905beb9dddf11c9c579424d0a84f":[0,0,14,7], -"classText.html#ac593599637e5e7f0f929c59b440f1b94":[0,0,14,3], -"classVector2D.html":[0,0,15], -"classVector2D.html#a4f1bca1b63cd8b1323c85c9a5c597df4":[0,0,15,1], -"classVector2D.html#a65e391ec61c185092a02cf6301d0fff7":[0,0,15,3], -"classVector2D.html#a6a91fccbbd37162d28fa54aeeb88f9d2":[0,0,15,4], -"classVector2D.html#a96580267fed7cd6686cbbf8e11048023":[0,0,15,0], -"classVector2D.html#af9cb4a6f06903844162f4c9d80d16b85":[0,0,15,2], -"classViewer.html":[0,0,16], -"classViewer.html#a2b889c5d09c8577ad1580dd610ac5678":[0,0,16,6], -"classViewer.html#a30b0f57907c82de620339e105f9a3c5b":[0,0,16,17], -"classViewer.html#a324e5a6a1532fe5eac3f3b0e4792b2da":[0,0,16,0], -"classViewer.html#a3d14cceacd94622e6b9d5d71bfb5b64f":[0,0,16,11], -"classViewer.html#a3e16ebbf5c0ed98dc75fe2c4d46fe0d5":[0,0,16,16], -"classViewer.html#a452e9dd05638bf3da01d8f51dba009a5":[0,0,16,13], -"classViewer.html#a46377febc22fd7f2cc38a73ddb66b8ad":[0,0,16,19], -"classViewer.html#a53c3dca921442983d13f335d0e8a7e20":[0,0,16,12], -"classViewer.html#a59a507a835919e78114601d5bd1784e6":[0,0,16,15], -"classViewer.html#a643c2fc659f06f4d4bfcefbad22ebd75":[0,0,16,5], -"classViewer.html#a77bc329e7ae0aecaf60a4de4f8dcc037":[0,0,16,14], -"classViewer.html#a81a24ea13ee1e7e8c83be60672a7a11e":[0,0,16,9], -"classViewer.html#a8235c9da7e144d7139c91901c0051cd8":[0,0,16,3], -"classViewer.html#a82dfd34668f986b72e51ee86d4029fc6":[0,0,16,18], -"classViewer.html#a8bcd4fdeb5c26092d65fc14474afeb38":[0,0,16,4], -"classViewer.html#a940c6147b33b273afdff6eef7309d500":[0,0,16,10], -"classViewer.html#aaedebacb31cba87de6e7d448ed8d6586":[0,0,16,1], -"classViewer.html#abb8e49e83e5c574411bb9995665fd7eb":[0,0,16,2], -"classViewer.html#acb15ba2e5d3bab2ba58da0db724b3bd1":[0,0,16,8], -"classViewer.html#ae0c94514f0897aa84732024855520e28":[0,0,16,7], -"classes.html":[0,1], -"classmColor.html":[0,0,4], -"classmColor.html#a04a0d2485c1106ccc94d065a0e62ecfb":[0,0,4,8], -"classmColor.html#a0cd1254821d108bb8c5be8ec5536f8ec":[0,0,4,9], -"classmColor.html#a1887c93301ffe92701baf17d6af3418e":[0,0,4,3], -"classmColor.html#a427453d377b30c62f7d25f47120959d6":[0,0,4,12], -"classmColor.html#a4376ef67b23a45be81daeecbfef1b2c3":[0,0,4,1], -"classmColor.html#a59dc727125e9f3d4ed0c59433dfa0780":[0,0,4,7], -"classmColor.html#a68265f053324eea11265c7f8d7fdb5ff":[0,0,4,16], -"classmColor.html#a73b9b91ca8c79e6e3876e5d83980ebec":[0,0,4,15], -"classmColor.html#a777df695011fdb21f6b5d3e6745389c4":[0,0,4,11], -"classmColor.html#a8df59e284c6211d66b05fab14d726a5e":[0,0,4,2], -"classmColor.html#a9b1702a679c1c5f649787fe15d8b016a":[0,0,4,0], -"classmColor.html#aa0fc6fe3033f7ff2806c59e39c072dbc":[0,0,4,13], -"classmColor.html#aa3910d2b82d32c8aa4e50127874a6d03":[0,0,4,6], -"classmColor.html#aa69dc1cb58cec64672952d1e84744f8c":[0,0,4,10], -"classmColor.html#ac086aa72806b8ce55fed3df9ba976f6c":[0,0,4,4], -"classmColor.html#ac4f0afaa513bbe9e68c16156136d4ada":[0,0,4,14], -"classmColor.html#ad56f2424fa451364becdc4d1c4df657c":[0,0,4,5], -"dir_560415a5d2bc4999842279f4fc1debef.html":[1,0,0,0], -"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[1,0,0], -"files.html":[1,0], -"functions.html":[0,3,0], -"functions_func.html":[0,3,1], -"functions_rela.html":[0,3,3], -"functions_vars.html":[0,3,2], -"hierarchy.html":[0,2], -"index.html":[], -"main_8cpp_source.html":[1,0,0,2], -"pages.html":[], -"structPathPoint.html":[0,0,7], -"structPathPoint.html#a7af911b1e9c6b451f8e869b12ac7ef0c":[0,0,7,0], -"structPathPoint.html#ab87850db87370b39084e97ba96c4aca3":[0,0,7,1] -}; diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js deleted file mode 100644 index 3f1b42a1..00000000 --- a/docs/html/search/all_0.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['a_0',['a',['../classmColor.html#ac086aa72806b8ce55fed3df9ba976f6c',1,'mColor']]], - ['addelement_1',['addElement',['../classGroup.html#af4dafed0506ca5e9ea9e1028b1504919',1,'Group::addElement()'],['../classSVGElement.html#af699f9aa795572c2873e520849579881',1,'SVGElement::addElement()']]], - ['addpoint_2',['addPoint',['../classPath.html#ad4273c2a1b288fe43dd86375afc16f66',1,'Path::addPoint()'],['../classPolyShape.html#a3a5e4952aff469f241ee1c9b92833f55',1,'PolyShape::addPoint()']]], - ['anchor_3',['anchor',['../classText.html#a33f5c94508241a960c139923c284491e',1,'Text']]], - ['applytransform_4',['applyTransform',['../classRenderer.html#a8d159bc1ea8f4152339d6c5eead27e45',1,'Renderer']]], - ['attributes_5',['attributes',['../classGroup.html#a9308f587c63720ccbe2bfd1bad868547',1,'Group']]] -]; diff --git a/docs/html/search/all_1.js b/docs/html/search/all_1.js deleted file mode 100644 index 8a79da28..00000000 --- a/docs/html/search/all_1.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['b_6',['b',['../classmColor.html#ad56f2424fa451364becdc4d1c4df657c',1,'mColor']]], - ['black_7',['Black',['../classmColor.html#aa3910d2b82d32c8aa4e50127874a6d03',1,'mColor']]], - ['blue_8',['Blue',['../classmColor.html#a59dc727125e9f3d4ed0c59433dfa0780',1,'mColor']]] -]; diff --git a/docs/html/search/all_10.js b/docs/html/search/all_10.js deleted file mode 100644 index 407c2b63..00000000 --- a/docs/html/search/all_10.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['text_124',['Text',['../classText.html',1,'Text'],['../classText.html#a92c5df61031c3a9af813f9cc6978f34a',1,'Text::Text()']]], - ['transforms_125',['transforms',['../classSVGElement.html#aefeee5c1de3e802d9f5f0a54078170e6',1,'SVGElement']]], - ['transparent_126',['Transparent',['../classmColor.html#ac4f0afaa513bbe9e68c16156136d4ada',1,'mColor']]] -]; diff --git a/docs/html/search/all_12.js b/docs/html/search/all_12.js deleted file mode 100644 index 4f927d38..00000000 --- a/docs/html/search/all_12.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['white_130',['White',['../classmColor.html#a73b9b91ca8c79e6e3876e5d83980ebec',1,'mColor']]], - ['width_131',['width',['../classRect.html#a800053c390ccb818add47e627e535a5e',1,'Rect']]] -]; diff --git a/docs/html/search/all_13.js b/docs/html/search/all_13.js deleted file mode 100644 index 125ff6b0..00000000 --- a/docs/html/search/all_13.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['x_132',['x',['../classVector2D.html#a65e391ec61c185092a02cf6301d0fff7',1,'Vector2D']]] -]; diff --git a/docs/html/search/all_14.js b/docs/html/search/all_14.js deleted file mode 100644 index d54b7660..00000000 --- a/docs/html/search/all_14.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['y_133',['y',['../classVector2D.html#a6a91fccbbd37162d28fa54aeeb88f9d2',1,'Vector2D']]], - ['yellow_134',['Yellow',['../classmColor.html#a68265f053324eea11265c7f8d7fdb5ff',1,'mColor']]] -]; diff --git a/docs/html/search/all_16.js b/docs/html/search/all_16.js deleted file mode 100644 index 133dd11b..00000000 --- a/docs/html/search/all_16.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['_7eparser_136',['~Parser',['../classParser.html#a3e658b5917a93a3ef648050d060e3a93',1,'Parser']]], - ['_7esvgelement_137',['~SVGElement',['../classSVGElement.html#a5087280fd4bbb637c3cde64e44e974f1',1,'SVGElement']]], - ['_7eviewer_138',['~Viewer',['../classViewer.html#a324e5a6a1532fe5eac3f3b0e4792b2da',1,'Viewer']]] -]; diff --git a/docs/html/search/all_2.js b/docs/html/search/all_2.js deleted file mode 100644 index 8fc6f854..00000000 --- a/docs/html/search/all_2.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['circle_9',['Circle',['../classCircle.html',1,'Circle'],['../classCircle.html#a5d018c51bfa1fa3d1081e3deef5eddc0',1,'Circle::Circle()']]], - ['content_10',['content',['../classText.html#a9336f13d0d4a26d41c2fd2e103ac5dde',1,'Text']]], - ['cyan_11',['Cyan',['../classmColor.html#a04a0d2485c1106ccc94d065a0e62ecfb',1,'mColor']]] -]; diff --git a/docs/html/search/all_3.js b/docs/html/search/all_3.js deleted file mode 100644 index 6345cc1a..00000000 --- a/docs/html/search/all_3.js +++ /dev/null @@ -1,13 +0,0 @@ -var searchData= -[ - ['direction_12',['direction',['../classLine.html#a3fe45077492213ef490739c6137200d1',1,'Line']]], - ['draw_13',['draw',['../classRenderer.html#a1fac47f9b1c4c3fb1151f2b6ecb282f6',1,'Renderer']]], - ['drawcircle_14',['drawCircle',['../classRenderer.html#a9b5ca422ec7f1328d854cc4bff269858',1,'Renderer']]], - ['drawellipse_15',['drawEllipse',['../classRenderer.html#af4d92e92abb79e4431f7331f792194d9',1,'Renderer']]], - ['drawline_16',['drawLine',['../classRenderer.html#ab68c9e02c7eadf1f18286c9ecf0d90ca',1,'Renderer']]], - ['drawpath_17',['drawPath',['../classRenderer.html#a6cbcbb11e386c26eacef0b97342fee77',1,'Renderer']]], - ['drawpolygon_18',['drawPolygon',['../classRenderer.html#a27b883787b8f38afd04924edc97b5a04',1,'Renderer']]], - ['drawpolyline_19',['drawPolyline',['../classRenderer.html#a4e73148b7da0f585084520d12c514344',1,'Renderer']]], - ['drawrectangle_20',['drawRectangle',['../classRenderer.html#abf163a7895594e0a4ee5662805b1b572',1,'Renderer']]], - ['drawtext_21',['drawText',['../classRenderer.html#a87ce996c3ed0f963de9ef6c293ee3aec',1,'Renderer']]] -]; diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js deleted file mode 100644 index 69655a3f..00000000 --- a/docs/html/search/all_5.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['fill_23',['fill',['../classSVGElement.html#a6d3a39e763d3273715ea11f8959f81b1',1,'SVGElement']]], - ['fill_5frule_24',['fill_rule',['../classPath.html#ac5abd8d5994a75cca56205c7e55a5b4f',1,'Path::fill_rule()'],['../classPlygon.html#a91c207c3142183a6714a700ee468a359',1,'Plygon::fill_rule()'],['../classPlyline.html#a71e8a6587d4656f6381e06925ad305d6',1,'Plyline::fill_rule()']]], - ['font_5fsize_25',['font_size',['../classText.html#a71158226b190f16477820e45b549133f',1,'Text']]] -]; diff --git a/docs/html/search/all_6.js b/docs/html/search/all_6.js deleted file mode 100644 index 4dcb8e61..00000000 --- a/docs/html/search/all_6.js +++ /dev/null @@ -1,31 +0,0 @@ -var searchData= -[ - ['g_26',['g',['../classmColor.html#a0cd1254821d108bb8c5be8ec5536f8ec',1,'mColor']]], - ['getanchor_27',['getAnchor',['../classText.html#a445117756f52b37ae8bce225e254bea6',1,'Text']]], - ['getattribute_28',['getAttribute',['../classParser.html#aa1c81b338cab55b128d0c2b6f48843a5',1,'Parser']]], - ['getattributes_29',['getAttributes',['../classGroup.html#a317fcd42fd61b83c0d932bd1eb2c753f',1,'Group']]], - ['getclass_30',['getClass',['../classPlygon.html#aab00a0d0230ea320271e96c326c6b919',1,'Plygon::getClass()'],['../classText.html#a405fac6f66711e0063e18e9e211e3a62',1,'Text::getClass()'],['../classSVGElement.html#adc98ebac66965dd303283cbf7ff28f38',1,'SVGElement::getClass()'],['../classRect.html#a4f6ba1c3eef4054847a89da472f392cd',1,'Rect::getClass()'],['../classPolyShape.html#afc263d5407ca7ea50e30d641d779b73b',1,'PolyShape::getClass()'],['../classPlyline.html#a5b9d86c75604d329037cd47e8ba3d5b9',1,'Plyline::getClass()'],['../classPath.html#ac99ffb44f19586a10ee39aa70fd4a260',1,'Path::getClass()'],['../classLine.html#a745f295541d412b49dac89423bd957a6',1,'Line::getClass()'],['../classGroup.html#a070e010084eaac6131e1bf814d10d234',1,'Group::getClass()'],['../classEll.html#a0d0a2a70c06878c5769bd7d092277892',1,'Ell::getClass()'],['../classCircle.html#a09523e46318092d42a5969a1da5613bb',1,'Circle::getClass()']]], - ['getcontent_31',['getContent',['../classText.html#ac593599637e5e7f0f929c59b440f1b94',1,'Text']]], - ['getdirection_32',['getDirection',['../classLine.html#adb348ce7ddf4b500c3593b7126aa4451',1,'Line']]], - ['getelements_33',['getElements',['../classGroup.html#a310fa83ccb20841373c11b6b4ac1d336',1,'Group']]], - ['getfillcolor_34',['getFillColor',['../classSVGElement.html#abb012cad5d6e9ee7a413f46042f99429',1,'SVGElement']]], - ['getfillrule_35',['getFillRule',['../classPlyline.html#ad386f98aea56800553a8268ab78ce374',1,'Plyline::getFillRule()'],['../classPlygon.html#a97b4c008055f2b2514e7a101fcbdb9b3',1,'Plygon::getFillRule()'],['../classPath.html#a9395325e65f86fd2a4be2dc24408753a',1,'Path::getFillRule()']]], - ['getfloatattribute_36',['getFloatAttribute',['../classParser.html#a23d95ecfeae834319e3ac55fbb213bb1',1,'Parser']]], - ['getfontsize_37',['getFontSize',['../classText.html#a6e799a9b0ba6f88e704eea12599d3d5c',1,'Text']]], - ['getfontstyle_38',['getFontStyle',['../classText.html#a86fd1927b692d6691c8dd3901b6f6e48',1,'Text']]], - ['getheight_39',['getHeight',['../classRect.html#a418fffe5bb9368f4e158b63e13faba16',1,'Rect']]], - ['getinstance_40',['getInstance',['../classParser.html#a06952fa44f19fdb573c1355ac26454c5',1,'Parser::getInstance()'],['../classRenderer.html#ac1bf10ff8b4f967f0d416a26d482abd6',1,'Renderer::getInstance()'],['../classViewer.html#a8235c9da7e144d7139c91901c0051cd8',1,'Viewer::getInstance()']]], - ['getlength_41',['getLength',['../classLine.html#afe6672bc7667cf45739c46f9fc8cb237',1,'Line']]], - ['getoutlinecolor_42',['getOutlineColor',['../classSVGElement.html#a9a243b2b8464d57df28f3f3e8c52511e',1,'SVGElement']]], - ['getoutlinethickness_43',['getOutlineThickness',['../classSVGElement.html#a2e4b1a48bfbc34a6a9f17bfd4b89eb51',1,'SVGElement']]], - ['getparent_44',['getParent',['../classSVGElement.html#a1b075314d4cda4fa895688979fe462fd',1,'SVGElement']]], - ['getpoints_45',['getPoints',['../classPath.html#a9d701e9231022249523970101bbc749c',1,'Path::getPoints()'],['../classPolyShape.html#a27704ef9fd50c041d1d233e9d99a4fd4',1,'PolyShape::getPoints()']]], - ['getposition_46',['getPosition',['../classSVGElement.html#a4e1ed8bb29fd4dbeb35471315976b3a2',1,'SVGElement']]], - ['getradius_47',['getRadius',['../classEll.html#a00d607a5238705b552ec61b4409b76c1',1,'Ell::getRadius()'],['../classRect.html#a31ca84cc8755233b5e61d22189f637b0',1,'Rect::getRadius()']]], - ['getroot_48',['getRoot',['../classParser.html#a59ed4455eaec306cde11939785c4e71a',1,'Parser']]], - ['gettransformorder_49',['getTransformOrder',['../classParser.html#abd879ea781803a60e89675479e1d75f6',1,'Parser']]], - ['gettransforms_50',['getTransforms',['../classSVGElement.html#a5f111964efd20e98eafafb3d168a1e87',1,'SVGElement']]], - ['getwidth_51',['getWidth',['../classRect.html#a9c1dd853ea5df8e7c96a11bba72cc67a',1,'Rect']]], - ['green_52',['Green',['../classmColor.html#aa69dc1cb58cec64672952d1e84744f8c',1,'mColor']]], - ['group_53',['Group',['../classGroup.html',1,'']]] -]; diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js deleted file mode 100644 index c2f67ebb..00000000 --- a/docs/html/search/all_7.js +++ /dev/null @@ -1,11 +0,0 @@ -var searchData= -[ - ['handlekeydown_54',['handleKeyDown',['../classViewer.html#a8bcd4fdeb5c26092d65fc14474afeb38',1,'Viewer']]], - ['handlekeyevent_55',['handleKeyEvent',['../classViewer.html#a643c2fc659f06f4d4bfcefbad22ebd75',1,'Viewer']]], - ['handleleftbuttondown_56',['handleLeftButtonDown',['../classViewer.html#a2b889c5d09c8577ad1580dd610ac5678',1,'Viewer']]], - ['handleleftbuttonup_57',['handleLeftButtonUp',['../classViewer.html#ae0c94514f0897aa84732024855520e28',1,'Viewer']]], - ['handlemouseevent_58',['handleMouseEvent',['../classViewer.html#acb15ba2e5d3bab2ba58da0db724b3bd1',1,'Viewer']]], - ['handlemousemove_59',['handleMouseMove',['../classViewer.html#a81a24ea13ee1e7e8c83be60672a7a11e',1,'Viewer']]], - ['handlemousewheel_60',['handleMouseWheel',['../classViewer.html#a940c6147b33b273afdff6eef7309d500',1,'Viewer']]], - ['height_61',['height',['../classRect.html#a31428cce67b56b6daf168131c7dbe1e8',1,'Rect']]] -]; diff --git a/docs/html/search/all_9.js b/docs/html/search/all_9.js deleted file mode 100644 index 5dc30dc1..00000000 --- a/docs/html/search/all_9.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['last_5fmouse_5fpos_64',['last_mouse_pos',['../classViewer.html#a77bc329e7ae0aecaf60a4de4f8dcc037',1,'Viewer']]], - ['line_65',['Line',['../classLine.html',1,'Line'],['../classLine.html#ab6e165ec2c3f412d5e5a860b28a52b4c',1,'Line::Line()']]] -]; diff --git a/docs/html/search/all_b.js b/docs/html/search/all_b.js deleted file mode 100644 index 50d3ca26..00000000 --- a/docs/html/search/all_b.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['needs_5frepaint_68',['needs_repaint',['../classViewer.html#a59a507a835919e78114601d5bd1784e6',1,'Viewer']]] -]; diff --git a/docs/html/search/all_c.js b/docs/html/search/all_c.js deleted file mode 100644 index 1ead811b..00000000 --- a/docs/html/search/all_c.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['offset_5fx_69',['offset_x',['../classViewer.html#a3e16ebbf5c0ed98dc75fe2c4d46fe0d5',1,'Viewer']]], - ['offset_5fy_70',['offset_y',['../classViewer.html#a30b0f57907c82de620339e105f9a3c5b',1,'Viewer']]], - ['operator_3c_3c_71',['operator<<',['../classmColor.html#a1887c93301ffe92701baf17d6af3418e',1,'mColor']]], - ['operator_3d_72',['operator=',['../classRenderer.html#aa42607899757d0a1c5e8fe0aa4cb5a7f',1,'Renderer::operator=()'],['../classViewer.html#a3d14cceacd94622e6b9d5d71bfb5b64f',1,'Viewer::operator=()']]] -]; diff --git a/docs/html/search/all_d.js b/docs/html/search/all_d.js deleted file mode 100644 index 2531a2c1..00000000 --- a/docs/html/search/all_d.js +++ /dev/null @@ -1,27 +0,0 @@ -var searchData= -[ - ['parent_73',['parent',['../classSVGElement.html#adee748c3014de1c1ebd20411a52e824a',1,'SVGElement']]], - ['parsecircle_74',['parseCircle',['../classParser.html#ab48a0797fe7ab0b7d4d00d4309a1b49f',1,'Parser']]], - ['parsecolor_75',['parseColor',['../classParser.html#af3820c3ea6da58ce2e7d897d5d0b59cb',1,'Parser']]], - ['parseelements_76',['parseElements',['../classParser.html#aaf9f19591ff93f0c0c2fd68955e4a4af',1,'Parser']]], - ['parseellipse_77',['parseEllipse',['../classParser.html#af7bd35de9ae9990807b8d63fc8433384',1,'Parser']]], - ['parseline_78',['parseLine',['../classParser.html#ae4f868faab1653fc9bb53902c3284dc3',1,'Parser']]], - ['parsepath_79',['parsePath',['../classParser.html#a118d55f338510ccaf3b9352e88237759',1,'Parser']]], - ['parsepathpoints_80',['parsePathPoints',['../classParser.html#a84d781820ab7c167496def7ae93fa3df',1,'Parser']]], - ['parsepoints_81',['parsePoints',['../classParser.html#af42401b34e756cf3d19940d795e9be37',1,'Parser']]], - ['parsepolygon_82',['parsePolygon',['../classParser.html#a95b6a4c1e523ac49e891c4abc1cb664b',1,'Parser']]], - ['parsepolyline_83',['parsePolyline',['../classParser.html#a7556a6ba41ab1a14aaa77ef4734e0f12',1,'Parser']]], - ['parser_84',['Parser',['../classParser.html#a350fc3e35535c5891cd9e36e79ee546a',1,'Parser::Parser(const std::string &file_name)'],['../classParser.html#a48044a8caa14a251cb4dad9fb363658e',1,'Parser::Parser(const Parser &)=delete'],['../classParser.html',1,'Parser']]], - ['parserect_85',['parseRect',['../classParser.html#ade5b3a22b5aa10f986ae56218701a312',1,'Parser']]], - ['parseshape_86',['parseShape',['../classParser.html#a6835a56be443bac2712300d85f08a1f0',1,'Parser']]], - ['parsetext_87',['parseText',['../classParser.html#a9063a336c4ab03d9476990aedaa76ff5',1,'Parser']]], - ['path_88',['Path',['../classPath.html#a089f2f59cc5574ce9e93826891044378',1,'Path::Path()'],['../classPath.html',1,'Path']]], - ['pathpoint_89',['PathPoint',['../structPathPoint.html',1,'']]], - ['plygon_90',['Plygon',['../classPlygon.html',1,'Plygon'],['../classPlygon.html#ac3f4fb224f4f84c3bd6e41093cd847cd',1,'Plygon::Plygon()']]], - ['plyline_91',['Plyline',['../classPlyline.html',1,'Plyline'],['../classPlyline.html#a8bf7677d7adb76f146607ef1aaa49bd3',1,'Plyline::Plyline()']]], - ['points_92',['points',['../classPath.html#a1880b844baafdeca91a7cf5d155cf9f1',1,'Path::points()'],['../classPolyShape.html#acbd1d536ad25e34b160e849a0fc12697',1,'PolyShape::points()']]], - ['polyshape_93',['PolyShape',['../classPolyShape.html#a6fd054647bea080272ed79bbea7080ac',1,'PolyShape::PolyShape()'],['../classPolyShape.html',1,'PolyShape']]], - ['position_94',['position',['../classSVGElement.html#acf9b9906b6d0cba8bb5c0b38b032e40f',1,'SVGElement']]], - ['printdata_95',['printData',['../classEll.html#a1d6d60039d2405f2b7aa117206d128fb',1,'Ell::printData()'],['../classGroup.html#a42fa18c4215ad3669db32b78e22303fa',1,'Group::printData()'],['../classPath.html#a3d2df8f3367db525772586065e16151e',1,'Path::printData()'],['../classPolyShape.html#a40a83ac567156de6da65adb1a4380c7c',1,'PolyShape::printData()'],['../classRect.html#a66351fe7a171c2b3ed5f4bdf8d6661ba',1,'Rect::printData()'],['../classSVGElement.html#ad4bcd981ae7431161013811024b452e1',1,'SVGElement::printData()'],['../classText.html#a40e38d59ba9b34df9900375409f6f03f',1,'Text::printData()']]], - ['printshapesdata_96',['printShapesData',['../classParser.html#a3d8927f2e26abf6a63bd850c154b23c6',1,'Parser']]] -]; diff --git a/docs/html/search/all_e.js b/docs/html/search/all_e.js deleted file mode 100644 index 2e361a54..00000000 --- a/docs/html/search/all_e.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['r_97',['r',['../classmColor.html#a427453d377b30c62f7d25f47120959d6',1,'mColor']]], - ['radius_98',['radius',['../classEll.html#af57a48abe0e2bc8806e73dfa7762388f',1,'Ell::radius()'],['../classRect.html#a7857e3568d2a2a35bf0c6b28028005b5',1,'Rect::radius()']]], - ['rect_99',['Rect',['../classRect.html',1,'Rect'],['../classRect.html#ad52d66e844d848d0e95f744b697e7beb',1,'Rect::Rect()']]], - ['red_100',['Red',['../classmColor.html#aa0fc6fe3033f7ff2806c59e39c072dbc',1,'mColor']]], - ['renderer_101',['Renderer',['../classRenderer.html',1,'Renderer'],['../classRenderer.html#a8c6e15f666cb188a936004add75e6c6b',1,'Renderer::Renderer(const Renderer &)=delete'],['../classRenderer.html#a7ebf46f54dab9905f79b80f7fddb76a6',1,'Renderer::Renderer()']]], - ['root_102',['root',['../classParser.html#a13a5e2fdac62670c1584de1edbba77f2',1,'Parser']]], - ['rotate_5fangle_103',['rotate_angle',['../classViewer.html#a82dfd34668f986b72e51ee86d4029fc6',1,'Viewer']]] -]; diff --git a/docs/html/search/all_f.js b/docs/html/search/all_f.js deleted file mode 100644 index 802e4ecb..00000000 --- a/docs/html/search/all_f.js +++ /dev/null @@ -1,23 +0,0 @@ -var searchData= -[ - ['setanchor_104',['setAnchor',['../classText.html#aa503905beb9dddf11c9c579424d0a84f',1,'Text']]], - ['setcontent_105',['setContent',['../classText.html#a12e8ae19a8e677eb6f1c2dc2716dcab0',1,'Text']]], - ['setdirection_106',['setDirection',['../classLine.html#ab46a879365e623e8b360c2db54d76782',1,'Line']]], - ['setfillcolor_107',['setFillColor',['../classSVGElement.html#abf7eef6d09fedba0d0f50a0f1a4be2fb',1,'SVGElement']]], - ['setfillrule_108',['setFillRule',['../classPath.html#ad2ba583a2dd567c3295ea62817b541e9',1,'Path::setFillRule()'],['../classPlygon.html#ac18faac47e1fa6bce3c7167f1e87bef4',1,'Plygon::setFillRule()'],['../classPlyline.html#ab6d84eb184e27476516fb6d9aa9e9cf4',1,'Plyline::setFillRule()']]], - ['setfontsize_109',['setFontSize',['../classText.html#a6a04680d93c625645278b1d1111420bb',1,'Text']]], - ['setfontstyle_110',['setFontStyle',['../classText.html#a4f24f78f8a962e758b70c5d9fd85b7cb',1,'Text']]], - ['setheight_111',['setHeight',['../classRect.html#a964a6107f787f612798bda5c0423fb5b',1,'Rect']]], - ['setoutlinecolor_112',['setOutlineColor',['../classSVGElement.html#ac0cc2f6d2e01d364a695bebaa7db18d2',1,'SVGElement']]], - ['setoutlinethickness_113',['setOutlineThickness',['../classSVGElement.html#a88653ebe8b92ec881ab436ea968375a8',1,'SVGElement']]], - ['setparent_114',['setParent',['../classSVGElement.html#a43b3bf06fae88a1634a189272088d11d',1,'SVGElement']]], - ['setposition_115',['setPosition',['../classSVGElement.html#a77aefe4b7e9dbf180cc531c969d0116d',1,'SVGElement::setPosition(float x, float y)'],['../classSVGElement.html#aec8a2f582f21a559c05d791e017efbd5',1,'SVGElement::setPosition(const Vector2Df &position)']]], - ['setradius_116',['setRadius',['../classEll.html#a9f67131ba02c02fccf42c52f5f04525e',1,'Ell::setRadius()'],['../classRect.html#a28b51c4f99cfa0208a2a5cef350c2a5e',1,'Rect::setRadius()']]], - ['settransforms_117',['setTransforms',['../classSVGElement.html#a00fef2ebc5df4838b3f9bd7111b117c5',1,'SVGElement']]], - ['setwidth_118',['setWidth',['../classRect.html#ae11a39d12f7a766f773e662b0830848d',1,'Rect']]], - ['shapes_119',['shapes',['../classGroup.html#a6ff10d6fceb2a78103db2d9783de6f41',1,'Group']]], - ['stroke_120',['stroke',['../classSVGElement.html#aab937dcb566cd83d94d00d69b4083f13',1,'SVGElement']]], - ['stroke_5fwidth_121',['stroke_width',['../classSVGElement.html#a88449b487a890e3765ae20e96ee95c06',1,'SVGElement']]], - ['style_122',['style',['../classText.html#a12ee81ccf865a414867d4101c8dbbdb2',1,'Text']]], - ['svgelement_123',['SVGElement',['../classSVGElement.html',1,'SVGElement'],['../classSVGElement.html#ad30205005009d2ba4820d3ce372e81ea',1,'SVGElement::SVGElement()']]] -]; diff --git a/docs/html/search/classes_0.js b/docs/html/search/classes_0.js deleted file mode 100644 index 50c1ca37..00000000 --- a/docs/html/search/classes_0.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['circle_139',['Circle',['../classCircle.html',1,'']]] -]; diff --git a/docs/html/search/classes_1.js b/docs/html/search/classes_1.js deleted file mode 100644 index 1daf29c6..00000000 --- a/docs/html/search/classes_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['ell_140',['Ell',['../classEll.html',1,'']]] -]; diff --git a/docs/html/search/classes_2.js b/docs/html/search/classes_2.js deleted file mode 100644 index 144d1d0a..00000000 --- a/docs/html/search/classes_2.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['group_141',['Group',['../classGroup.html',1,'']]] -]; diff --git a/docs/html/search/classes_3.js b/docs/html/search/classes_3.js deleted file mode 100644 index 71cd4a9b..00000000 --- a/docs/html/search/classes_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['line_142',['Line',['../classLine.html',1,'']]] -]; diff --git a/docs/html/search/classes_4.js b/docs/html/search/classes_4.js deleted file mode 100644 index 07ff012f..00000000 --- a/docs/html/search/classes_4.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['mcolor_143',['mColor',['../classmColor.html',1,'']]] -]; diff --git a/docs/html/search/classes_5.js b/docs/html/search/classes_5.js deleted file mode 100644 index 6d31d2c5..00000000 --- a/docs/html/search/classes_5.js +++ /dev/null @@ -1,9 +0,0 @@ -var searchData= -[ - ['parser_144',['Parser',['../classParser.html',1,'']]], - ['path_145',['Path',['../classPath.html',1,'']]], - ['pathpoint_146',['PathPoint',['../structPathPoint.html',1,'']]], - ['plygon_147',['Plygon',['../classPlygon.html',1,'']]], - ['plyline_148',['Plyline',['../classPlyline.html',1,'']]], - ['polyshape_149',['PolyShape',['../classPolyShape.html',1,'']]] -]; diff --git a/docs/html/search/classes_6.js b/docs/html/search/classes_6.js deleted file mode 100644 index dc561fd9..00000000 --- a/docs/html/search/classes_6.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['rect_150',['Rect',['../classRect.html',1,'']]], - ['renderer_151',['Renderer',['../classRenderer.html',1,'']]] -]; diff --git a/docs/html/search/classes_7.js b/docs/html/search/classes_7.js deleted file mode 100644 index 402a7a7e..00000000 --- a/docs/html/search/classes_7.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['svgelement_152',['SVGElement',['../classSVGElement.html',1,'']]] -]; diff --git a/docs/html/search/classes_8.js b/docs/html/search/classes_8.js deleted file mode 100644 index 05116491..00000000 --- a/docs/html/search/classes_8.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['text_153',['Text',['../classText.html',1,'']]] -]; diff --git a/docs/html/search/classes_9.js b/docs/html/search/classes_9.js deleted file mode 100644 index fa452178..00000000 --- a/docs/html/search/classes_9.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['vector2d_154',['Vector2D',['../classVector2D.html',1,'']]], - ['vector2d_3c_20float_20_3e_155',['Vector2D< float >',['../classVector2D.html',1,'']]], - ['viewer_156',['Viewer',['../classViewer.html',1,'']]] -]; diff --git a/docs/html/search/functions_0.js b/docs/html/search/functions_0.js deleted file mode 100644 index 4e832c97..00000000 --- a/docs/html/search/functions_0.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['addelement_157',['addElement',['../classGroup.html#af4dafed0506ca5e9ea9e1028b1504919',1,'Group::addElement()'],['../classSVGElement.html#af699f9aa795572c2873e520849579881',1,'SVGElement::addElement()']]], - ['addpoint_158',['addPoint',['../classPath.html#ad4273c2a1b288fe43dd86375afc16f66',1,'Path::addPoint()'],['../classPolyShape.html#a3a5e4952aff469f241ee1c9b92833f55',1,'PolyShape::addPoint()']]], - ['applytransform_159',['applyTransform',['../classRenderer.html#a8d159bc1ea8f4152339d6c5eead27e45',1,'Renderer']]] -]; diff --git a/docs/html/search/functions_2.js b/docs/html/search/functions_2.js deleted file mode 100644 index b324d451..00000000 --- a/docs/html/search/functions_2.js +++ /dev/null @@ -1,12 +0,0 @@ -var searchData= -[ - ['draw_161',['draw',['../classRenderer.html#a1fac47f9b1c4c3fb1151f2b6ecb282f6',1,'Renderer']]], - ['drawcircle_162',['drawCircle',['../classRenderer.html#a9b5ca422ec7f1328d854cc4bff269858',1,'Renderer']]], - ['drawellipse_163',['drawEllipse',['../classRenderer.html#af4d92e92abb79e4431f7331f792194d9',1,'Renderer']]], - ['drawline_164',['drawLine',['../classRenderer.html#ab68c9e02c7eadf1f18286c9ecf0d90ca',1,'Renderer']]], - ['drawpath_165',['drawPath',['../classRenderer.html#a6cbcbb11e386c26eacef0b97342fee77',1,'Renderer']]], - ['drawpolygon_166',['drawPolygon',['../classRenderer.html#a27b883787b8f38afd04924edc97b5a04',1,'Renderer']]], - ['drawpolyline_167',['drawPolyline',['../classRenderer.html#a4e73148b7da0f585084520d12c514344',1,'Renderer']]], - ['drawrectangle_168',['drawRectangle',['../classRenderer.html#abf163a7895594e0a4ee5662805b1b572',1,'Renderer']]], - ['drawtext_169',['drawText',['../classRenderer.html#a87ce996c3ed0f963de9ef6c293ee3aec',1,'Renderer']]] -]; diff --git a/docs/html/search/functions_3.js b/docs/html/search/functions_3.js deleted file mode 100644 index 36efbc28..00000000 --- a/docs/html/search/functions_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['ell_170',['Ell',['../classEll.html#a4a9956ca82cb9f957e993fa0c0faced6',1,'Ell']]] -]; diff --git a/docs/html/search/functions_4.js b/docs/html/search/functions_4.js deleted file mode 100644 index 30f4091d..00000000 --- a/docs/html/search/functions_4.js +++ /dev/null @@ -1,28 +0,0 @@ -var searchData= -[ - ['getanchor_171',['getAnchor',['../classText.html#a445117756f52b37ae8bce225e254bea6',1,'Text']]], - ['getattribute_172',['getAttribute',['../classParser.html#aa1c81b338cab55b128d0c2b6f48843a5',1,'Parser']]], - ['getattributes_173',['getAttributes',['../classGroup.html#a317fcd42fd61b83c0d932bd1eb2c753f',1,'Group']]], - ['getclass_174',['getClass',['../classCircle.html#a09523e46318092d42a5969a1da5613bb',1,'Circle::getClass()'],['../classText.html#a405fac6f66711e0063e18e9e211e3a62',1,'Text::getClass()'],['../classSVGElement.html#adc98ebac66965dd303283cbf7ff28f38',1,'SVGElement::getClass()'],['../classRect.html#a4f6ba1c3eef4054847a89da472f392cd',1,'Rect::getClass()'],['../classPolyShape.html#afc263d5407ca7ea50e30d641d779b73b',1,'PolyShape::getClass()'],['../classPlyline.html#a5b9d86c75604d329037cd47e8ba3d5b9',1,'Plyline::getClass()'],['../classPlygon.html#aab00a0d0230ea320271e96c326c6b919',1,'Plygon::getClass()'],['../classPath.html#ac99ffb44f19586a10ee39aa70fd4a260',1,'Path::getClass()'],['../classLine.html#a745f295541d412b49dac89423bd957a6',1,'Line::getClass()'],['../classGroup.html#a070e010084eaac6131e1bf814d10d234',1,'Group::getClass()'],['../classEll.html#a0d0a2a70c06878c5769bd7d092277892',1,'Ell::getClass()']]], - ['getcontent_175',['getContent',['../classText.html#ac593599637e5e7f0f929c59b440f1b94',1,'Text']]], - ['getdirection_176',['getDirection',['../classLine.html#adb348ce7ddf4b500c3593b7126aa4451',1,'Line']]], - ['getelements_177',['getElements',['../classGroup.html#a310fa83ccb20841373c11b6b4ac1d336',1,'Group']]], - ['getfillcolor_178',['getFillColor',['../classSVGElement.html#abb012cad5d6e9ee7a413f46042f99429',1,'SVGElement']]], - ['getfillrule_179',['getFillRule',['../classPlyline.html#ad386f98aea56800553a8268ab78ce374',1,'Plyline::getFillRule()'],['../classPath.html#a9395325e65f86fd2a4be2dc24408753a',1,'Path::getFillRule()'],['../classPlygon.html#a97b4c008055f2b2514e7a101fcbdb9b3',1,'Plygon::getFillRule()']]], - ['getfloatattribute_180',['getFloatAttribute',['../classParser.html#a23d95ecfeae834319e3ac55fbb213bb1',1,'Parser']]], - ['getfontsize_181',['getFontSize',['../classText.html#a6e799a9b0ba6f88e704eea12599d3d5c',1,'Text']]], - ['getfontstyle_182',['getFontStyle',['../classText.html#a86fd1927b692d6691c8dd3901b6f6e48',1,'Text']]], - ['getheight_183',['getHeight',['../classRect.html#a418fffe5bb9368f4e158b63e13faba16',1,'Rect']]], - ['getinstance_184',['getInstance',['../classParser.html#a06952fa44f19fdb573c1355ac26454c5',1,'Parser::getInstance()'],['../classRenderer.html#ac1bf10ff8b4f967f0d416a26d482abd6',1,'Renderer::getInstance()'],['../classViewer.html#a8235c9da7e144d7139c91901c0051cd8',1,'Viewer::getInstance()']]], - ['getlength_185',['getLength',['../classLine.html#afe6672bc7667cf45739c46f9fc8cb237',1,'Line']]], - ['getoutlinecolor_186',['getOutlineColor',['../classSVGElement.html#a9a243b2b8464d57df28f3f3e8c52511e',1,'SVGElement']]], - ['getoutlinethickness_187',['getOutlineThickness',['../classSVGElement.html#a2e4b1a48bfbc34a6a9f17bfd4b89eb51',1,'SVGElement']]], - ['getparent_188',['getParent',['../classSVGElement.html#a1b075314d4cda4fa895688979fe462fd',1,'SVGElement']]], - ['getpoints_189',['getPoints',['../classPath.html#a9d701e9231022249523970101bbc749c',1,'Path::getPoints()'],['../classPolyShape.html#a27704ef9fd50c041d1d233e9d99a4fd4',1,'PolyShape::getPoints()']]], - ['getposition_190',['getPosition',['../classSVGElement.html#a4e1ed8bb29fd4dbeb35471315976b3a2',1,'SVGElement']]], - ['getradius_191',['getRadius',['../classEll.html#a00d607a5238705b552ec61b4409b76c1',1,'Ell::getRadius()'],['../classRect.html#a31ca84cc8755233b5e61d22189f637b0',1,'Rect::getRadius()']]], - ['getroot_192',['getRoot',['../classParser.html#a59ed4455eaec306cde11939785c4e71a',1,'Parser']]], - ['gettransformorder_193',['getTransformOrder',['../classParser.html#abd879ea781803a60e89675479e1d75f6',1,'Parser']]], - ['gettransforms_194',['getTransforms',['../classSVGElement.html#a5f111964efd20e98eafafb3d168a1e87',1,'SVGElement']]], - ['getwidth_195',['getWidth',['../classRect.html#a9c1dd853ea5df8e7c96a11bba72cc67a',1,'Rect']]] -]; diff --git a/docs/html/search/functions_5.js b/docs/html/search/functions_5.js deleted file mode 100644 index b5a5ab41..00000000 --- a/docs/html/search/functions_5.js +++ /dev/null @@ -1,10 +0,0 @@ -var searchData= -[ - ['handlekeydown_196',['handleKeyDown',['../classViewer.html#a8bcd4fdeb5c26092d65fc14474afeb38',1,'Viewer']]], - ['handlekeyevent_197',['handleKeyEvent',['../classViewer.html#a643c2fc659f06f4d4bfcefbad22ebd75',1,'Viewer']]], - ['handleleftbuttondown_198',['handleLeftButtonDown',['../classViewer.html#a2b889c5d09c8577ad1580dd610ac5678',1,'Viewer']]], - ['handleleftbuttonup_199',['handleLeftButtonUp',['../classViewer.html#ae0c94514f0897aa84732024855520e28',1,'Viewer']]], - ['handlemouseevent_200',['handleMouseEvent',['../classViewer.html#acb15ba2e5d3bab2ba58da0db724b3bd1',1,'Viewer']]], - ['handlemousemove_201',['handleMouseMove',['../classViewer.html#a81a24ea13ee1e7e8c83be60672a7a11e',1,'Viewer']]], - ['handlemousewheel_202',['handleMouseWheel',['../classViewer.html#a940c6147b33b273afdff6eef7309d500',1,'Viewer']]] -]; diff --git a/docs/html/search/functions_6.js b/docs/html/search/functions_6.js deleted file mode 100644 index bc5db057..00000000 --- a/docs/html/search/functions_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['line_203',['Line',['../classLine.html#ab6e165ec2c3f412d5e5a860b28a52b4c',1,'Line']]] -]; diff --git a/docs/html/search/functions_9.js b/docs/html/search/functions_9.js deleted file mode 100644 index 70614e62..00000000 --- a/docs/html/search/functions_9.js +++ /dev/null @@ -1,23 +0,0 @@ -var searchData= -[ - ['parsecircle_206',['parseCircle',['../classParser.html#ab48a0797fe7ab0b7d4d00d4309a1b49f',1,'Parser']]], - ['parsecolor_207',['parseColor',['../classParser.html#af3820c3ea6da58ce2e7d897d5d0b59cb',1,'Parser']]], - ['parseelements_208',['parseElements',['../classParser.html#aaf9f19591ff93f0c0c2fd68955e4a4af',1,'Parser']]], - ['parseellipse_209',['parseEllipse',['../classParser.html#af7bd35de9ae9990807b8d63fc8433384',1,'Parser']]], - ['parseline_210',['parseLine',['../classParser.html#ae4f868faab1653fc9bb53902c3284dc3',1,'Parser']]], - ['parsepath_211',['parsePath',['../classParser.html#a118d55f338510ccaf3b9352e88237759',1,'Parser']]], - ['parsepathpoints_212',['parsePathPoints',['../classParser.html#a84d781820ab7c167496def7ae93fa3df',1,'Parser']]], - ['parsepoints_213',['parsePoints',['../classParser.html#af42401b34e756cf3d19940d795e9be37',1,'Parser']]], - ['parsepolygon_214',['parsePolygon',['../classParser.html#a95b6a4c1e523ac49e891c4abc1cb664b',1,'Parser']]], - ['parsepolyline_215',['parsePolyline',['../classParser.html#a7556a6ba41ab1a14aaa77ef4734e0f12',1,'Parser']]], - ['parser_216',['Parser',['../classParser.html#a48044a8caa14a251cb4dad9fb363658e',1,'Parser::Parser(const Parser &)=delete'],['../classParser.html#a350fc3e35535c5891cd9e36e79ee546a',1,'Parser::Parser(const std::string &file_name)']]], - ['parserect_217',['parseRect',['../classParser.html#ade5b3a22b5aa10f986ae56218701a312',1,'Parser']]], - ['parseshape_218',['parseShape',['../classParser.html#a6835a56be443bac2712300d85f08a1f0',1,'Parser']]], - ['parsetext_219',['parseText',['../classParser.html#a9063a336c4ab03d9476990aedaa76ff5',1,'Parser']]], - ['path_220',['Path',['../classPath.html#a089f2f59cc5574ce9e93826891044378',1,'Path']]], - ['plygon_221',['Plygon',['../classPlygon.html#ac3f4fb224f4f84c3bd6e41093cd847cd',1,'Plygon']]], - ['plyline_222',['Plyline',['../classPlyline.html#a8bf7677d7adb76f146607ef1aaa49bd3',1,'Plyline']]], - ['polyshape_223',['PolyShape',['../classPolyShape.html#a6fd054647bea080272ed79bbea7080ac',1,'PolyShape']]], - ['printdata_224',['printData',['../classEll.html#a1d6d60039d2405f2b7aa117206d128fb',1,'Ell::printData()'],['../classGroup.html#a42fa18c4215ad3669db32b78e22303fa',1,'Group::printData()'],['../classPath.html#a3d2df8f3367db525772586065e16151e',1,'Path::printData()'],['../classPolyShape.html#a40a83ac567156de6da65adb1a4380c7c',1,'PolyShape::printData()'],['../classRect.html#a66351fe7a171c2b3ed5f4bdf8d6661ba',1,'Rect::printData()'],['../classSVGElement.html#ad4bcd981ae7431161013811024b452e1',1,'SVGElement::printData()'],['../classText.html#a40e38d59ba9b34df9900375409f6f03f',1,'Text::printData()']]], - ['printshapesdata_225',['printShapesData',['../classParser.html#a3d8927f2e26abf6a63bd850c154b23c6',1,'Parser']]] -]; diff --git a/docs/html/search/functions_a.js b/docs/html/search/functions_a.js deleted file mode 100644 index 7379f9b5..00000000 --- a/docs/html/search/functions_a.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['rect_226',['Rect',['../classRect.html#ad52d66e844d848d0e95f744b697e7beb',1,'Rect']]], - ['renderer_227',['Renderer',['../classRenderer.html#a8c6e15f666cb188a936004add75e6c6b',1,'Renderer::Renderer(const Renderer &)=delete'],['../classRenderer.html#a7ebf46f54dab9905f79b80f7fddb76a6',1,'Renderer::Renderer()']]] -]; diff --git a/docs/html/search/functions_b.js b/docs/html/search/functions_b.js deleted file mode 100644 index 58e1b9f1..00000000 --- a/docs/html/search/functions_b.js +++ /dev/null @@ -1,19 +0,0 @@ -var searchData= -[ - ['setanchor_228',['setAnchor',['../classText.html#aa503905beb9dddf11c9c579424d0a84f',1,'Text']]], - ['setcontent_229',['setContent',['../classText.html#a12e8ae19a8e677eb6f1c2dc2716dcab0',1,'Text']]], - ['setdirection_230',['setDirection',['../classLine.html#ab46a879365e623e8b360c2db54d76782',1,'Line']]], - ['setfillcolor_231',['setFillColor',['../classSVGElement.html#abf7eef6d09fedba0d0f50a0f1a4be2fb',1,'SVGElement']]], - ['setfillrule_232',['setFillRule',['../classPath.html#ad2ba583a2dd567c3295ea62817b541e9',1,'Path::setFillRule()'],['../classPlygon.html#ac18faac47e1fa6bce3c7167f1e87bef4',1,'Plygon::setFillRule()'],['../classPlyline.html#ab6d84eb184e27476516fb6d9aa9e9cf4',1,'Plyline::setFillRule()']]], - ['setfontsize_233',['setFontSize',['../classText.html#a6a04680d93c625645278b1d1111420bb',1,'Text']]], - ['setfontstyle_234',['setFontStyle',['../classText.html#a4f24f78f8a962e758b70c5d9fd85b7cb',1,'Text']]], - ['setheight_235',['setHeight',['../classRect.html#a964a6107f787f612798bda5c0423fb5b',1,'Rect']]], - ['setoutlinecolor_236',['setOutlineColor',['../classSVGElement.html#ac0cc2f6d2e01d364a695bebaa7db18d2',1,'SVGElement']]], - ['setoutlinethickness_237',['setOutlineThickness',['../classSVGElement.html#a88653ebe8b92ec881ab436ea968375a8',1,'SVGElement']]], - ['setparent_238',['setParent',['../classSVGElement.html#a43b3bf06fae88a1634a189272088d11d',1,'SVGElement']]], - ['setposition_239',['setPosition',['../classSVGElement.html#a77aefe4b7e9dbf180cc531c969d0116d',1,'SVGElement::setPosition(float x, float y)'],['../classSVGElement.html#aec8a2f582f21a559c05d791e017efbd5',1,'SVGElement::setPosition(const Vector2Df &position)']]], - ['setradius_240',['setRadius',['../classEll.html#a9f67131ba02c02fccf42c52f5f04525e',1,'Ell::setRadius()'],['../classRect.html#a28b51c4f99cfa0208a2a5cef350c2a5e',1,'Rect::setRadius()']]], - ['settransforms_241',['setTransforms',['../classSVGElement.html#a00fef2ebc5df4838b3f9bd7111b117c5',1,'SVGElement']]], - ['setwidth_242',['setWidth',['../classRect.html#ae11a39d12f7a766f773e662b0830848d',1,'Rect']]], - ['svgelement_243',['SVGElement',['../classSVGElement.html#ad30205005009d2ba4820d3ce372e81ea',1,'SVGElement']]] -]; diff --git a/docs/html/search/functions_c.js b/docs/html/search/functions_c.js deleted file mode 100644 index 532c2b39..00000000 --- a/docs/html/search/functions_c.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['text_244',['Text',['../classText.html#a92c5df61031c3a9af813f9cc6978f34a',1,'Text']]] -]; diff --git a/docs/html/search/functions_e.js b/docs/html/search/functions_e.js deleted file mode 100644 index df144e64..00000000 --- a/docs/html/search/functions_e.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['_7eparser_247',['~Parser',['../classParser.html#a3e658b5917a93a3ef648050d060e3a93',1,'Parser']]], - ['_7esvgelement_248',['~SVGElement',['../classSVGElement.html#a5087280fd4bbb637c3cde64e44e974f1',1,'SVGElement']]], - ['_7eviewer_249',['~Viewer',['../classViewer.html#a324e5a6a1532fe5eac3f3b0e4792b2da',1,'Viewer']]] -]; diff --git a/docs/html/search/variables_0.js b/docs/html/search/variables_0.js deleted file mode 100644 index b860de2a..00000000 --- a/docs/html/search/variables_0.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['a_250',['a',['../classmColor.html#ac086aa72806b8ce55fed3df9ba976f6c',1,'mColor']]], - ['anchor_251',['anchor',['../classText.html#a33f5c94508241a960c139923c284491e',1,'Text']]], - ['attributes_252',['attributes',['../classGroup.html#a9308f587c63720ccbe2bfd1bad868547',1,'Group']]] -]; diff --git a/docs/html/search/variables_1.js b/docs/html/search/variables_1.js deleted file mode 100644 index bb3803f8..00000000 --- a/docs/html/search/variables_1.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['b_253',['b',['../classmColor.html#ad56f2424fa451364becdc4d1c4df657c',1,'mColor']]], - ['black_254',['Black',['../classmColor.html#aa3910d2b82d32c8aa4e50127874a6d03',1,'mColor']]], - ['blue_255',['Blue',['../classmColor.html#a59dc727125e9f3d4ed0c59433dfa0780',1,'mColor']]] -]; diff --git a/docs/html/search/variables_10.js b/docs/html/search/variables_10.js deleted file mode 100644 index a68fb460..00000000 --- a/docs/html/search/variables_10.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['white_286',['White',['../classmColor.html#a73b9b91ca8c79e6e3876e5d83980ebec',1,'mColor']]], - ['width_287',['width',['../classRect.html#a800053c390ccb818add47e627e535a5e',1,'Rect']]] -]; diff --git a/docs/html/search/variables_11.js b/docs/html/search/variables_11.js deleted file mode 100644 index 0faf446a..00000000 --- a/docs/html/search/variables_11.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['x_288',['x',['../classVector2D.html#a65e391ec61c185092a02cf6301d0fff7',1,'Vector2D']]] -]; diff --git a/docs/html/search/variables_12.js b/docs/html/search/variables_12.js deleted file mode 100644 index cb983606..00000000 --- a/docs/html/search/variables_12.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['y_289',['y',['../classVector2D.html#a6a91fccbbd37162d28fa54aeeb88f9d2',1,'Vector2D']]], - ['yellow_290',['Yellow',['../classmColor.html#a68265f053324eea11265c7f8d7fdb5ff',1,'mColor']]] -]; diff --git a/docs/html/search/variables_2.js b/docs/html/search/variables_2.js deleted file mode 100644 index feef47a6..00000000 --- a/docs/html/search/variables_2.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['content_256',['content',['../classText.html#a9336f13d0d4a26d41c2fd2e103ac5dde',1,'Text']]], - ['cyan_257',['Cyan',['../classmColor.html#a04a0d2485c1106ccc94d065a0e62ecfb',1,'mColor']]] -]; diff --git a/docs/html/search/variables_3.js b/docs/html/search/variables_3.js deleted file mode 100644 index 5bafb5f4..00000000 --- a/docs/html/search/variables_3.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['direction_258',['direction',['../classLine.html#a3fe45077492213ef490739c6137200d1',1,'Line']]] -]; diff --git a/docs/html/search/variables_4.js b/docs/html/search/variables_4.js deleted file mode 100644 index 4064568b..00000000 --- a/docs/html/search/variables_4.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['fill_259',['fill',['../classSVGElement.html#a6d3a39e763d3273715ea11f8959f81b1',1,'SVGElement']]], - ['fill_5frule_260',['fill_rule',['../classPath.html#ac5abd8d5994a75cca56205c7e55a5b4f',1,'Path::fill_rule()'],['../classPlygon.html#a91c207c3142183a6714a700ee468a359',1,'Plygon::fill_rule()'],['../classPlyline.html#a71e8a6587d4656f6381e06925ad305d6',1,'Plyline::fill_rule()']]], - ['font_5fsize_261',['font_size',['../classText.html#a71158226b190f16477820e45b549133f',1,'Text']]] -]; diff --git a/docs/html/search/variables_5.js b/docs/html/search/variables_5.js deleted file mode 100644 index 0fa917f2..00000000 --- a/docs/html/search/variables_5.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['g_262',['g',['../classmColor.html#a0cd1254821d108bb8c5be8ec5536f8ec',1,'mColor']]], - ['green_263',['Green',['../classmColor.html#aa69dc1cb58cec64672952d1e84744f8c',1,'mColor']]] -]; diff --git a/docs/html/search/variables_6.js b/docs/html/search/variables_6.js deleted file mode 100644 index 0b826dcf..00000000 --- a/docs/html/search/variables_6.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['height_264',['height',['../classRect.html#a31428cce67b56b6daf168131c7dbe1e8',1,'Rect']]] -]; diff --git a/docs/html/search/variables_9.js b/docs/html/search/variables_9.js deleted file mode 100644 index 1c95063d..00000000 --- a/docs/html/search/variables_9.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['magenta_268',['Magenta',['../classmColor.html#a777df695011fdb21f6b5d3e6745389c4',1,'mColor']]] -]; diff --git a/docs/html/search/variables_b.js b/docs/html/search/variables_b.js deleted file mode 100644 index 81b9d1d7..00000000 --- a/docs/html/search/variables_b.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['offset_5fx_270',['offset_x',['../classViewer.html#a3e16ebbf5c0ed98dc75fe2c4d46fe0d5',1,'Viewer']]], - ['offset_5fy_271',['offset_y',['../classViewer.html#a30b0f57907c82de620339e105f9a3c5b',1,'Viewer']]] -]; diff --git a/docs/html/search/variables_c.js b/docs/html/search/variables_c.js deleted file mode 100644 index 97f58e77..00000000 --- a/docs/html/search/variables_c.js +++ /dev/null @@ -1,6 +0,0 @@ -var searchData= -[ - ['parent_272',['parent',['../classSVGElement.html#adee748c3014de1c1ebd20411a52e824a',1,'SVGElement']]], - ['points_273',['points',['../classPath.html#a1880b844baafdeca91a7cf5d155cf9f1',1,'Path::points()'],['../classPolyShape.html#acbd1d536ad25e34b160e849a0fc12697',1,'PolyShape::points()']]], - ['position_274',['position',['../classSVGElement.html#acf9b9906b6d0cba8bb5c0b38b032e40f',1,'SVGElement']]] -]; diff --git a/docs/html/search/variables_d.js b/docs/html/search/variables_d.js deleted file mode 100644 index a8d77c3f..00000000 --- a/docs/html/search/variables_d.js +++ /dev/null @@ -1,8 +0,0 @@ -var searchData= -[ - ['r_275',['r',['../classmColor.html#a427453d377b30c62f7d25f47120959d6',1,'mColor']]], - ['radius_276',['radius',['../classEll.html#af57a48abe0e2bc8806e73dfa7762388f',1,'Ell::radius()'],['../classRect.html#a7857e3568d2a2a35bf0c6b28028005b5',1,'Rect::radius()']]], - ['red_277',['Red',['../classmColor.html#aa0fc6fe3033f7ff2806c59e39c072dbc',1,'mColor']]], - ['root_278',['root',['../classParser.html#a13a5e2fdac62670c1584de1edbba77f2',1,'Parser']]], - ['rotate_5fangle_279',['rotate_angle',['../classViewer.html#a82dfd34668f986b72e51ee86d4029fc6',1,'Viewer']]] -]; diff --git a/docs/html/search/variables_e.js b/docs/html/search/variables_e.js deleted file mode 100644 index e969f6db..00000000 --- a/docs/html/search/variables_e.js +++ /dev/null @@ -1,7 +0,0 @@ -var searchData= -[ - ['shapes_280',['shapes',['../classGroup.html#a6ff10d6fceb2a78103db2d9783de6f41',1,'Group']]], - ['stroke_281',['stroke',['../classSVGElement.html#aab937dcb566cd83d94d00d69b4083f13',1,'SVGElement']]], - ['stroke_5fwidth_282',['stroke_width',['../classSVGElement.html#a88449b487a890e3765ae20e96ee95c06',1,'SVGElement']]], - ['style_283',['style',['../classText.html#a12ee81ccf865a414867d4101c8dbbdb2',1,'Text']]] -]; diff --git a/docs/html/search/variables_f.js b/docs/html/search/variables_f.js deleted file mode 100644 index 763ac272..00000000 --- a/docs/html/search/variables_f.js +++ /dev/null @@ -1,5 +0,0 @@ -var searchData= -[ - ['transforms_284',['transforms',['../classSVGElement.html#aefeee5c1de3e802d9f5f0a54078170e6',1,'SVGElement']]], - ['transparent_285',['Transparent',['../classmColor.html#ac4f0afaa513bbe9e68c16156136d4ada',1,'mColor']]] -]; diff --git a/docs/html/structPathPoint.js b/docs/html/structPathPoint.js deleted file mode 100644 index 435c168c..00000000 --- a/docs/html/structPathPoint.js +++ /dev/null @@ -1,5 +0,0 @@ -var structPathPoint = -[ - [ "Point", "structPathPoint.html#a7af911b1e9c6b451f8e869b12ac7ef0c", null ], - [ "TC", "structPathPoint.html#ab87850db87370b39084e97ba96c4aca3", null ] -]; \ No newline at end of file diff --git a/docs/html/structPathPoint__coll__graph.md5 b/docs/html/structPathPoint__coll__graph.md5 deleted file mode 100644 index c5335de7..00000000 --- a/docs/html/structPathPoint__coll__graph.md5 +++ /dev/null @@ -1 +0,0 @@ -44cfe3d5c47850d8ec2bc990445752bd \ No newline at end of file diff --git a/docs/html/index.html b/docs/index.html similarity index 99% rename from docs/html/index.html rename to docs/index.html index 3c40e4d2..f5791dfa 100644 --- a/docs/html/index.html +++ b/docs/index.html @@ -60,7 +60,7 @@
                                                          svg-reader -  0.2 +  0.3
                                                          Parse and render SVG files, handle user interactions.
                                                          diff --git a/docs/inherit_graph_0.map b/docs/inherit_graph_0.map new file mode 100644 index 00000000..5a644b30 --- /dev/null +++ b/docs/inherit_graph_0.map @@ -0,0 +1,5 @@ + + + + + diff --git a/docs/inherit_graph_0.md5 b/docs/inherit_graph_0.md5 new file mode 100644 index 00000000..38ee7218 --- /dev/null +++ b/docs/inherit_graph_0.md5 @@ -0,0 +1 @@ +7a024556b281146d5c87fc69160b63da \ No newline at end of file diff --git a/docs/html/inherit_graph_0.png b/docs/inherit_graph_0.png similarity index 100% rename from docs/html/inherit_graph_0.png rename to docs/inherit_graph_0.png diff --git a/docs/inherit_graph_0.svg b/docs/inherit_graph_0.svg new file mode 100644 index 00000000..69349df9 --- /dev/null +++ b/docs/inherit_graph_0.svg @@ -0,0 +1,51 @@ + + + + + + +Graphical Class Hierarchy + + +Node0 + + +Gradient + + + + + +Node1 + + +LinearGradient + + + + + +Node0->Node1 + + + + + +Node2 + + +RadialGradient + + + + + +Node0->Node2 + + + + + diff --git a/docs/html/inherit_graph_0.map b/docs/inherit_graph_1.map similarity index 100% rename from docs/html/inherit_graph_0.map rename to docs/inherit_graph_1.map diff --git a/docs/html/inherit_graph_0.md5 b/docs/inherit_graph_1.md5 similarity index 100% rename from docs/html/inherit_graph_0.md5 rename to docs/inherit_graph_1.md5 diff --git a/docs/html/inherit_graph_1.png b/docs/inherit_graph_1.png similarity index 100% rename from docs/html/inherit_graph_1.png rename to docs/inherit_graph_1.png diff --git a/docs/html/inherit_graph_0.svg b/docs/inherit_graph_1.svg similarity index 100% rename from docs/html/inherit_graph_0.svg rename to docs/inherit_graph_1.svg diff --git a/docs/html/inherit_graph_1.map b/docs/inherit_graph_2.map similarity index 100% rename from docs/html/inherit_graph_1.map rename to docs/inherit_graph_2.map diff --git a/docs/html/inherit_graph_1.md5 b/docs/inherit_graph_2.md5 similarity index 100% rename from docs/html/inherit_graph_1.md5 rename to docs/inherit_graph_2.md5 diff --git a/docs/html/inherit_graph_2.png b/docs/inherit_graph_2.png similarity index 100% rename from docs/html/inherit_graph_2.png rename to docs/inherit_graph_2.png diff --git a/docs/html/inherit_graph_1.svg b/docs/inherit_graph_2.svg similarity index 100% rename from docs/html/inherit_graph_1.svg rename to docs/inherit_graph_2.svg diff --git a/docs/html/inherit_graph_2.map b/docs/inherit_graph_3.map similarity index 100% rename from docs/html/inherit_graph_2.map rename to docs/inherit_graph_3.map diff --git a/docs/html/inherit_graph_2.md5 b/docs/inherit_graph_3.md5 similarity index 100% rename from docs/html/inherit_graph_2.md5 rename to docs/inherit_graph_3.md5 diff --git a/docs/html/inherit_graph_2.svg b/docs/inherit_graph_3.svg similarity index 100% rename from docs/html/inherit_graph_2.svg rename to docs/inherit_graph_3.svg diff --git a/docs/html/inherit_graph_3.map b/docs/inherit_graph_4.map similarity index 100% rename from docs/html/inherit_graph_3.map rename to docs/inherit_graph_4.map diff --git a/docs/html/inherit_graph_3.md5 b/docs/inherit_graph_4.md5 similarity index 100% rename from docs/html/inherit_graph_3.md5 rename to docs/inherit_graph_4.md5 diff --git a/docs/html/inherit_graph_3.svg b/docs/inherit_graph_4.svg similarity index 100% rename from docs/html/inherit_graph_3.svg rename to docs/inherit_graph_4.svg diff --git a/docs/inherit_graph_5.map b/docs/inherit_graph_5.map new file mode 100644 index 00000000..bb0b61b3 --- /dev/null +++ b/docs/inherit_graph_5.map @@ -0,0 +1,3 @@ + + + diff --git a/docs/inherit_graph_5.md5 b/docs/inherit_graph_5.md5 new file mode 100644 index 00000000..88763cbf --- /dev/null +++ b/docs/inherit_graph_5.md5 @@ -0,0 +1 @@ +0e0866062b02d4d9d213750b8f521f83 \ No newline at end of file diff --git a/docs/inherit_graph_5.svg b/docs/inherit_graph_5.svg new file mode 100644 index 00000000..f243c377 --- /dev/null +++ b/docs/inherit_graph_5.svg @@ -0,0 +1,21 @@ + + + + + + +Graphical Class Hierarchy + + +Node0 + + +Stop + + + + + diff --git a/docs/html/inherit_graph_4.map b/docs/inherit_graph_6.map similarity index 79% rename from docs/html/inherit_graph_4.map rename to docs/inherit_graph_6.map index a29ad127..e4b1db37 100644 --- a/docs/html/inherit_graph_4.map +++ b/docs/inherit_graph_6.map @@ -1,13 +1,13 @@ - + - + + - - - + + diff --git a/docs/inherit_graph_6.md5 b/docs/inherit_graph_6.md5 new file mode 100644 index 00000000..50f771d2 --- /dev/null +++ b/docs/inherit_graph_6.md5 @@ -0,0 +1 @@ +8a44eebdcd3fa697656a11d2b89f53fc \ No newline at end of file diff --git a/docs/html/inherit_graph_4.svg b/docs/inherit_graph_6.svg similarity index 53% rename from docs/html/inherit_graph_4.svg rename to docs/inherit_graph_6.svg index 6bb23b60..a32bd93e 100644 --- a/docs/html/inherit_graph_4.svg +++ b/docs/inherit_graph_6.svg @@ -4,16 +4,16 @@ - - + + Graphical Class Hierarchy Node0 - -SVGElement + +SVGElement @@ -21,76 +21,91 @@ Node1 - -Ell + +Ell Node0->Node1 - - + + Node3 - -Group + +Group Node0->Node3 - - + + Node4 - -Line + +Line Node0->Node4 - - + + Node5 - -Path + +Path Node0->Node5 - - + + Node6 - -PolyShape + +PolyShape Node0->Node6 - - + + + + + +Node9 + + +Rect + + + + + +Node0->Node9 + + @@ -104,68 +119,53 @@ Node0->Node10 - - + + Node2 - -Circle + +Circle Node1->Node2 - - + + Node7 - -Plygon + +Plygon Node6->Node7 - - + + Node8 - -Plyline + +Plyline Node6->Node8 - - - - - -Node9 - - -Rect - - - - - -Node6->Node9 - - + + diff --git a/docs/html/inherit_graph_5.map b/docs/inherit_graph_7.map similarity index 100% rename from docs/html/inherit_graph_5.map rename to docs/inherit_graph_7.map diff --git a/docs/html/inherit_graph_5.md5 b/docs/inherit_graph_7.md5 similarity index 100% rename from docs/html/inherit_graph_5.md5 rename to docs/inherit_graph_7.md5 diff --git a/docs/html/inherit_graph_5.svg b/docs/inherit_graph_7.svg similarity index 100% rename from docs/html/inherit_graph_5.svg rename to docs/inherit_graph_7.svg diff --git a/docs/html/inherit_graph_6.map b/docs/inherit_graph_8.map similarity index 100% rename from docs/html/inherit_graph_6.map rename to docs/inherit_graph_8.map diff --git a/docs/html/inherit_graph_6.md5 b/docs/inherit_graph_8.md5 similarity index 100% rename from docs/html/inherit_graph_6.md5 rename to docs/inherit_graph_8.md5 diff --git a/docs/html/inherit_graph_6.svg b/docs/inherit_graph_8.svg similarity index 100% rename from docs/html/inherit_graph_6.svg rename to docs/inherit_graph_8.svg diff --git a/docs/html/inherit_graph_7.map b/docs/inherit_graph_9.map similarity index 100% rename from docs/html/inherit_graph_7.map rename to docs/inherit_graph_9.map diff --git a/docs/html/inherit_graph_7.md5 b/docs/inherit_graph_9.md5 similarity index 100% rename from docs/html/inherit_graph_7.md5 rename to docs/inherit_graph_9.md5 diff --git a/docs/html/inherit_graph_7.svg b/docs/inherit_graph_9.svg similarity index 100% rename from docs/html/inherit_graph_7.svg rename to docs/inherit_graph_9.svg diff --git a/docs/html/inherits.html b/docs/inherits.html similarity index 87% rename from docs/html/inherits.html rename to docs/inherits.html index e4f0d07b..cb78d1a3 100644 --- a/docs/html/inherits.html +++ b/docs/inherits.html @@ -60,7 +60,7 @@
                                                          svg-reader -  0.2 +  0.3
                                                          Parse and render SVG files, handle user interactions.
                                                          @@ -124,14 +124,26 @@ - - - - - - - - + + + + + + + + + +
                                                          +
                                                          +
                                                          +
                                                          +
                                                          +
                                                          +
                                                          +
                                                          +
                                                          +
                                                          +
                                                          diff --git a/docs/html/jquery.js b/docs/jquery.js similarity index 100% rename from docs/html/jquery.js rename to docs/jquery.js diff --git a/docs/latex/code_documentation.pdf b/docs/latex/code_documentation.pdf deleted file mode 100644 index 941c5504..00000000 Binary files a/docs/latex/code_documentation.pdf and /dev/null differ diff --git a/docs/html/main_8cpp_source.html b/docs/main_8cpp_source.html similarity index 64% rename from docs/html/main_8cpp_source.html rename to docs/main_8cpp_source.html index 1cd012e5..0d9468a8 100644 --- a/docs/html/main_8cpp_source.html +++ b/docs/main_8cpp_source.html @@ -60,7 +60,7 @@
                                                          svg-reader -  0.2 +  0.3
                                                          Parse and render SVG files, handle user interactions.
                                                          @@ -140,113 +140,151 @@
                                                          17  if (!parser) {
                                                          18  parser = Parser::getInstance(filePath);
                                                          19  }
                                                          -
                                                          20  graphics.RotateTransform(viewer.rotate_angle);
                                                          -
                                                          21  graphics.ScaleTransform(viewer.zoom_factor, viewer.zoom_factor);
                                                          -
                                                          22  graphics.TranslateTransform(viewer.offset_x, viewer.offset_y);
                                                          -
                                                          23  graphics.SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias8x8);
                                                          -
                                                          24  graphics.SetTextContrast(100);
                                                          -
                                                          25  graphics.SetCompositingMode(Gdiplus::CompositingModeSourceOver);
                                                          -
                                                          26  graphics.SetPixelOffsetMode(Gdiplus::PixelOffsetModeHighQuality);
                                                          -
                                                          27  graphics.SetInterpolationMode(Gdiplus::InterpolationModeHighQuality);
                                                          -
                                                          28  Renderer* renderer = Renderer::getInstance();
                                                          -
                                                          29  SVGElement* root = parser->getRoot();
                                                          -
                                                          30  Group* group = dynamic_cast< Group* >(root);
                                                          -
                                                          31  renderer->draw(graphics, group);
                                                          -
                                                          32 }
                                                          -
                                                          33 
                                                          -
                                                          34 INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR, INT iCmdShow) {
                                                          -
                                                          35  HWND hWnd;
                                                          -
                                                          36  MSG msg;
                                                          -
                                                          37  WNDCLASS wndClass;
                                                          -
                                                          38  Gdiplus::GdiplusStartupInput gdiplusStartupInput;
                                                          -
                                                          39  ULONG_PTR gdiplusToken;
                                                          -
                                                          40 
                                                          -
                                                          41  // Initialize GDI+.
                                                          -
                                                          42  GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
                                                          -
                                                          43 
                                                          -
                                                          44  wndClass.style = CS_HREDRAW | CS_VREDRAW;
                                                          -
                                                          45  wndClass.lpfnWndProc = WndProc;
                                                          -
                                                          46  wndClass.cbClsExtra = 0;
                                                          -
                                                          47  wndClass.cbWndExtra = 0;
                                                          -
                                                          48  wndClass.hInstance = hInstance;
                                                          -
                                                          49  wndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
                                                          -
                                                          50  wndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
                                                          -
                                                          51  wndClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
                                                          -
                                                          52  wndClass.lpszMenuName = NULL;
                                                          -
                                                          53  wndClass.lpszClassName = TEXT("svg-reader-v0.2");
                                                          -
                                                          54 
                                                          -
                                                          55  RegisterClass(&wndClass);
                                                          -
                                                          56 
                                                          -
                                                          57  hWnd = CreateWindowEx(0,
                                                          -
                                                          58  TEXT("svg-reader-v0.2"), // window class name
                                                          -
                                                          59  TEXT("svg-reader-v0.2"), // window caption
                                                          -
                                                          60  WS_OVERLAPPEDWINDOW, // window style
                                                          -
                                                          61  CW_USEDEFAULT, // initial x position
                                                          -
                                                          62  CW_USEDEFAULT, // initial y position
                                                          -
                                                          63  1600, // initial x size
                                                          -
                                                          64  1200, // initial y size
                                                          -
                                                          65  NULL, // parent window handle
                                                          -
                                                          66  NULL, // window menu handle
                                                          -
                                                          67  hInstance, // program instance handle
                                                          -
                                                          68  NULL); // creation parameters
                                                          -
                                                          69 
                                                          -
                                                          70  ShowWindow(hWnd, iCmdShow);
                                                          -
                                                          71  UpdateWindow(hWnd);
                                                          +
                                                          20  Vector2Df viewport = parser->getViewPort();
                                                          +
                                                          21  std::pair< Vector2Df, Vector2Df > viewbox = parser->getViewBox();
                                                          +
                                                          22  if (viewport.x == 0 && viewport.y == 0) {
                                                          +
                                                          23  viewport.x = viewer.window_size.x;
                                                          +
                                                          24  viewport.y = viewer.window_size.y;
                                                          +
                                                          25  }
                                                          +
                                                          26  graphics.SetClip(Gdiplus::Rect(0, 0, viewport.x, viewport.y));
                                                          +
                                                          27  if ((viewport.x != viewbox.second.x || viewport.y != viewbox.second.y) &&
                                                          +
                                                          28  viewbox.second.x != 0 && viewbox.second.y != 0) {
                                                          +
                                                          29  float scale_x = viewport.x / viewbox.second.x;
                                                          +
                                                          30  float scale_y = viewport.y / viewbox.second.y;
                                                          +
                                                          31  float scale = std::min(scale_x, scale_y);
                                                          +
                                                          32  scale = roundf(scale * 100) / 100;
                                                          +
                                                          33  graphics.ScaleTransform(scale, scale);
                                                          +
                                                          34  float offset_x = 0.0f;
                                                          +
                                                          35  float offset_y = 0.0f;
                                                          +
                                                          36  if (viewport.x > viewbox.second.x) {
                                                          +
                                                          37  offset_x = (viewport.x - viewbox.second.x * scale) / 2 / scale;
                                                          +
                                                          38  }
                                                          +
                                                          39  if (viewport.y > viewbox.second.y) {
                                                          +
                                                          40  offset_y = (viewport.y - viewbox.second.y * scale) / 2 / scale;
                                                          +
                                                          41  }
                                                          +
                                                          42  graphics.TranslateTransform(offset_x, offset_y);
                                                          +
                                                          43  }
                                                          +
                                                          44  graphics.TranslateTransform(-viewbox.first.x, -viewbox.first.y);
                                                          +
                                                          45 
                                                          +
                                                          46  graphics.SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias8x8);
                                                          +
                                                          47  graphics.SetTextContrast(100);
                                                          +
                                                          48  graphics.SetCompositingMode(Gdiplus::CompositingModeSourceOver);
                                                          +
                                                          49  graphics.SetPixelOffsetMode(Gdiplus::PixelOffsetModeHighQuality);
                                                          +
                                                          50  graphics.SetInterpolationMode(Gdiplus::InterpolationModeHighQuality);
                                                          +
                                                          51 
                                                          +
                                                          52  Gdiplus::Matrix matrix;
                                                          +
                                                          53  Gdiplus::Region region;
                                                          +
                                                          54  graphics.GetClip(&region);
                                                          +
                                                          55  graphics.RotateTransform(viewer.rotate_angle);
                                                          +
                                                          56  graphics.ScaleTransform(viewer.zoom_factor, viewer.zoom_factor);
                                                          +
                                                          57  graphics.TranslateTransform(viewer.offset_x, viewer.offset_y);
                                                          +
                                                          58  graphics.SetClip(&region);
                                                          +
                                                          59 
                                                          +
                                                          60  Renderer* renderer = Renderer::getInstance();
                                                          +
                                                          61  SVGElement* root = parser->getRoot();
                                                          +
                                                          62  Group* group = dynamic_cast< Group* >(root);
                                                          +
                                                          63  renderer->draw(graphics, group);
                                                          +
                                                          64 }
                                                          +
                                                          65 
                                                          +
                                                          66 INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR, INT iCmdShow) {
                                                          +
                                                          67  HWND hWnd;
                                                          +
                                                          68  MSG msg;
                                                          +
                                                          69  WNDCLASS wndClass;
                                                          +
                                                          70  Gdiplus::GdiplusStartupInput gdiplusStartupInput;
                                                          +
                                                          71  ULONG_PTR gdiplusToken;
                                                          72 
                                                          -
                                                          73  while (GetMessage(&msg, NULL, 0, 0)) {
                                                          -
                                                          74  TranslateMessage(&msg);
                                                          -
                                                          75  DispatchMessage(&msg);
                                                          -
                                                          76  }
                                                          -
                                                          77 
                                                          -
                                                          78  if (parser) delete parser;
                                                          -
                                                          79  Gdiplus::GdiplusShutdown(gdiplusToken);
                                                          -
                                                          80  return msg.wParam;
                                                          -
                                                          81 }
                                                          -
                                                          82 
                                                          -
                                                          83 LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
                                                          -
                                                          84  LPARAM lParam) {
                                                          -
                                                          85  HDC hdc;
                                                          -
                                                          86  PAINTSTRUCT ps;
                                                          -
                                                          87  std::string filePath;
                                                          -
                                                          88  if (__argc > 1) {
                                                          -
                                                          89  filePath = __argv[1];
                                                          -
                                                          90  }
                                                          -
                                                          91  Viewer* viewer = Viewer::getInstance();
                                                          -
                                                          92  switch (message) {
                                                          -
                                                          93  case WM_PAINT:
                                                          -
                                                          94  hdc = BeginPaint(hWnd, &ps);
                                                          -
                                                          95  OnPaint(hdc, filePath, *viewer);
                                                          -
                                                          96  EndPaint(hWnd, &ps);
                                                          -
                                                          97  return 0;
                                                          -
                                                          98  case WM_MOUSEWHEEL:
                                                          -
                                                          99  case WM_MOUSEMOVE:
                                                          -
                                                          100  case WM_LBUTTONDOWN:
                                                          -
                                                          101  case WM_LBUTTONUP:
                                                          -
                                                          102  viewer->handleMouseEvent(message, wParam, lParam);
                                                          -
                                                          103  if (viewer->needs_repaint) {
                                                          -
                                                          104  InvalidateRect(hWnd, NULL, TRUE);
                                                          -
                                                          105  viewer->needs_repaint = false;
                                                          -
                                                          106  }
                                                          -
                                                          107  return 0;
                                                          -
                                                          108  case WM_KEYDOWN:
                                                          -
                                                          109  viewer->handleKeyEvent(wParam);
                                                          -
                                                          110  InvalidateRect(hWnd, NULL, TRUE);
                                                          -
                                                          111  return 0;
                                                          -
                                                          112  case WM_DESTROY:
                                                          -
                                                          113  PostQuitMessage(0);
                                                          -
                                                          114  return 0;
                                                          -
                                                          115  default:
                                                          -
                                                          116  return DefWindowProc(hWnd, message, wParam, lParam);
                                                          -
                                                          117  }
                                                          -
                                                          118 }
                                                          +
                                                          73  // Initialize GDI+.
                                                          +
                                                          74  GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
                                                          +
                                                          75 
                                                          +
                                                          76  wndClass.style = CS_HREDRAW | CS_VREDRAW;
                                                          +
                                                          77  wndClass.lpfnWndProc = WndProc;
                                                          +
                                                          78  wndClass.cbClsExtra = 0;
                                                          +
                                                          79  wndClass.cbWndExtra = 0;
                                                          +
                                                          80  wndClass.hInstance = hInstance;
                                                          +
                                                          81  wndClass.hIcon = LoadIcon(NULL, IDI_APPLICATION);
                                                          +
                                                          82  wndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
                                                          +
                                                          83  wndClass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
                                                          +
                                                          84  wndClass.lpszMenuName = NULL;
                                                          +
                                                          85  wndClass.lpszClassName = TEXT("svg-reader-v0.2");
                                                          +
                                                          86 
                                                          +
                                                          87  RegisterClass(&wndClass);
                                                          +
                                                          88 
                                                          +
                                                          89  hWnd = CreateWindowEx(0,
                                                          +
                                                          90  TEXT("svg-reader-v0.2"), // window class name
                                                          +
                                                          91  TEXT("svg-reader-v0.2"), // window caption
                                                          +
                                                          92  WS_OVERLAPPEDWINDOW, // window style
                                                          +
                                                          93  0, // initial x position
                                                          +
                                                          94  0, // initial y position
                                                          +
                                                          95  1600, // initial x size
                                                          +
                                                          96  900, // initial y size
                                                          +
                                                          97  NULL, // parent window handle
                                                          +
                                                          98  NULL, // window menu handle
                                                          +
                                                          99  hInstance, // program instance handle
                                                          +
                                                          100  NULL); // creation parameters
                                                          +
                                                          101 
                                                          +
                                                          102  ShowWindow(hWnd, iCmdShow);
                                                          +
                                                          103  UpdateWindow(hWnd);
                                                          +
                                                          104 
                                                          +
                                                          105  while (GetMessage(&msg, NULL, 0, 0)) {
                                                          +
                                                          106  TranslateMessage(&msg);
                                                          +
                                                          107  DispatchMessage(&msg);
                                                          +
                                                          108  }
                                                          +
                                                          109 
                                                          +
                                                          110  if (parser) delete parser;
                                                          +
                                                          111  Gdiplus::GdiplusShutdown(gdiplusToken);
                                                          +
                                                          112  return msg.wParam;
                                                          +
                                                          113 }
                                                          +
                                                          114 
                                                          +
                                                          115 LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
                                                          +
                                                          116  LPARAM lParam) {
                                                          +
                                                          117  HDC hdc;
                                                          +
                                                          118  PAINTSTRUCT ps;
                                                          +
                                                          119  std::string filePath;
                                                          +
                                                          120  if (__argc > 1) {
                                                          +
                                                          121  filePath = __argv[1];
                                                          +
                                                          122  }
                                                          +
                                                          123  Viewer* viewer = Viewer::getInstance();
                                                          +
                                                          124  switch (message) {
                                                          +
                                                          125  case WM_PAINT:
                                                          +
                                                          126  hdc = BeginPaint(hWnd, &ps);
                                                          +
                                                          127  viewer->getWindowSize(hWnd);
                                                          +
                                                          128  OnPaint(hdc, filePath, *viewer);
                                                          +
                                                          129  EndPaint(hWnd, &ps);
                                                          +
                                                          130  return 0;
                                                          +
                                                          131  case WM_MOUSEWHEEL:
                                                          +
                                                          132  case WM_MOUSEMOVE:
                                                          +
                                                          133  case WM_LBUTTONDOWN:
                                                          +
                                                          134  case WM_LBUTTONUP:
                                                          +
                                                          135  viewer->handleMouseEvent(message, wParam, lParam);
                                                          +
                                                          136  if (viewer->needs_repaint) {
                                                          +
                                                          137  InvalidateRect(hWnd, NULL, TRUE);
                                                          +
                                                          138  viewer->needs_repaint = false;
                                                          +
                                                          139  }
                                                          +
                                                          140  return 0;
                                                          +
                                                          141  case WM_KEYDOWN:
                                                          +
                                                          142  viewer->handleKeyEvent(wParam);
                                                          +
                                                          143  InvalidateRect(hWnd, NULL, TRUE);
                                                          +
                                                          144  return 0;
                                                          +
                                                          145  case WM_DESTROY:
                                                          +
                                                          146  PostQuitMessage(0);
                                                          +
                                                          147  return 0;
                                                          +
                                                          148  default:
                                                          +
                                                          149  return DefWindowProc(hWnd, message, wParam, lParam);
                                                          +
                                                          150  }
                                                          +
                                                          151 }
                                                          A composite class that contains a vector of shape pointers (polymorphic).
                                                          Definition: Group.hpp:19
                                                          -
                                                          To manipulate and parse an SVG file.
                                                          Definition: Parser.hpp:34
                                                          -
                                                          static Parser * getInstance(const std::string &file_name)
                                                          Gets the singleton instance of the Parser class.
                                                          Definition: Parser.cpp:129
                                                          -
                                                          Group * getRoot()
                                                          Gets the root of the SVG file.
                                                          Definition: Parser.cpp:140
                                                          +
                                                          To manipulate and parse an SVG file.
                                                          Definition: Parser.hpp:24
                                                          +
                                                          Vector2Df getViewPort() const
                                                          Gets the viewport of the SVG file.
                                                          Definition: Parser.cpp:832
                                                          +
                                                          static Parser * getInstance(const std::string &file_name)
                                                          Gets the singleton instance of the Parser class.
                                                          Definition: Parser.cpp:158
                                                          +
                                                          std::pair< Vector2Df, Vector2Df > getViewBox() const
                                                          Gets the viewbox of the SVG file.
                                                          Definition: Parser.cpp:830
                                                          +
                                                          Group * getRoot()
                                                          Gets the root of the tree of SVGElements.
                                                          Definition: Parser.cpp:169
                                                          Singleton class responsible for rendering shapes using GDI+.
                                                          Definition: Renderer.hpp:24
                                                          -
                                                          void draw(Gdiplus::Graphics &graphics, Group *group) const
                                                          Draws a shape using Gdiplus::Graphics based on its type.
                                                          Definition: Renderer.cpp:69
                                                          -
                                                          static Renderer * getInstance()
                                                          Gets the singleton instance of the Renderer class.
                                                          Definition: Renderer.cpp:7
                                                          -
                                                          Represents an element in an SVG file.
                                                          Definition: SVGElement.hpp:17
                                                          +
                                                          void draw(Gdiplus::Graphics &graphics, Group *group) const
                                                          Draws a shape using Gdiplus::Graphics based on its type.
                                                          Definition: Renderer.cpp:73
                                                          +
                                                          static Renderer * getInstance()
                                                          Gets the singleton instance of the Renderer class.
                                                          Definition: Renderer.cpp:11
                                                          +
                                                          Represents an element in an SVG file.
                                                          Definition: SVGElement.hpp:18
                                                          + +
                                                          T x
                                                          X coordinate of the vector.
                                                          Definition: Vector2D.hpp:45
                                                          +
                                                          T y
                                                          Y coordinate of the vector.
                                                          Definition: Vector2D.hpp:46
                                                          Represents a viewer for rendering and interacting with a scene.
                                                          Definition: Viewer.hpp:16
                                                          float offset_y
                                                          Y-coordinate offset of the viewer.
                                                          Definition: Viewer.hpp:19
                                                          float offset_x
                                                          X-coordinate offset of the viewer.
                                                          Definition: Viewer.hpp:18
                                                          @@ -255,6 +293,8 @@
                                                          void handleKeyEvent(WPARAM wParam)
                                                          Handles keyboard events.
                                                          Definition: Viewer.cpp:47
                                                          static Viewer * getInstance()
                                                          Gets the singleton instance of the Viewer class.
                                                          Definition: Viewer.cpp:4
                                                          float rotate_angle
                                                          Rotation angle of the view.
                                                          Definition: Viewer.hpp:21
                                                          +
                                                          Vector2Df window_size
                                                          Size of the window.
                                                          Definition: Viewer.hpp:24
                                                          +
                                                          void getWindowSize(HWND hWnd) const
                                                          Get the current window size.
                                                          Definition: Viewer.cpp:103
                                                          void handleMouseEvent(UINT message, WPARAM wParam, LPARAM lParam)
                                                          Handles mouse events, such as wheel, move, left button down, and left button up.
                                                          Definition: Viewer.cpp:26
                                                          diff --git a/docs/html/menu.js b/docs/menu.js similarity index 100% rename from docs/html/menu.js rename to docs/menu.js diff --git a/docs/html/menudata.js b/docs/menudata.js similarity index 76% rename from docs/html/menudata.js rename to docs/menudata.js index ce391d8b..cbf38df9 100644 --- a/docs/html/menudata.js +++ b/docs/menudata.js @@ -31,28 +31,29 @@ var menudata={children:[ {text:"Class Members",url:"functions.html",children:[ {text:"All",url:"functions.html",children:[ {text:"a",url:"functions.html#index_a"}, -{text:"b",url:"functions.html#index_b"}, -{text:"c",url:"functions.html#index_c"}, -{text:"d",url:"functions.html#index_d"}, -{text:"e",url:"functions.html#index_e"}, -{text:"f",url:"functions.html#index_f"}, -{text:"g",url:"functions.html#index_g"}, -{text:"h",url:"functions.html#index_h"}, -{text:"i",url:"functions.html#index_i"}, -{text:"l",url:"functions.html#index_l"}, -{text:"m",url:"functions.html#index_m"}, -{text:"n",url:"functions.html#index_n"}, -{text:"o",url:"functions.html#index_o"}, -{text:"p",url:"functions.html#index_p"}, -{text:"r",url:"functions.html#index_r"}, -{text:"s",url:"functions.html#index_s"}, -{text:"t",url:"functions.html#index_t"}, -{text:"v",url:"functions.html#index_v"}, -{text:"w",url:"functions.html#index_w"}, -{text:"x",url:"functions.html#index_x"}, -{text:"y",url:"functions.html#index_y"}, -{text:"z",url:"functions.html#index_z"}, -{text:"~",url:"functions.html#index__7E"}]}, +{text:"b",url:"functions_b.html#index_b"}, +{text:"c",url:"functions_c.html#index_c"}, +{text:"d",url:"functions_d.html#index_d"}, +{text:"e",url:"functions_e.html#index_e"}, +{text:"f",url:"functions_f.html#index_f"}, +{text:"g",url:"functions_g.html#index_g"}, +{text:"h",url:"functions_h.html#index_h"}, +{text:"i",url:"functions_i.html#index_i"}, +{text:"l",url:"functions_l.html#index_l"}, +{text:"m",url:"functions_m.html#index_m"}, +{text:"n",url:"functions_n.html#index_n"}, +{text:"o",url:"functions_o.html#index_o"}, +{text:"p",url:"functions_p.html#index_p"}, +{text:"r",url:"functions_r.html#index_r"}, +{text:"s",url:"functions_s.html#index_s"}, +{text:"t",url:"functions_t.html#index_t"}, +{text:"u",url:"functions_u.html#index_u"}, +{text:"v",url:"functions_v.html#index_v"}, +{text:"w",url:"functions_w.html#index_w"}, +{text:"x",url:"functions_x.html#index_x"}, +{text:"y",url:"functions_y.html#index_y"}, +{text:"z",url:"functions_z.html#index_z"}, +{text:"~",url:"functions_~.html#index__7E"}]}, {text:"Functions",url:"functions_func.html",children:[ {text:"a",url:"functions_func.html#index_a"}, {text:"c",url:"functions_func.html#index_c"}, @@ -86,6 +87,8 @@ var menudata={children:[ {text:"r",url:"functions_vars.html#index_r"}, {text:"s",url:"functions_vars.html#index_s"}, {text:"t",url:"functions_vars.html#index_t"}, +{text:"u",url:"functions_vars.html#index_u"}, +{text:"v",url:"functions_vars.html#index_v"}, {text:"w",url:"functions_vars.html#index_w"}, {text:"x",url:"functions_vars.html#index_x"}, {text:"y",url:"functions_vars.html#index_y"}, diff --git a/docs/html/nav_f.png b/docs/nav_f.png similarity index 100% rename from docs/html/nav_f.png rename to docs/nav_f.png diff --git a/docs/html/nav_g.png b/docs/nav_g.png similarity index 100% rename from docs/html/nav_g.png rename to docs/nav_g.png diff --git a/docs/html/nav_h.png b/docs/nav_h.png similarity index 100% rename from docs/html/nav_h.png rename to docs/nav_h.png diff --git a/docs/html/navtree.css b/docs/navtree.css similarity index 100% rename from docs/html/navtree.css rename to docs/navtree.css diff --git a/docs/html/navtree.js b/docs/navtree.js similarity index 100% rename from docs/html/navtree.js rename to docs/navtree.js diff --git a/docs/html/navtreedata.js b/docs/navtreedata.js similarity index 93% rename from docs/html/navtreedata.js rename to docs/navtreedata.js index ec0d4b37..80837604 100644 --- a/docs/html/navtreedata.js +++ b/docs/navtreedata.js @@ -30,7 +30,7 @@ var NAVTREE = [ "Class Index", "classes.html", null ], [ "Class Hierarchy", "hierarchy.html", "hierarchy" ], [ "Class Members", "functions.html", [ - [ "All", "functions.html", null ], + [ "All", "functions.html", "functions_dup" ], [ "Functions", "functions_func.html", null ], [ "Variables", "functions_vars.html", null ], [ "Related Functions", "functions_rela.html", null ] @@ -44,7 +44,8 @@ var NAVTREE = var NAVTREEINDEX = [ -"Circle_8cpp_source.html" +"Circle_8cpp_source.html", +"classViewer.html#a324e5a6a1532fe5eac3f3b0e4792b2da" ]; var SYNCONMSG = 'click to disable panel synchronisation'; diff --git a/docs/navtreeindex0.js b/docs/navtreeindex0.js new file mode 100644 index 00000000..d1069a61 --- /dev/null +++ b/docs/navtreeindex0.js @@ -0,0 +1,253 @@ +var NAVTREEINDEX0 = +{ +"Circle_8cpp_source.html":[1,0,0,0,0], +"Circle_8hpp_source.html":[1,0,0,0,1], +"Color_8cpp_source.html":[1,0,0,0,2], +"Color_8hpp_source.html":[1,0,0,0,3], +"Ellipse_8cpp_source.html":[1,0,0,0,4], +"Ellipse_8hpp_source.html":[1,0,0,0,5], +"Gradient_8cpp_source.html":[1,0,0,0,6], +"Gradient_8hpp_source.html":[1,0,0,0,7], +"Graphics_8hpp_source.html":[1,0,0,1], +"Group_8cpp_source.html":[1,0,0,0,8], +"Group_8hpp_source.html":[1,0,0,0,9], +"Line_8cpp_source.html":[1,0,0,0,10], +"Line_8hpp_source.html":[1,0,0,0,11], +"LinearGradient_8cpp_source.html":[1,0,0,0,12], +"LinearGradient_8hpp_source.html":[1,0,0,0,13], +"Parser_8cpp_source.html":[1,0,0,3], +"Parser_8hpp_source.html":[1,0,0,4], +"Path_8cpp_source.html":[1,0,0,0,14], +"Path_8hpp_source.html":[1,0,0,0,15], +"PolyShape_8cpp_source.html":[1,0,0,0,20], +"PolyShape_8hpp_source.html":[1,0,0,0,21], +"Polygon_8cpp_source.html":[1,0,0,0,16], +"Polygon_8hpp_source.html":[1,0,0,0,17], +"Polyline_8cpp_source.html":[1,0,0,0,18], +"Polyline_8hpp_source.html":[1,0,0,0,19], +"RadialGradient_8cpp_source.html":[1,0,0,0,22], +"RadialGradient_8hpp_source.html":[1,0,0,0,23], +"Rect_8cpp_source.html":[1,0,0,0,24], +"Rect_8hpp_source.html":[1,0,0,0,25], +"Renderer_8cpp_source.html":[1,0,0,5], +"Renderer_8hpp_source.html":[1,0,0,6], +"SVGElement_8cpp_source.html":[1,0,0,0,28], +"SVGElement_8hpp_source.html":[1,0,0,0,29], +"Stop_8cpp_source.html":[1,0,0,0,26], +"Stop_8hpp_source.html":[1,0,0,0,27], +"Text_8cpp_source.html":[1,0,0,0,30], +"Text_8hpp_source.html":[1,0,0,0,31], +"Vector2D_8hpp_source.html":[1,0,0,0,32], +"Viewer_8cpp_source.html":[1,0,0,7], +"Viewer_8hpp_source.html":[1,0,0,8], +"annotated.html":[0,0], +"classCircle.html":[0,0,0], +"classCircle.html#a09523e46318092d42a5969a1da5613bb":[0,0,0,1], +"classCircle.html#a5d018c51bfa1fa3d1081e3deef5eddc0":[0,0,0,0], +"classEll.html":[0,0,1], +"classEll.html#a00d607a5238705b552ec61b4409b76c1":[0,0,1,4], +"classEll.html#a0d0a2a70c06878c5769bd7d092277892":[0,0,1,1], +"classEll.html#a1d6d60039d2405f2b7aa117206d128fb":[0,0,1,5], +"classEll.html#a4a9956ca82cb9f957e993fa0c0faced6":[0,0,1,0], +"classEll.html#a8a8dd2acc8c7be5580dd8e549d247525":[0,0,1,2], +"classEll.html#a9f67131ba02c02fccf42c52f5f04525e":[0,0,1,6], +"classEll.html#ab79368df57ee08382916fc52b69afb85":[0,0,1,3], +"classEll.html#af57a48abe0e2bc8806e73dfa7762388f":[0,0,1,7], +"classGradient.html":[0,0,2], +"classGradient.html#a1125c4e5294389bb6698bf4fcb4f928d":[0,0,2,5], +"classGradient.html#a1387db53f850dd8cc765fc837c6e97e8":[0,0,2,12], +"classGradient.html#a44218bd3fb347f4c269f1f2795fb77d5":[0,0,2,2], +"classGradient.html#a54cc5770c2dce46f1d56bcfb63285173":[0,0,2,7], +"classGradient.html#a592dda454dc4df897263212191d6e3cb":[0,0,2,13], +"classGradient.html#a61dd624d452ab2afe913414158888165":[0,0,2,9], +"classGradient.html#a7831fa94135c818481ef7c85f792e1ca":[0,0,2,11], +"classGradient.html#a8da859d1b12459800e763c31f18d0d41":[0,0,2,10], +"classGradient.html#a9332299756c51c99398ce09e584a8b42":[0,0,2,1], +"classGradient.html#aa27206a9cc0adb5309a6db6dbd9d0257":[0,0,2,0], +"classGradient.html#aced479d6a10d2aa53e6d363e1df5dc08":[0,0,2,4], +"classGradient.html#adb86ee7c9171cb7294d1bb8956e97891":[0,0,2,3], +"classGradient.html#adf0e8b360f2b8e6edc1059002f85b1c1":[0,0,2,6], +"classGradient.html#ae2afa93bd9b6759f5fe625065301d3d9":[0,0,2,8], +"classGroup.html":[0,0,3], +"classGroup.html#a070e010084eaac6131e1bf814d10d234":[0,0,3,5], +"classGroup.html#a123cdaf1fb7cdf873740757d3864a4a6":[0,0,3,1], +"classGroup.html#a310fa83ccb20841373c11b6b4ac1d336":[0,0,3,6], +"classGroup.html#a317fcd42fd61b83c0d932bd1eb2c753f":[0,0,3,4], +"classGroup.html#a42fa18c4215ad3669db32b78e22303fa":[0,0,3,7], +"classGroup.html#a6ff10d6fceb2a78103db2d9783de6f41":[0,0,3,9], +"classGroup.html#a7b74f9ac68e0504ccf2e2854b7355ff1":[0,0,3,0], +"classGroup.html#a9308f587c63720ccbe2bfd1bad868547":[0,0,3,8], +"classGroup.html#aed00a22ff227ee2657ae44a5cbcedf7c":[0,0,3,2], +"classGroup.html#af4dafed0506ca5e9ea9e1028b1504919":[0,0,3,3], +"classLine.html":[0,0,4], +"classLine.html#a3fe45077492213ef490739c6137200d1":[0,0,4,5], +"classLine.html#a745f295541d412b49dac89423bd957a6":[0,0,4,1], +"classLine.html#ab46a879365e623e8b360c2db54d76782":[0,0,4,4], +"classLine.html#ab6e165ec2c3f412d5e5a860b28a52b4c":[0,0,4,0], +"classLine.html#adb348ce7ddf4b500c3593b7126aa4451":[0,0,4,2], +"classLine.html#afe6672bc7667cf45739c46f9fc8cb237":[0,0,4,3], +"classLinearGradient.html":[0,0,5], +"classLinearGradient.html#aa434164a18fa29e778cdb7fc96770b9a":[0,0,5,1], +"classLinearGradient.html#aaa0260244d818cd9d1180cb2697cc83b":[0,0,5,0], +"classParser.html":[0,0,7], +"classParser.html#a009fbe10a1b9b58a65be44634335a062":[0,0,7,11], +"classParser.html#a03766f0f9f6ebdead0474973d3ac50aa":[0,0,7,22], +"classParser.html#a06952fa44f19fdb573c1355ac26454c5":[0,0,7,7], +"classParser.html#a0af0085ee5e20739bdf23a5b685642b6":[0,0,7,15], +"classParser.html#a13a5e2fdac62670c1584de1edbba77f2":[0,0,7,29], +"classParser.html#a18d5a9aa35bd124023a060940486e183":[0,0,7,13], +"classParser.html#a20352ab58a59e61f6da1b4d20861907d":[0,0,7,23], +"classParser.html#a2872aff3bfb15fdb1df2dcdce2bd632a":[0,0,7,31], +"classParser.html#a350fc3e35535c5891cd9e36e79ee546a":[0,0,7,2], +"classParser.html#a3d8927f2e26abf6a63bd850c154b23c6":[0,0,7,26], +"classParser.html#a3e658b5917a93a3ef648050d060e3a93":[0,0,7,1], +"classParser.html#a48044a8caa14a251cb4dad9fb363658e":[0,0,7,0], +"classParser.html#a4efa2342d694eff2ab6ba1d150c7bb69":[0,0,7,10], +"classParser.html#a539bda46a2832a22741105c9299c12cb":[0,0,7,25], +"classParser.html#a59ed4455eaec306cde11939785c4e71a":[0,0,7,8], +"classParser.html#a63329a7accdf332feb3fba1bcc4deec6":[0,0,7,3], +"classParser.html#a6f80728e7a771d2653baf1b453b655d9":[0,0,7,18], +"classParser.html#a7afd52c648dc5983e596edfa7eb6bbb5":[0,0,7,21], +"classParser.html#a7eb24f4915ba9b7a652ca204c1edb2c7":[0,0,7,30], +"classParser.html#a7f085da78317baf2cc61e6e92b4b29c8":[0,0,7,27], +"classParser.html#a95e84ae219109769fae08702381acf78":[0,0,7,17], +"classParser.html#a99df58e649089762bf434502173716d6":[0,0,7,9], +"classParser.html#aaf9f19591ff93f0c0c2fd68955e4a4af":[0,0,7,14], +"classParser.html#ab2b1df7c69830fafcbe36de5199dcd30":[0,0,7,4], +"classParser.html#ab7776f740b7d63c388a086c8b8ecccd0":[0,0,7,12], +"classParser.html#abfd09c5dd46fb0dc9bcd9106857dbf5e":[0,0,7,24], +"classParser.html#ac00eac6bf37c45c9160fa47700d2466f":[0,0,7,5], +"classParser.html#ac1e519500fce1b4192362ed1aa5ccbc3":[0,0,7,16], +"classParser.html#aca2ed5f466436a9e9f78618bb1e356fd":[0,0,7,6], +"classParser.html#ae3a28c02c18171f4e83fae54b9f21a90":[0,0,7,28], +"classParser.html#aecea54d6bc1ff225a6ac450ccbb560c3":[0,0,7,19], +"classParser.html#af408a2ef7b27ceed0547093d73e6b2eb":[0,0,7,20], +"classPath.html":[0,0,8], +"classPath.html#a089f2f59cc5574ce9e93826891044378":[0,0,8,0], +"classPath.html#a1880b844baafdeca91a7cf5d155cf9f1":[0,0,8,8], +"classPath.html#a3d2df8f3367db525772586065e16151e":[0,0,8,5], +"classPath.html#a9395325e65f86fd2a4be2dc24408753a":[0,0,8,3], +"classPath.html#a9d701e9231022249523970101bbc749c":[0,0,8,4], +"classPath.html#ac5abd8d5994a75cca56205c7e55a5b4f":[0,0,8,7], +"classPath.html#ac99ffb44f19586a10ee39aa70fd4a260":[0,0,8,2], +"classPath.html#ad2ba583a2dd567c3295ea62817b541e9":[0,0,8,6], +"classPath.html#ad4273c2a1b288fe43dd86375afc16f66":[0,0,8,1], +"classPlygon.html":[0,0,10], +"classPlygon.html#aab00a0d0230ea320271e96c326c6b919":[0,0,10,1], +"classPlygon.html#ac3f4fb224f4f84c3bd6e41093cd847cd":[0,0,10,0], +"classPlyline.html":[0,0,11], +"classPlyline.html#a5b9d86c75604d329037cd47e8ba3d5b9":[0,0,11,1], +"classPlyline.html#a8bf7677d7adb76f146607ef1aaa49bd3":[0,0,11,0], +"classPolyShape.html":[0,0,12], +"classPolyShape.html#a0ad83e0129196572f99302830e0c9049":[0,0,12,5], +"classPolyShape.html#a0c918fe8d9df68573a1c0d6e18bc6c9a":[0,0,12,8], +"classPolyShape.html#a27704ef9fd50c041d1d233e9d99a4fd4":[0,0,12,6], +"classPolyShape.html#a3a5e4952aff469f241ee1c9b92833f55":[0,0,12,1], +"classPolyShape.html#a40a83ac567156de6da65adb1a4380c7c":[0,0,12,7], +"classPolyShape.html#a6ddda72dc27d7aade0ed444a52d7689f":[0,0,12,4], +"classPolyShape.html#a6fd054647bea080272ed79bbea7080ac":[0,0,12,0], +"classPolyShape.html#abd758b76bbc30e790602b1f37a814fe1":[0,0,12,9], +"classPolyShape.html#acac99a28e69ee5020eed782175a5a355":[0,0,12,3], +"classPolyShape.html#acbd1d536ad25e34b160e849a0fc12697":[0,0,12,10], +"classPolyShape.html#afc263d5407ca7ea50e30d641d779b73b":[0,0,12,2], +"classRadialGradient.html":[0,0,13], +"classRadialGradient.html#a132c35f92ecceb604cdddf098c36824c":[0,0,13,1], +"classRadialGradient.html#a656e8c8a107f28a06c356a3ad1a4827c":[0,0,13,0], +"classRadialGradient.html#abad9345ee5091075d8fc1b7a3511dbd7":[0,0,13,3], +"classRadialGradient.html#acfa8223581f3caf2db33c310cfa48d1d":[0,0,13,2], +"classRect.html":[0,0,14], +"classRect.html#a28b51c4f99cfa0208a2a5cef350c2a5e":[0,0,14,7], +"classRect.html#a31428cce67b56b6daf168131c7dbe1e8":[0,0,14,9], +"classRect.html#a31ca84cc8755233b5e61d22189f637b0":[0,0,14,3], +"classRect.html#a418fffe5bb9368f4e158b63e13faba16":[0,0,14,2], +"classRect.html#a4f6ba1c3eef4054847a89da472f392cd":[0,0,14,1], +"classRect.html#a66351fe7a171c2b3ed5f4bdf8d6661ba":[0,0,14,5], +"classRect.html#a7857e3568d2a2a35bf0c6b28028005b5":[0,0,14,10], +"classRect.html#a800053c390ccb818add47e627e535a5e":[0,0,14,11], +"classRect.html#a964a6107f787f612798bda5c0423fb5b":[0,0,14,6], +"classRect.html#a9c1dd853ea5df8e7c96a11bba72cc67a":[0,0,14,4], +"classRect.html#ad52d66e844d848d0e95f744b697e7beb":[0,0,14,0], +"classRect.html#ae11a39d12f7a766f773e662b0830848d":[0,0,14,8], +"classRenderer.html":[0,0,15], +"classRenderer.html#a1fac47f9b1c4c3fb1151f2b6ecb282f6":[0,0,15,5], +"classRenderer.html#a27b883787b8f38afd04924edc97b5a04":[0,0,15,10], +"classRenderer.html#a33a87db2173a7509be2d60fcffff9058":[0,0,15,3], +"classRenderer.html#a4e73148b7da0f585084520d12c514344":[0,0,15,11], +"classRenderer.html#a578e046986da5ec2585ce106562c3de3":[0,0,15,4], +"classRenderer.html#a6cbcbb11e386c26eacef0b97342fee77":[0,0,15,9], +"classRenderer.html#a7431a2f9b03f35752e034410ffebfbe1":[0,0,15,17], +"classRenderer.html#a7539832835d19ee365dcbabf490d642c":[0,0,15,14], +"classRenderer.html#a7ebf46f54dab9905f79b80f7fddb76a6":[0,0,15,1], +"classRenderer.html#a87ce996c3ed0f963de9ef6c293ee3aec":[0,0,15,13], +"classRenderer.html#a8c6e15f666cb188a936004add75e6c6b":[0,0,15,0], +"classRenderer.html#a8d159bc1ea8f4152339d6c5eead27e45":[0,0,15,2], +"classRenderer.html#a9b5ca422ec7f1328d854cc4bff269858":[0,0,15,6], +"classRenderer.html#aa42607899757d0a1c5e8fe0aa4cb5a7f":[0,0,15,16], +"classRenderer.html#ab68c9e02c7eadf1f18286c9ecf0d90ca":[0,0,15,8], +"classRenderer.html#abf163a7895594e0a4ee5662805b1b572":[0,0,15,12], +"classRenderer.html#ac1bf10ff8b4f967f0d416a26d482abd6":[0,0,15,15], +"classRenderer.html#af4d92e92abb79e4431f7331f792194d9":[0,0,15,7], +"classSVGElement.html":[0,0,17], +"classSVGElement.html#a00fef2ebc5df4838b3f9bd7111b117c5":[0,0,17,23], +"classSVGElement.html#a03ac231161d1d5062951fa3fca33a39b":[0,0,17,8], +"classSVGElement.html#a0cce88c48233f4da470daad2edab0d06":[0,0,17,9], +"classSVGElement.html#a1a43e7717c20d50fd1990b592499fdba":[0,0,17,2], +"classSVGElement.html#a1b075314d4cda4fa895688979fe462fd":[0,0,17,12], +"classSVGElement.html#a2e4b1a48bfbc34a6a9f17bfd4b89eb51":[0,0,17,11], +"classSVGElement.html#a312b6aa934488672585c7e9d858300f8":[0,0,17,17], +"classSVGElement.html#a43b3bf06fae88a1634a189272088d11d":[0,0,17,20], +"classSVGElement.html#a4e1ed8bb29fd4dbeb35471315976b3a2":[0,0,17,13], +"classSVGElement.html#a5087280fd4bbb637c3cde64e44e974f1":[0,0,17,0], +"classSVGElement.html#a5f111964efd20e98eafafb3d168a1e87":[0,0,17,14], +"classSVGElement.html#a6d3a39e763d3273715ea11f8959f81b1":[0,0,17,24], +"classSVGElement.html#a6ed48bcc78dd62e3da256ddbd103ccd1":[0,0,17,3], +"classSVGElement.html#a77aefe4b7e9dbf180cc531c969d0116d":[0,0,17,22], +"classSVGElement.html#a88449b487a890e3765ae20e96ee95c06":[0,0,17,29], +"classSVGElement.html#a88653ebe8b92ec881ab436ea968375a8":[0,0,17,19], +"classSVGElement.html#a9a243b2b8464d57df28f3f3e8c52511e":[0,0,17,10], +"classSVGElement.html#a9b64e7697c24a6972aacb01b89c0e542":[0,0,17,7], +"classSVGElement.html#aab61149df9916892540627a0d7c4480c":[0,0,17,25], +"classSVGElement.html#aab937dcb566cd83d94d00d69b4083f13":[0,0,17,28], +"classSVGElement.html#abb012cad5d6e9ee7a413f46042f99429":[0,0,17,6], +"classSVGElement.html#abf7eef6d09fedba0d0f50a0f1a4be2fb":[0,0,17,16], +"classSVGElement.html#ac0cc2f6d2e01d364a695bebaa7db18d2":[0,0,17,18], +"classSVGElement.html#acf9b9906b6d0cba8bb5c0b38b032e40f":[0,0,17,27], +"classSVGElement.html#ad30205005009d2ba4820d3ce372e81ea":[0,0,17,1], +"classSVGElement.html#ad4bcd981ae7431161013811024b452e1":[0,0,17,15], +"classSVGElement.html#adc98ebac66965dd303283cbf7ff28f38":[0,0,17,5], +"classSVGElement.html#adee748c3014de1c1ebd20411a52e824a":[0,0,17,26], +"classSVGElement.html#aec8a2f582f21a559c05d791e017efbd5":[0,0,17,21], +"classSVGElement.html#aefeee5c1de3e802d9f5f0a54078170e6":[0,0,17,30], +"classSVGElement.html#af699f9aa795572c2873e520849579881":[0,0,17,4], +"classStop.html":[0,0,16], +"classStop.html#a0ee1f3e4c4298b8712cef19f24e07dff":[0,0,16,1], +"classStop.html#a2b6aaf0f14507df64c6bbd99043ad44b":[0,0,16,4], +"classStop.html#a3ad6054f4ecb97b3fc68595b744f8d54":[0,0,16,0], +"classStop.html#a60a63002485122f30a80e80220d99748":[0,0,16,2], +"classStop.html#afb57d3535781a9e40efff24c43520a21":[0,0,16,3], +"classText.html":[0,0,18], +"classText.html#a12e8ae19a8e677eb6f1c2dc2716dcab0":[0,0,18,8], +"classText.html#a12ee81ccf865a414867d4101c8dbbdb2":[0,0,18,14], +"classText.html#a33f5c94508241a960c139923c284491e":[0,0,18,11], +"classText.html#a405fac6f66711e0063e18e9e211e3a62":[0,0,18,2], +"classText.html#a40e38d59ba9b34df9900375409f6f03f":[0,0,18,6], +"classText.html#a445117756f52b37ae8bce225e254bea6":[0,0,18,1], +"classText.html#a4f24f78f8a962e758b70c5d9fd85b7cb":[0,0,18,10], +"classText.html#a6a04680d93c625645278b1d1111420bb":[0,0,18,9], +"classText.html#a6e799a9b0ba6f88e704eea12599d3d5c":[0,0,18,4], +"classText.html#a71158226b190f16477820e45b549133f":[0,0,18,13], +"classText.html#a86fd1927b692d6691c8dd3901b6f6e48":[0,0,18,5], +"classText.html#a92c5df61031c3a9af813f9cc6978f34a":[0,0,18,0], +"classText.html#a9336f13d0d4a26d41c2fd2e103ac5dde":[0,0,18,12], +"classText.html#aa503905beb9dddf11c9c579424d0a84f":[0,0,18,7], +"classText.html#ac593599637e5e7f0f929c59b440f1b94":[0,0,18,3], +"classVector2D.html":[0,0,19], +"classVector2D.html#a4f1bca1b63cd8b1323c85c9a5c597df4":[0,0,19,1], +"classVector2D.html#a65e391ec61c185092a02cf6301d0fff7":[0,0,19,3], +"classVector2D.html#a6a91fccbbd37162d28fa54aeeb88f9d2":[0,0,19,4], +"classVector2D.html#a96580267fed7cd6686cbbf8e11048023":[0,0,19,0], +"classVector2D.html#af9cb4a6f06903844162f4c9d80d16b85":[0,0,19,2], +"classViewer.html":[0,0,20], +"classViewer.html#a2b889c5d09c8577ad1580dd610ac5678":[0,0,20,7], +"classViewer.html#a30b0f57907c82de620339e105f9a3c5b":[0,0,20,18] +}; diff --git a/docs/navtreeindex1.js b/docs/navtreeindex1.js new file mode 100644 index 00000000..27e3ebb1 --- /dev/null +++ b/docs/navtreeindex1.js @@ -0,0 +1,84 @@ +var NAVTREEINDEX1 = +{ +"classViewer.html#a324e5a6a1532fe5eac3f3b0e4792b2da":[0,0,20,0], +"classViewer.html#a3d14cceacd94622e6b9d5d71bfb5b64f":[0,0,20,12], +"classViewer.html#a3e16ebbf5c0ed98dc75fe2c4d46fe0d5":[0,0,20,17], +"classViewer.html#a452e9dd05638bf3da01d8f51dba009a5":[0,0,20,14], +"classViewer.html#a46377febc22fd7f2cc38a73ddb66b8ad":[0,0,20,21], +"classViewer.html#a53c3dca921442983d13f335d0e8a7e20":[0,0,20,13], +"classViewer.html#a59a507a835919e78114601d5bd1784e6":[0,0,20,16], +"classViewer.html#a643c2fc659f06f4d4bfcefbad22ebd75":[0,0,20,6], +"classViewer.html#a77bc329e7ae0aecaf60a4de4f8dcc037":[0,0,20,15], +"classViewer.html#a81a24ea13ee1e7e8c83be60672a7a11e":[0,0,20,10], +"classViewer.html#a8235c9da7e144d7139c91901c0051cd8":[0,0,20,3], +"classViewer.html#a82dfd34668f986b72e51ee86d4029fc6":[0,0,20,19], +"classViewer.html#a8bcd4fdeb5c26092d65fc14474afeb38":[0,0,20,5], +"classViewer.html#a940c6147b33b273afdff6eef7309d500":[0,0,20,11], +"classViewer.html#aa172f661daf24807148fb697f10e750a":[0,0,20,20], +"classViewer.html#aa8d0481396e20f1a8d4f6691ff0a67c1":[0,0,20,4], +"classViewer.html#aaedebacb31cba87de6e7d448ed8d6586":[0,0,20,1], +"classViewer.html#abb8e49e83e5c574411bb9995665fd7eb":[0,0,20,2], +"classViewer.html#acb15ba2e5d3bab2ba58da0db724b3bd1":[0,0,20,9], +"classViewer.html#ae0c94514f0897aa84732024855520e28":[0,0,20,8], +"classes.html":[0,1], +"classmColor.html":[0,0,6], +"classmColor.html#a04a0d2485c1106ccc94d065a0e62ecfb":[0,0,6,8], +"classmColor.html#a0cd1254821d108bb8c5be8ec5536f8ec":[0,0,6,9], +"classmColor.html#a1887c93301ffe92701baf17d6af3418e":[0,0,6,3], +"classmColor.html#a427453d377b30c62f7d25f47120959d6":[0,0,6,12], +"classmColor.html#a4376ef67b23a45be81daeecbfef1b2c3":[0,0,6,1], +"classmColor.html#a59dc727125e9f3d4ed0c59433dfa0780":[0,0,6,7], +"classmColor.html#a68265f053324eea11265c7f8d7fdb5ff":[0,0,6,16], +"classmColor.html#a73b9b91ca8c79e6e3876e5d83980ebec":[0,0,6,15], +"classmColor.html#a777df695011fdb21f6b5d3e6745389c4":[0,0,6,11], +"classmColor.html#a8df59e284c6211d66b05fab14d726a5e":[0,0,6,2], +"classmColor.html#a9b1702a679c1c5f649787fe15d8b016a":[0,0,6,0], +"classmColor.html#aa0fc6fe3033f7ff2806c59e39c072dbc":[0,0,6,13], +"classmColor.html#aa3910d2b82d32c8aa4e50127874a6d03":[0,0,6,6], +"classmColor.html#aa69dc1cb58cec64672952d1e84744f8c":[0,0,6,10], +"classmColor.html#ac086aa72806b8ce55fed3df9ba976f6c":[0,0,6,4], +"classmColor.html#ac4f0afaa513bbe9e68c16156136d4ada":[0,0,6,14], +"classmColor.html#ad56f2424fa451364becdc4d1c4df657c":[0,0,6,5], +"dir_560415a5d2bc4999842279f4fc1debef.html":[1,0,0,0], +"dir_68267d1309a1af8e8297ef4c3efbcdba.html":[1,0,0], +"files.html":[1,0], +"functions.html":[0,3,0,0], +"functions.html":[0,3,0], +"functions_b.html":[0,3,0,1], +"functions_c.html":[0,3,0,2], +"functions_d.html":[0,3,0,3], +"functions_e.html":[0,3,0,4], +"functions_f.html":[0,3,0,5], +"functions_func.html":[0,3,1], +"functions_g.html":[0,3,0,6], +"functions_h.html":[0,3,0,7], +"functions_i.html":[0,3,0,8], +"functions_l.html":[0,3,0,9], +"functions_m.html":[0,3,0,10], +"functions_n.html":[0,3,0,11], +"functions_o.html":[0,3,0,12], +"functions_p.html":[0,3,0,13], +"functions_r.html":[0,3,0,14], +"functions_rela.html":[0,3,3], +"functions_s.html":[0,3,0,15], +"functions_t.html":[0,3,0,16], +"functions_u.html":[0,3,0,17], +"functions_v.html":[0,3,0,18], +"functions_vars.html":[0,3,2], +"functions_w.html":[0,3,0,19], +"functions_x.html":[0,3,0,20], +"functions_y.html":[0,3,0,21], +"functions_z.html":[0,3,0,22], +"functions_~.html":[0,3,0,23], +"hierarchy.html":[0,2], +"index.html":[], +"main_8cpp_source.html":[1,0,0,2], +"pages.html":[], +"structPathPoint.html":[0,0,9], +"structPathPoint.html#a35cbe9f919695a09f5c881618f5fa0f9":[0,0,9,0], +"structPathPoint.html#a54896895f14e17ca49c47a71b79dd570":[0,0,9,4], +"structPathPoint.html#a6646f1aa8bba6735d4b4d794ef86a786":[0,0,9,2], +"structPathPoint.html#a95cecf76150d2bb4a6b6b7875693ca69":[0,0,9,1], +"structPathPoint.html#ace50ee641dc2747418072f50b445dd53":[0,0,9,3], +"structPathPoint.html#ae583dc92052b201d3416506e7632a0cc":[0,0,9,5] +}; diff --git a/docs/html/open.png b/docs/open.png similarity index 100% rename from docs/html/open.png rename to docs/open.png diff --git a/docs/html/resize.js b/docs/resize.js similarity index 100% rename from docs/html/resize.js rename to docs/resize.js diff --git a/docs/html/search/all_0.html b/docs/search/all_0.html similarity index 100% rename from docs/html/search/all_0.html rename to docs/search/all_0.html diff --git a/docs/search/all_0.js b/docs/search/all_0.js new file mode 100644 index 00000000..551801ef --- /dev/null +++ b/docs/search/all_0.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['a_0',['a',['../classmColor.html#ac086aa72806b8ce55fed3df9ba976f6c',1,'mColor']]], + ['addelement_1',['addElement',['../classGroup.html#af4dafed0506ca5e9ea9e1028b1504919',1,'Group::addElement()'],['../classSVGElement.html#af699f9aa795572c2873e520849579881',1,'SVGElement::addElement()']]], + ['addpoint_2',['addPoint',['../classPath.html#ad4273c2a1b288fe43dd86375afc16f66',1,'Path::addPoint()'],['../classPolyShape.html#a3a5e4952aff469f241ee1c9b92833f55',1,'PolyShape::addPoint()']]], + ['addstop_3',['addStop',['../classGradient.html#a44218bd3fb347f4c269f1f2795fb77d5',1,'Gradient']]], + ['anchor_4',['anchor',['../classText.html#a33f5c94508241a960c139923c284491e',1,'Text']]], + ['applytransform_5',['applyTransform',['../classRenderer.html#a8d159bc1ea8f4152339d6c5eead27e45',1,'Renderer']]], + ['applytransformsonbrush_6',['applyTransformsOnBrush',['../classRenderer.html#a33a87db2173a7509be2d60fcffff9058',1,'Renderer::applyTransformsOnBrush(std::vector< std::string > transform_order, Gdiplus::LinearGradientBrush *&brush) const'],['../classRenderer.html#a578e046986da5ec2585ce106562c3de3',1,'Renderer::applyTransformsOnBrush(std::vector< std::string > transform_order, Gdiplus::PathGradientBrush *&brush) const']]], + ['attributes_7',['attributes',['../classGroup.html#a9308f587c63720ccbe2bfd1bad868547',1,'Group']]] +]; diff --git a/docs/html/search/all_1.html b/docs/search/all_1.html similarity index 100% rename from docs/html/search/all_1.html rename to docs/search/all_1.html diff --git a/docs/search/all_1.js b/docs/search/all_1.js new file mode 100644 index 00000000..7c29398e --- /dev/null +++ b/docs/search/all_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['b_8',['b',['../classmColor.html#ad56f2424fa451364becdc4d1c4df657c',1,'mColor']]], + ['black_9',['Black',['../classmColor.html#aa3910d2b82d32c8aa4e50127874a6d03',1,'mColor']]], + ['blue_10',['Blue',['../classmColor.html#a59dc727125e9f3d4ed0c59433dfa0780',1,'mColor']]] +]; diff --git a/docs/html/search/all_10.html b/docs/search/all_10.html similarity index 100% rename from docs/html/search/all_10.html rename to docs/search/all_10.html diff --git a/docs/search/all_10.js b/docs/search/all_10.js new file mode 100644 index 00000000..35181942 --- /dev/null +++ b/docs/search/all_10.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['text_151',['Text',['../classText.html',1,'Text'],['../classText.html#a92c5df61031c3a9af813f9cc6978f34a',1,'Text::Text()']]], + ['transforms_152',['transforms',['../classGradient.html#a1387db53f850dd8cc765fc837c6e97e8',1,'Gradient::transforms()'],['../classSVGElement.html#aefeee5c1de3e802d9f5f0a54078170e6',1,'SVGElement::transforms()']]], + ['transparent_153',['Transparent',['../classmColor.html#ac4f0afaa513bbe9e68c16156136d4ada',1,'mColor']]] +]; diff --git a/docs/html/search/all_11.html b/docs/search/all_11.html similarity index 100% rename from docs/html/search/all_11.html rename to docs/search/all_11.html diff --git a/docs/search/all_11.js b/docs/search/all_11.js new file mode 100644 index 00000000..21592860 --- /dev/null +++ b/docs/search/all_11.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['units_154',['units',['../classGradient.html#a592dda454dc4df897263212191d6e3cb',1,'Gradient']]] +]; diff --git a/docs/html/search/all_12.html b/docs/search/all_12.html similarity index 100% rename from docs/html/search/all_12.html rename to docs/search/all_12.html diff --git a/docs/html/search/all_11.js b/docs/search/all_12.js similarity index 52% rename from docs/html/search/all_11.js rename to docs/search/all_12.js index 7a18a214..340599e0 100644 --- a/docs/html/search/all_11.js +++ b/docs/search/all_12.js @@ -1,6 +1,8 @@ var searchData= [ - ['vector2d_127',['Vector2D',['../classVector2D.html',1,'Vector2D< T >'],['../classVector2D.html#a96580267fed7cd6686cbbf8e11048023',1,'Vector2D::Vector2D()'],['../classVector2D.html#a4f1bca1b63cd8b1323c85c9a5c597df4',1,'Vector2D::Vector2D(T X, T Y)'],['../classVector2D.html#af9cb4a6f06903844162f4c9d80d16b85',1,'Vector2D::Vector2D(const Vector2D< U > &vector)']]], - ['vector2d_3c_20float_20_3e_128',['Vector2D< float >',['../classVector2D.html',1,'']]], - ['viewer_129',['Viewer',['../classViewer.html',1,'Viewer'],['../classViewer.html#aaedebacb31cba87de6e7d448ed8d6586',1,'Viewer::Viewer()'],['../classViewer.html#abb8e49e83e5c574411bb9995665fd7eb',1,'Viewer::Viewer(const Viewer &)=delete']]] + ['vector2d_155',['Vector2D',['../classVector2D.html',1,'Vector2D< T >'],['../classVector2D.html#a96580267fed7cd6686cbbf8e11048023',1,'Vector2D::Vector2D()'],['../classVector2D.html#a4f1bca1b63cd8b1323c85c9a5c597df4',1,'Vector2D::Vector2D(T X, T Y)'],['../classVector2D.html#af9cb4a6f06903844162f4c9d80d16b85',1,'Vector2D::Vector2D(const Vector2D< U > &vector)']]], + ['vector2d_3c_20float_20_3e_156',['Vector2D< float >',['../classVector2D.html',1,'']]], + ['viewbox_157',['viewbox',['../classParser.html#a7eb24f4915ba9b7a652ca204c1edb2c7',1,'Parser']]], + ['viewer_158',['Viewer',['../classViewer.html',1,'Viewer'],['../classViewer.html#aaedebacb31cba87de6e7d448ed8d6586',1,'Viewer::Viewer()'],['../classViewer.html#abb8e49e83e5c574411bb9995665fd7eb',1,'Viewer::Viewer(const Viewer &)=delete']]], + ['viewport_159',['viewport',['../classParser.html#a2872aff3bfb15fdb1df2dcdce2bd632a',1,'Parser']]] ]; diff --git a/docs/html/search/all_13.html b/docs/search/all_13.html similarity index 100% rename from docs/html/search/all_13.html rename to docs/search/all_13.html diff --git a/docs/search/all_13.js b/docs/search/all_13.js new file mode 100644 index 00000000..dcbfb65d --- /dev/null +++ b/docs/search/all_13.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['white_160',['White',['../classmColor.html#a73b9b91ca8c79e6e3876e5d83980ebec',1,'mColor']]], + ['width_161',['width',['../classRect.html#a800053c390ccb818add47e627e535a5e',1,'Rect']]], + ['window_5fsize_162',['window_size',['../classViewer.html#aa172f661daf24807148fb697f10e750a',1,'Viewer']]] +]; diff --git a/docs/html/search/all_14.html b/docs/search/all_14.html similarity index 100% rename from docs/html/search/all_14.html rename to docs/search/all_14.html diff --git a/docs/search/all_14.js b/docs/search/all_14.js new file mode 100644 index 00000000..7d103bb9 --- /dev/null +++ b/docs/search/all_14.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['x_163',['x',['../classVector2D.html#a65e391ec61c185092a02cf6301d0fff7',1,'Vector2D']]] +]; diff --git a/docs/html/search/all_15.html b/docs/search/all_15.html similarity index 100% rename from docs/html/search/all_15.html rename to docs/search/all_15.html diff --git a/docs/search/all_15.js b/docs/search/all_15.js new file mode 100644 index 00000000..07982b31 --- /dev/null +++ b/docs/search/all_15.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['y_164',['y',['../classVector2D.html#a6a91fccbbd37162d28fa54aeeb88f9d2',1,'Vector2D']]], + ['yellow_165',['Yellow',['../classmColor.html#a68265f053324eea11265c7f8d7fdb5ff',1,'mColor']]] +]; diff --git a/docs/html/search/all_16.html b/docs/search/all_16.html similarity index 100% rename from docs/html/search/all_16.html rename to docs/search/all_16.html diff --git a/docs/html/search/variables_13.js b/docs/search/all_16.js similarity index 50% rename from docs/html/search/variables_13.js rename to docs/search/all_16.js index b8a185be..140606c7 100644 --- a/docs/html/search/variables_13.js +++ b/docs/search/all_16.js @@ -1,4 +1,4 @@ var searchData= [ - ['zoom_5ffactor_291',['zoom_factor',['../classViewer.html#a46377febc22fd7f2cc38a73ddb66b8ad',1,'Viewer']]] + ['zoom_5ffactor_166',['zoom_factor',['../classViewer.html#a46377febc22fd7f2cc38a73ddb66b8ad',1,'Viewer']]] ]; diff --git a/docs/search/all_17.html b/docs/search/all_17.html new file mode 100644 index 00000000..1ad5d34b --- /dev/null +++ b/docs/search/all_17.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
                                                          +
                                                          Loading...
                                                          +
                                                          + +
                                                          Searching...
                                                          +
                                                          No Matches
                                                          + +
                                                          + + diff --git a/docs/search/all_17.js b/docs/search/all_17.js new file mode 100644 index 00000000..634ea789 --- /dev/null +++ b/docs/search/all_17.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['_7egradient_167',['~Gradient',['../classGradient.html#a9332299756c51c99398ce09e584a8b42',1,'Gradient']]], + ['_7egroup_168',['~Group',['../classGroup.html#aed00a22ff227ee2657ae44a5cbcedf7c',1,'Group']]], + ['_7eparser_169',['~Parser',['../classParser.html#a3e658b5917a93a3ef648050d060e3a93',1,'Parser']]], + ['_7esvgelement_170',['~SVGElement',['../classSVGElement.html#a5087280fd4bbb637c3cde64e44e974f1',1,'SVGElement']]], + ['_7eviewer_171',['~Viewer',['../classViewer.html#a324e5a6a1532fe5eac3f3b0e4792b2da',1,'Viewer']]] +]; diff --git a/docs/html/search/all_2.html b/docs/search/all_2.html similarity index 100% rename from docs/html/search/all_2.html rename to docs/search/all_2.html diff --git a/docs/search/all_2.js b/docs/search/all_2.js new file mode 100644 index 00000000..171f0edd --- /dev/null +++ b/docs/search/all_2.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['circle_11',['Circle',['../classCircle.html',1,'Circle'],['../classCircle.html#a5d018c51bfa1fa3d1081e3deef5eddc0',1,'Circle::Circle()']]], + ['color_12',['color',['../classStop.html#afb57d3535781a9e40efff24c43520a21',1,'Stop']]], + ['content_13',['content',['../classText.html#a9336f13d0d4a26d41c2fd2e103ac5dde',1,'Text']]], + ['cyan_14',['Cyan',['../classmColor.html#a04a0d2485c1106ccc94d065a0e62ecfb',1,'mColor']]] +]; diff --git a/docs/html/search/all_3.html b/docs/search/all_3.html similarity index 100% rename from docs/html/search/all_3.html rename to docs/search/all_3.html diff --git a/docs/search/all_3.js b/docs/search/all_3.js new file mode 100644 index 00000000..e60f2cbf --- /dev/null +++ b/docs/search/all_3.js @@ -0,0 +1,13 @@ +var searchData= +[ + ['direction_15',['direction',['../classLine.html#a3fe45077492213ef490739c6137200d1',1,'Line']]], + ['draw_16',['draw',['../classRenderer.html#a1fac47f9b1c4c3fb1151f2b6ecb282f6',1,'Renderer']]], + ['drawcircle_17',['drawCircle',['../classRenderer.html#a9b5ca422ec7f1328d854cc4bff269858',1,'Renderer']]], + ['drawellipse_18',['drawEllipse',['../classRenderer.html#af4d92e92abb79e4431f7331f792194d9',1,'Renderer']]], + ['drawline_19',['drawLine',['../classRenderer.html#ab68c9e02c7eadf1f18286c9ecf0d90ca',1,'Renderer']]], + ['drawpath_20',['drawPath',['../classRenderer.html#a6cbcbb11e386c26eacef0b97342fee77',1,'Renderer']]], + ['drawpolygon_21',['drawPolygon',['../classRenderer.html#a27b883787b8f38afd04924edc97b5a04',1,'Renderer']]], + ['drawpolyline_22',['drawPolyline',['../classRenderer.html#a4e73148b7da0f585084520d12c514344',1,'Renderer']]], + ['drawrectangle_23',['drawRectangle',['../classRenderer.html#abf163a7895594e0a4ee5662805b1b572',1,'Renderer']]], + ['drawtext_24',['drawText',['../classRenderer.html#a87ce996c3ed0f963de9ef6c293ee3aec',1,'Renderer']]] +]; diff --git a/docs/html/search/all_4.html b/docs/search/all_4.html similarity index 100% rename from docs/html/search/all_4.html rename to docs/search/all_4.html diff --git a/docs/html/search/all_4.js b/docs/search/all_4.js similarity index 54% rename from docs/html/search/all_4.js rename to docs/search/all_4.js index 092ffc30..c6524b1b 100644 --- a/docs/html/search/all_4.js +++ b/docs/search/all_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['ell_22',['Ell',['../classEll.html',1,'Ell'],['../classEll.html#a4a9956ca82cb9f957e993fa0c0faced6',1,'Ell::Ell()']]] + ['ell_25',['Ell',['../classEll.html',1,'Ell'],['../classEll.html#a4a9956ca82cb9f957e993fa0c0faced6',1,'Ell::Ell()']]] ]; diff --git a/docs/html/search/all_5.html b/docs/search/all_5.html similarity index 100% rename from docs/html/search/all_5.html rename to docs/search/all_5.html diff --git a/docs/search/all_5.js b/docs/search/all_5.js new file mode 100644 index 00000000..e3ddcf1b --- /dev/null +++ b/docs/search/all_5.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['fill_26',['fill',['../classSVGElement.html#a6d3a39e763d3273715ea11f8959f81b1',1,'SVGElement']]], + ['fill_5frule_27',['fill_rule',['../classPath.html#ac5abd8d5994a75cca56205c7e55a5b4f',1,'Path::fill_rule()'],['../classPolyShape.html#abd758b76bbc30e790602b1f37a814fe1',1,'PolyShape::fill_rule()']]], + ['font_5fsize_28',['font_size',['../classText.html#a71158226b190f16477820e45b549133f',1,'Text']]] +]; diff --git a/docs/html/search/all_6.html b/docs/search/all_6.html similarity index 100% rename from docs/html/search/all_6.html rename to docs/search/all_6.html diff --git a/docs/search/all_6.js b/docs/search/all_6.js new file mode 100644 index 00000000..7aac74ca --- /dev/null +++ b/docs/search/all_6.js @@ -0,0 +1,47 @@ +var searchData= +[ + ['g_29',['g',['../classmColor.html#a0cd1254821d108bb8c5be8ec5536f8ec',1,'mColor']]], + ['getanchor_30',['getAnchor',['../classText.html#a445117756f52b37ae8bce225e254bea6',1,'Text']]], + ['getattribute_31',['getAttribute',['../classParser.html#a63329a7accdf332feb3fba1bcc4deec6',1,'Parser']]], + ['getattributes_32',['getAttributes',['../classGroup.html#a317fcd42fd61b83c0d932bd1eb2c753f',1,'Group']]], + ['getbrush_33',['getBrush',['../classRenderer.html#a7539832835d19ee365dcbabf490d642c',1,'Renderer']]], + ['getclass_34',['getClass',['../classPolyShape.html#afc263d5407ca7ea50e30d641d779b73b',1,'PolyShape::getClass()'],['../classEll.html#a0d0a2a70c06878c5769bd7d092277892',1,'Ell::getClass()'],['../classRect.html#a4f6ba1c3eef4054847a89da472f392cd',1,'Rect::getClass()'],['../classSVGElement.html#adc98ebac66965dd303283cbf7ff28f38',1,'SVGElement::getClass()'],['../classText.html#a405fac6f66711e0063e18e9e211e3a62',1,'Text::getClass()'],['../classGroup.html#a070e010084eaac6131e1bf814d10d234',1,'Group::getClass()'],['../classPlyline.html#a5b9d86c75604d329037cd47e8ba3d5b9',1,'Plyline::getClass()'],['../classCircle.html#a09523e46318092d42a5969a1da5613bb',1,'Circle::getClass()'],['../classRadialGradient.html#a132c35f92ecceb604cdddf098c36824c',1,'RadialGradient::getClass()'],['../classLine.html#a745f295541d412b49dac89423bd957a6',1,'Line::getClass()'],['../classLinearGradient.html#aa434164a18fa29e778cdb7fc96770b9a',1,'LinearGradient::getClass()'],['../classGradient.html#adb86ee7c9171cb7294d1bb8956e97891',1,'Gradient::getClass()'],['../classPath.html#ac99ffb44f19586a10ee39aa70fd4a260',1,'Path::getClass()'],['../classPlygon.html#aab00a0d0230ea320271e96c326c6b919',1,'Plygon::getClass()']]], + ['getcolor_35',['getColor',['../classStop.html#a0ee1f3e4c4298b8712cef19f24e07dff',1,'Stop']]], + ['getcontent_36',['getContent',['../classText.html#ac593599637e5e7f0f929c59b440f1b94',1,'Text']]], + ['getdirection_37',['getDirection',['../classLine.html#adb348ce7ddf4b500c3593b7126aa4451',1,'Line']]], + ['getelements_38',['getElements',['../classGroup.html#a310fa83ccb20841373c11b6b4ac1d336',1,'Group']]], + ['getfillcolor_39',['getFillColor',['../classSVGElement.html#abb012cad5d6e9ee7a413f46042f99429',1,'SVGElement']]], + ['getfillrule_40',['getFillRule',['../classPath.html#a9395325e65f86fd2a4be2dc24408753a',1,'Path::getFillRule()'],['../classPolyShape.html#acac99a28e69ee5020eed782175a5a355',1,'PolyShape::getFillRule()']]], + ['getfloatattribute_41',['getFloatAttribute',['../classParser.html#ab2b1df7c69830fafcbe36de5199dcd30',1,'Parser']]], + ['getfontsize_42',['getFontSize',['../classText.html#a6e799a9b0ba6f88e704eea12599d3d5c',1,'Text']]], + ['getfontstyle_43',['getFontStyle',['../classText.html#a86fd1927b692d6691c8dd3901b6f6e48',1,'Text']]], + ['getgradient_44',['getGradient',['../classSVGElement.html#a9b64e7697c24a6972aacb01b89c0e542',1,'SVGElement']]], + ['getgradients_45',['GetGradients',['../classParser.html#ac00eac6bf37c45c9160fa47700d2466f',1,'Parser']]], + ['getgradientstops_46',['getGradientStops',['../classParser.html#aca2ed5f466436a9e9f78618bb1e356fd',1,'Parser']]], + ['getheight_47',['getHeight',['../classRect.html#a418fffe5bb9368f4e158b63e13faba16',1,'Rect']]], + ['getinstance_48',['getInstance',['../classParser.html#a06952fa44f19fdb573c1355ac26454c5',1,'Parser::getInstance()'],['../classRenderer.html#ac1bf10ff8b4f967f0d416a26d482abd6',1,'Renderer::getInstance()'],['../classViewer.html#a8235c9da7e144d7139c91901c0051cd8',1,'Viewer::getInstance()']]], + ['getlength_49',['getLength',['../classLine.html#afe6672bc7667cf45739c46f9fc8cb237',1,'Line']]], + ['getmaxbound_50',['getMaxBound',['../classEll.html#a8a8dd2acc8c7be5580dd8e549d247525',1,'Ell::getMaxBound()'],['../classPolyShape.html#a6ddda72dc27d7aade0ed444a52d7689f',1,'PolyShape::getMaxBound()'],['../classSVGElement.html#a03ac231161d1d5062951fa3fca33a39b',1,'SVGElement::getMaxBound()']]], + ['getminbound_51',['getMinBound',['../classEll.html#ab79368df57ee08382916fc52b69afb85',1,'Ell::getMinBound()'],['../classPolyShape.html#a0ad83e0129196572f99302830e0c9049',1,'PolyShape::getMinBound()'],['../classSVGElement.html#a0cce88c48233f4da470daad2edab0d06',1,'SVGElement::getMinBound()']]], + ['getoffset_52',['getOffset',['../classStop.html#a60a63002485122f30a80e80220d99748',1,'Stop']]], + ['getoutlinecolor_53',['getOutlineColor',['../classSVGElement.html#a9a243b2b8464d57df28f3f3e8c52511e',1,'SVGElement']]], + ['getoutlinethickness_54',['getOutlineThickness',['../classSVGElement.html#a2e4b1a48bfbc34a6a9f17bfd4b89eb51',1,'SVGElement']]], + ['getparent_55',['getParent',['../classSVGElement.html#a1b075314d4cda4fa895688979fe462fd',1,'SVGElement']]], + ['getpoints_56',['getPoints',['../classGradient.html#aced479d6a10d2aa53e6d363e1df5dc08',1,'Gradient::getPoints()'],['../classPath.html#a9d701e9231022249523970101bbc749c',1,'Path::getPoints()'],['../classPolyShape.html#a27704ef9fd50c041d1d233e9d99a4fd4',1,'PolyShape::getPoints()']]], + ['getposition_57',['getPosition',['../classSVGElement.html#a4e1ed8bb29fd4dbeb35471315976b3a2',1,'SVGElement']]], + ['getradius_58',['getRadius',['../classRadialGradient.html#acfa8223581f3caf2db33c310cfa48d1d',1,'RadialGradient::getRadius()'],['../classRect.html#a31ca84cc8755233b5e61d22189f637b0',1,'Rect::getRadius()'],['../classEll.html#a00d607a5238705b552ec61b4409b76c1',1,'Ell::getRadius()']]], + ['getroot_59',['getRoot',['../classParser.html#a59ed4455eaec306cde11939785c4e71a',1,'Parser']]], + ['getstops_60',['getStops',['../classGradient.html#a1125c4e5294389bb6698bf4fcb4f928d',1,'Gradient']]], + ['gettransformorder_61',['getTransformOrder',['../classParser.html#a99df58e649089762bf434502173716d6',1,'Parser']]], + ['gettransforms_62',['getTransforms',['../classGradient.html#adf0e8b360f2b8e6edc1059002f85b1c1',1,'Gradient::getTransforms()'],['../classSVGElement.html#a5f111964efd20e98eafafb3d168a1e87',1,'SVGElement::getTransforms()']]], + ['getunits_63',['getUnits',['../classGradient.html#a54cc5770c2dce46f1d56bcfb63285173',1,'Gradient']]], + ['getviewbox_64',['getViewBox',['../classParser.html#a4efa2342d694eff2ab6ba1d150c7bb69',1,'Parser']]], + ['getviewport_65',['getViewPort',['../classParser.html#a009fbe10a1b9b58a65be44634335a062',1,'Parser']]], + ['getwidth_66',['getWidth',['../classRect.html#a9c1dd853ea5df8e7c96a11bba72cc67a',1,'Rect']]], + ['getwindowsize_67',['getWindowSize',['../classViewer.html#aa8d0481396e20f1a8d4f6691ff0a67c1',1,'Viewer']]], + ['gradient_68',['Gradient',['../classGradient.html#aa27206a9cc0adb5309a6db6dbd9d0257',1,'Gradient::Gradient()'],['../classGradient.html',1,'Gradient']]], + ['gradient_69',['gradient',['../classSVGElement.html#aab61149df9916892540627a0d7c4480c',1,'SVGElement']]], + ['gradients_70',['gradients',['../classParser.html#a7f085da78317baf2cc61e6e92b4b29c8',1,'Parser']]], + ['green_71',['Green',['../classmColor.html#aa69dc1cb58cec64672952d1e84744f8c',1,'mColor']]], + ['group_72',['Group',['../classGroup.html#a123cdaf1fb7cdf873740757d3864a4a6',1,'Group::Group(Attributes attributes)'],['../classGroup.html#a7b74f9ac68e0504ccf2e2854b7355ff1',1,'Group::Group()'],['../classGroup.html',1,'Group']]] +]; diff --git a/docs/html/search/all_7.html b/docs/search/all_7.html similarity index 100% rename from docs/html/search/all_7.html rename to docs/search/all_7.html diff --git a/docs/search/all_7.js b/docs/search/all_7.js new file mode 100644 index 00000000..4e0b02fd --- /dev/null +++ b/docs/search/all_7.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['handlekeydown_73',['handleKeyDown',['../classViewer.html#a8bcd4fdeb5c26092d65fc14474afeb38',1,'Viewer']]], + ['handlekeyevent_74',['handleKeyEvent',['../classViewer.html#a643c2fc659f06f4d4bfcefbad22ebd75',1,'Viewer']]], + ['handleleftbuttondown_75',['handleLeftButtonDown',['../classViewer.html#a2b889c5d09c8577ad1580dd610ac5678',1,'Viewer']]], + ['handleleftbuttonup_76',['handleLeftButtonUp',['../classViewer.html#ae0c94514f0897aa84732024855520e28',1,'Viewer']]], + ['handlemouseevent_77',['handleMouseEvent',['../classViewer.html#acb15ba2e5d3bab2ba58da0db724b3bd1',1,'Viewer']]], + ['handlemousemove_78',['handleMouseMove',['../classViewer.html#a81a24ea13ee1e7e8c83be60672a7a11e',1,'Viewer']]], + ['handlemousewheel_79',['handleMouseWheel',['../classViewer.html#a940c6147b33b273afdff6eef7309d500',1,'Viewer']]], + ['height_80',['height',['../classRect.html#a31428cce67b56b6daf168131c7dbe1e8',1,'Rect']]] +]; diff --git a/docs/html/search/all_8.html b/docs/search/all_8.html similarity index 100% rename from docs/html/search/all_8.html rename to docs/search/all_8.html diff --git a/docs/html/search/all_8.js b/docs/search/all_8.js similarity index 68% rename from docs/html/search/all_8.js rename to docs/search/all_8.js index b5a1cc07..954811c1 100644 --- a/docs/html/search/all_8.js +++ b/docs/search/all_8.js @@ -1,5 +1,5 @@ var searchData= [ - ['instance_62',['instance',['../classParser.html#ae3a28c02c18171f4e83fae54b9f21a90',1,'Parser::instance()'],['../classRenderer.html#a7431a2f9b03f35752e034410ffebfbe1',1,'Renderer::instance()'],['../classViewer.html#a53c3dca921442983d13f335d0e8a7e20',1,'Viewer::instance()']]], - ['is_5fdragging_63',['is_dragging',['../classViewer.html#a452e9dd05638bf3da01d8f51dba009a5',1,'Viewer']]] + ['instance_81',['instance',['../classParser.html#ae3a28c02c18171f4e83fae54b9f21a90',1,'Parser::instance()'],['../classRenderer.html#a7431a2f9b03f35752e034410ffebfbe1',1,'Renderer::instance()'],['../classViewer.html#a53c3dca921442983d13f335d0e8a7e20',1,'Viewer::instance()']]], + ['is_5fdragging_82',['is_dragging',['../classViewer.html#a452e9dd05638bf3da01d8f51dba009a5',1,'Viewer']]] ]; diff --git a/docs/html/search/all_9.html b/docs/search/all_9.html similarity index 100% rename from docs/html/search/all_9.html rename to docs/search/all_9.html diff --git a/docs/search/all_9.js b/docs/search/all_9.js new file mode 100644 index 00000000..5cd89d74 --- /dev/null +++ b/docs/search/all_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['last_5fmouse_5fpos_83',['last_mouse_pos',['../classViewer.html#a77bc329e7ae0aecaf60a4de4f8dcc037',1,'Viewer']]], + ['line_84',['Line',['../classLine.html',1,'Line'],['../classLine.html#ab6e165ec2c3f412d5e5a860b28a52b4c',1,'Line::Line()']]], + ['lineargradient_85',['LinearGradient',['../classLinearGradient.html',1,'LinearGradient'],['../classLinearGradient.html#aaa0260244d818cd9d1180cb2697cc83b',1,'LinearGradient::LinearGradient()']]] +]; diff --git a/docs/html/search/all_a.html b/docs/search/all_a.html similarity index 100% rename from docs/html/search/all_a.html rename to docs/search/all_a.html diff --git a/docs/html/search/all_a.js b/docs/search/all_a.js similarity index 72% rename from docs/html/search/all_a.js rename to docs/search/all_a.js index de54802c..b8656554 100644 --- a/docs/html/search/all_a.js +++ b/docs/search/all_a.js @@ -1,5 +1,5 @@ var searchData= [ - ['magenta_66',['Magenta',['../classmColor.html#a777df695011fdb21f6b5d3e6745389c4',1,'mColor']]], - ['mcolor_67',['mColor',['../classmColor.html',1,'mColor'],['../classmColor.html#a9b1702a679c1c5f649787fe15d8b016a',1,'mColor::mColor()'],['../classmColor.html#a4376ef67b23a45be81daeecbfef1b2c3',1,'mColor::mColor(int red, int green, int blue, int alpha=255)'],['../classmColor.html#a8df59e284c6211d66b05fab14d726a5e',1,'mColor::mColor(int color)']]] + ['magenta_86',['Magenta',['../classmColor.html#a777df695011fdb21f6b5d3e6745389c4',1,'mColor']]], + ['mcolor_87',['mColor',['../classmColor.html',1,'mColor'],['../classmColor.html#a9b1702a679c1c5f649787fe15d8b016a',1,'mColor::mColor()'],['../classmColor.html#a4376ef67b23a45be81daeecbfef1b2c3',1,'mColor::mColor(int red, int green, int blue, int alpha=255)'],['../classmColor.html#a8df59e284c6211d66b05fab14d726a5e',1,'mColor::mColor(int color)']]] ]; diff --git a/docs/html/search/all_b.html b/docs/search/all_b.html similarity index 100% rename from docs/html/search/all_b.html rename to docs/search/all_b.html diff --git a/docs/html/search/functions_1.js b/docs/search/all_b.js similarity index 63% rename from docs/html/search/functions_1.js rename to docs/search/all_b.js index 23091283..d54c9f57 100644 --- a/docs/html/search/functions_1.js +++ b/docs/search/all_b.js @@ -1,4 +1,4 @@ var searchData= [ - ['circle_160',['Circle',['../classCircle.html#a5d018c51bfa1fa3d1081e3deef5eddc0',1,'Circle']]] + ['needs_5frepaint_88',['needs_repaint',['../classViewer.html#a59a507a835919e78114601d5bd1784e6',1,'Viewer']]] ]; diff --git a/docs/html/search/all_c.html b/docs/search/all_c.html similarity index 100% rename from docs/html/search/all_c.html rename to docs/search/all_c.html diff --git a/docs/search/all_c.js b/docs/search/all_c.js new file mode 100644 index 00000000..b5aeee6f --- /dev/null +++ b/docs/search/all_c.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['offset_89',['offset',['../classStop.html#a2b6aaf0f14507df64c6bbd99043ad44b',1,'Stop']]], + ['offset_5fx_90',['offset_x',['../classViewer.html#a3e16ebbf5c0ed98dc75fe2c4d46fe0d5',1,'Viewer']]], + ['offset_5fy_91',['offset_y',['../classViewer.html#a30b0f57907c82de620339e105f9a3c5b',1,'Viewer']]], + ['operator_3c_3c_92',['operator<<',['../classmColor.html#a1887c93301ffe92701baf17d6af3418e',1,'mColor']]], + ['operator_3d_93',['operator=',['../classRenderer.html#aa42607899757d0a1c5e8fe0aa4cb5a7f',1,'Renderer::operator=()'],['../classViewer.html#a3d14cceacd94622e6b9d5d71bfb5b64f',1,'Viewer::operator=()']]] +]; diff --git a/docs/html/search/all_d.html b/docs/search/all_d.html similarity index 100% rename from docs/html/search/all_d.html rename to docs/search/all_d.html diff --git a/docs/search/all_d.js b/docs/search/all_d.js new file mode 100644 index 00000000..d8f98903 --- /dev/null +++ b/docs/search/all_d.js @@ -0,0 +1,28 @@ +var searchData= +[ + ['parent_94',['parent',['../classSVGElement.html#adee748c3014de1c1ebd20411a52e824a',1,'SVGElement']]], + ['parsecircle_95',['parseCircle',['../classParser.html#ab7776f740b7d63c388a086c8b8ecccd0',1,'Parser']]], + ['parsecolor_96',['parseColor',['../classParser.html#a18d5a9aa35bd124023a060940486e183',1,'Parser']]], + ['parseelements_97',['parseElements',['../classParser.html#aaf9f19591ff93f0c0c2fd68955e4a4af',1,'Parser']]], + ['parseellipse_98',['parseEllipse',['../classParser.html#a0af0085ee5e20739bdf23a5b685642b6',1,'Parser']]], + ['parsegradient_99',['parseGradient',['../classParser.html#ac1e519500fce1b4192362ed1aa5ccbc3',1,'Parser']]], + ['parseline_100',['parseLine',['../classParser.html#a95e84ae219109769fae08702381acf78',1,'Parser']]], + ['parsepath_101',['parsePath',['../classParser.html#a6f80728e7a771d2653baf1b453b655d9',1,'Parser']]], + ['parsepathpoints_102',['parsePathPoints',['../classParser.html#aecea54d6bc1ff225a6ac450ccbb560c3',1,'Parser']]], + ['parsepoints_103',['parsePoints',['../classParser.html#af408a2ef7b27ceed0547093d73e6b2eb',1,'Parser']]], + ['parsepolygon_104',['parsePolygon',['../classParser.html#a7afd52c648dc5983e596edfa7eb6bbb5',1,'Parser']]], + ['parsepolyline_105',['parsePolyline',['../classParser.html#a03766f0f9f6ebdead0474973d3ac50aa',1,'Parser']]], + ['parser_106',['Parser',['../classParser.html#a350fc3e35535c5891cd9e36e79ee546a',1,'Parser::Parser(const std::string &file_name)'],['../classParser.html#a48044a8caa14a251cb4dad9fb363658e',1,'Parser::Parser(const Parser &)=delete'],['../classParser.html',1,'Parser']]], + ['parserect_107',['parseRect',['../classParser.html#a20352ab58a59e61f6da1b4d20861907d',1,'Parser']]], + ['parseshape_108',['parseShape',['../classParser.html#abfd09c5dd46fb0dc9bcd9106857dbf5e',1,'Parser']]], + ['parsetext_109',['parseText',['../classParser.html#a539bda46a2832a22741105c9299c12cb',1,'Parser']]], + ['path_110',['Path',['../classPath.html#a089f2f59cc5574ce9e93826891044378',1,'Path::Path()'],['../classPath.html',1,'Path']]], + ['pathpoint_111',['PathPoint',['../structPathPoint.html',1,'']]], + ['plygon_112',['Plygon',['../classPlygon.html',1,'Plygon'],['../classPlygon.html#ac3f4fb224f4f84c3bd6e41093cd847cd',1,'Plygon::Plygon()']]], + ['plyline_113',['Plyline',['../classPlyline.html',1,'Plyline'],['../classPlyline.html#a8bf7677d7adb76f146607ef1aaa49bd3',1,'Plyline::Plyline()']]], + ['points_114',['points',['../classGradient.html#a8da859d1b12459800e763c31f18d0d41',1,'Gradient::points()'],['../classPath.html#a1880b844baafdeca91a7cf5d155cf9f1',1,'Path::points()'],['../classPolyShape.html#acbd1d536ad25e34b160e849a0fc12697',1,'PolyShape::points()']]], + ['polyshape_115',['PolyShape',['../classPolyShape.html#a6fd054647bea080272ed79bbea7080ac',1,'PolyShape::PolyShape()'],['../classPolyShape.html',1,'PolyShape']]], + ['position_116',['position',['../classSVGElement.html#acf9b9906b6d0cba8bb5c0b38b032e40f',1,'SVGElement']]], + ['printdata_117',['printData',['../classEll.html#a1d6d60039d2405f2b7aa117206d128fb',1,'Ell::printData()'],['../classGroup.html#a42fa18c4215ad3669db32b78e22303fa',1,'Group::printData()'],['../classPath.html#a3d2df8f3367db525772586065e16151e',1,'Path::printData()'],['../classPolyShape.html#a40a83ac567156de6da65adb1a4380c7c',1,'PolyShape::printData()'],['../classRect.html#a66351fe7a171c2b3ed5f4bdf8d6661ba',1,'Rect::printData()'],['../classSVGElement.html#ad4bcd981ae7431161013811024b452e1',1,'SVGElement::printData()'],['../classText.html#a40e38d59ba9b34df9900375409f6f03f',1,'Text::printData()']]], + ['printshapesdata_118',['printShapesData',['../classParser.html#a3d8927f2e26abf6a63bd850c154b23c6',1,'Parser']]] +]; diff --git a/docs/html/search/all_e.html b/docs/search/all_e.html similarity index 100% rename from docs/html/search/all_e.html rename to docs/search/all_e.html diff --git a/docs/search/all_e.js b/docs/search/all_e.js new file mode 100644 index 00000000..374fdfe6 --- /dev/null +++ b/docs/search/all_e.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['r_119',['r',['../classmColor.html#a427453d377b30c62f7d25f47120959d6',1,'mColor']]], + ['radialgradient_120',['RadialGradient',['../classRadialGradient.html',1,'RadialGradient'],['../classRadialGradient.html#a656e8c8a107f28a06c356a3ad1a4827c',1,'RadialGradient::RadialGradient()']]], + ['radius_121',['radius',['../classEll.html#af57a48abe0e2bc8806e73dfa7762388f',1,'Ell::radius()'],['../classRadialGradient.html#abad9345ee5091075d8fc1b7a3511dbd7',1,'RadialGradient::radius()'],['../classRect.html#a7857e3568d2a2a35bf0c6b28028005b5',1,'Rect::radius()']]], + ['rect_122',['Rect',['../classRect.html',1,'Rect'],['../classRect.html#ad52d66e844d848d0e95f744b697e7beb',1,'Rect::Rect()']]], + ['red_123',['Red',['../classmColor.html#aa0fc6fe3033f7ff2806c59e39c072dbc',1,'mColor']]], + ['renderer_124',['Renderer',['../classRenderer.html',1,'Renderer'],['../classRenderer.html#a8c6e15f666cb188a936004add75e6c6b',1,'Renderer::Renderer(const Renderer &)=delete'],['../classRenderer.html#a7ebf46f54dab9905f79b80f7fddb76a6',1,'Renderer::Renderer()']]], + ['root_125',['root',['../classParser.html#a13a5e2fdac62670c1584de1edbba77f2',1,'Parser']]], + ['rotate_5fangle_126',['rotate_angle',['../classViewer.html#a82dfd34668f986b72e51ee86d4029fc6',1,'Viewer']]] +]; diff --git a/docs/html/search/all_f.html b/docs/search/all_f.html similarity index 100% rename from docs/html/search/all_f.html rename to docs/search/all_f.html diff --git a/docs/search/all_f.js b/docs/search/all_f.js new file mode 100644 index 00000000..5d4f73f4 --- /dev/null +++ b/docs/search/all_f.js @@ -0,0 +1,27 @@ +var searchData= +[ + ['setanchor_127',['setAnchor',['../classText.html#aa503905beb9dddf11c9c579424d0a84f',1,'Text']]], + ['setcontent_128',['setContent',['../classText.html#a12e8ae19a8e677eb6f1c2dc2716dcab0',1,'Text']]], + ['setdirection_129',['setDirection',['../classLine.html#ab46a879365e623e8b360c2db54d76782',1,'Line']]], + ['setfillcolor_130',['setFillColor',['../classSVGElement.html#abf7eef6d09fedba0d0f50a0f1a4be2fb',1,'SVGElement']]], + ['setfillrule_131',['setFillRule',['../classPath.html#ad2ba583a2dd567c3295ea62817b541e9',1,'Path::setFillRule()'],['../classPolyShape.html#a0c918fe8d9df68573a1c0d6e18bc6c9a',1,'PolyShape::setFillRule()']]], + ['setfontsize_132',['setFontSize',['../classText.html#a6a04680d93c625645278b1d1111420bb',1,'Text']]], + ['setfontstyle_133',['setFontStyle',['../classText.html#a4f24f78f8a962e758b70c5d9fd85b7cb',1,'Text']]], + ['setgradient_134',['setGradient',['../classSVGElement.html#a312b6aa934488672585c7e9d858300f8',1,'SVGElement']]], + ['setheight_135',['setHeight',['../classRect.html#a964a6107f787f612798bda5c0423fb5b',1,'Rect']]], + ['setoutlinecolor_136',['setOutlineColor',['../classSVGElement.html#ac0cc2f6d2e01d364a695bebaa7db18d2',1,'SVGElement']]], + ['setoutlinethickness_137',['setOutlineThickness',['../classSVGElement.html#a88653ebe8b92ec881ab436ea968375a8',1,'SVGElement']]], + ['setparent_138',['setParent',['../classSVGElement.html#a43b3bf06fae88a1634a189272088d11d',1,'SVGElement']]], + ['setposition_139',['setPosition',['../classSVGElement.html#aec8a2f582f21a559c05d791e017efbd5',1,'SVGElement::setPosition(const Vector2Df &position)'],['../classSVGElement.html#a77aefe4b7e9dbf180cc531c969d0116d',1,'SVGElement::setPosition(float x, float y)']]], + ['setradius_140',['setRadius',['../classEll.html#a9f67131ba02c02fccf42c52f5f04525e',1,'Ell::setRadius()'],['../classRect.html#a28b51c4f99cfa0208a2a5cef350c2a5e',1,'Rect::setRadius()']]], + ['settransforms_141',['setTransforms',['../classGradient.html#ae2afa93bd9b6759f5fe625065301d3d9',1,'Gradient::setTransforms()'],['../classSVGElement.html#a00fef2ebc5df4838b3f9bd7111b117c5',1,'SVGElement::setTransforms()']]], + ['setunits_142',['setUnits',['../classGradient.html#a61dd624d452ab2afe913414158888165',1,'Gradient']]], + ['setwidth_143',['setWidth',['../classRect.html#ae11a39d12f7a766f773e662b0830848d',1,'Rect']]], + ['shapes_144',['shapes',['../classGroup.html#a6ff10d6fceb2a78103db2d9783de6f41',1,'Group']]], + ['stop_145',['Stop',['../classStop.html#a3ad6054f4ecb97b3fc68595b744f8d54',1,'Stop::Stop()'],['../classStop.html',1,'Stop']]], + ['stops_146',['stops',['../classGradient.html#a7831fa94135c818481ef7c85f792e1ca',1,'Gradient']]], + ['stroke_147',['stroke',['../classSVGElement.html#aab937dcb566cd83d94d00d69b4083f13',1,'SVGElement']]], + ['stroke_5fwidth_148',['stroke_width',['../classSVGElement.html#a88449b487a890e3765ae20e96ee95c06',1,'SVGElement']]], + ['style_149',['style',['../classText.html#a12ee81ccf865a414867d4101c8dbbdb2',1,'Text']]], + ['svgelement_150',['SVGElement',['../classSVGElement.html#a6ed48bcc78dd62e3da256ddbd103ccd1',1,'SVGElement::SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)'],['../classSVGElement.html#a1a43e7717c20d50fd1990b592499fdba',1,'SVGElement::SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)'],['../classSVGElement.html#ad30205005009d2ba4820d3ce372e81ea',1,'SVGElement::SVGElement()'],['../classSVGElement.html',1,'SVGElement']]] +]; diff --git a/docs/html/search/classes_0.html b/docs/search/classes_0.html similarity index 100% rename from docs/html/search/classes_0.html rename to docs/search/classes_0.html diff --git a/docs/search/classes_0.js b/docs/search/classes_0.js new file mode 100644 index 00000000..02ed3edb --- /dev/null +++ b/docs/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['circle_172',['Circle',['../classCircle.html',1,'']]] +]; diff --git a/docs/html/search/classes_1.html b/docs/search/classes_1.html similarity index 100% rename from docs/html/search/classes_1.html rename to docs/search/classes_1.html diff --git a/docs/search/classes_1.js b/docs/search/classes_1.js new file mode 100644 index 00000000..a014cbd7 --- /dev/null +++ b/docs/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ell_173',['Ell',['../classEll.html',1,'']]] +]; diff --git a/docs/html/search/classes_2.html b/docs/search/classes_2.html similarity index 100% rename from docs/html/search/classes_2.html rename to docs/search/classes_2.html diff --git a/docs/search/classes_2.js b/docs/search/classes_2.js new file mode 100644 index 00000000..f3618505 --- /dev/null +++ b/docs/search/classes_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['gradient_174',['Gradient',['../classGradient.html',1,'']]], + ['group_175',['Group',['../classGroup.html',1,'']]] +]; diff --git a/docs/html/search/classes_3.html b/docs/search/classes_3.html similarity index 100% rename from docs/html/search/classes_3.html rename to docs/search/classes_3.html diff --git a/docs/search/classes_3.js b/docs/search/classes_3.js new file mode 100644 index 00000000..74ac69e8 --- /dev/null +++ b/docs/search/classes_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['line_176',['Line',['../classLine.html',1,'']]], + ['lineargradient_177',['LinearGradient',['../classLinearGradient.html',1,'']]] +]; diff --git a/docs/html/search/classes_4.html b/docs/search/classes_4.html similarity index 100% rename from docs/html/search/classes_4.html rename to docs/search/classes_4.html diff --git a/docs/search/classes_4.js b/docs/search/classes_4.js new file mode 100644 index 00000000..bda7f511 --- /dev/null +++ b/docs/search/classes_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['mcolor_178',['mColor',['../classmColor.html',1,'']]] +]; diff --git a/docs/html/search/classes_5.html b/docs/search/classes_5.html similarity index 100% rename from docs/html/search/classes_5.html rename to docs/search/classes_5.html diff --git a/docs/search/classes_5.js b/docs/search/classes_5.js new file mode 100644 index 00000000..be37f8a5 --- /dev/null +++ b/docs/search/classes_5.js @@ -0,0 +1,9 @@ +var searchData= +[ + ['parser_179',['Parser',['../classParser.html',1,'']]], + ['path_180',['Path',['../classPath.html',1,'']]], + ['pathpoint_181',['PathPoint',['../structPathPoint.html',1,'']]], + ['plygon_182',['Plygon',['../classPlygon.html',1,'']]], + ['plyline_183',['Plyline',['../classPlyline.html',1,'']]], + ['polyshape_184',['PolyShape',['../classPolyShape.html',1,'']]] +]; diff --git a/docs/html/search/classes_6.html b/docs/search/classes_6.html similarity index 100% rename from docs/html/search/classes_6.html rename to docs/search/classes_6.html diff --git a/docs/search/classes_6.js b/docs/search/classes_6.js new file mode 100644 index 00000000..52851828 --- /dev/null +++ b/docs/search/classes_6.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['radialgradient_185',['RadialGradient',['../classRadialGradient.html',1,'']]], + ['rect_186',['Rect',['../classRect.html',1,'']]], + ['renderer_187',['Renderer',['../classRenderer.html',1,'']]] +]; diff --git a/docs/html/search/classes_7.html b/docs/search/classes_7.html similarity index 100% rename from docs/html/search/classes_7.html rename to docs/search/classes_7.html diff --git a/docs/search/classes_7.js b/docs/search/classes_7.js new file mode 100644 index 00000000..be6044c6 --- /dev/null +++ b/docs/search/classes_7.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['stop_188',['Stop',['../classStop.html',1,'']]], + ['svgelement_189',['SVGElement',['../classSVGElement.html',1,'']]] +]; diff --git a/docs/html/search/classes_8.html b/docs/search/classes_8.html similarity index 100% rename from docs/html/search/classes_8.html rename to docs/search/classes_8.html diff --git a/docs/search/classes_8.js b/docs/search/classes_8.js new file mode 100644 index 00000000..48a64789 --- /dev/null +++ b/docs/search/classes_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['text_190',['Text',['../classText.html',1,'']]] +]; diff --git a/docs/html/search/classes_9.html b/docs/search/classes_9.html similarity index 100% rename from docs/html/search/classes_9.html rename to docs/search/classes_9.html diff --git a/docs/search/classes_9.js b/docs/search/classes_9.js new file mode 100644 index 00000000..8aa22451 --- /dev/null +++ b/docs/search/classes_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['vector2d_191',['Vector2D',['../classVector2D.html',1,'']]], + ['vector2d_3c_20float_20_3e_192',['Vector2D< float >',['../classVector2D.html',1,'']]], + ['viewer_193',['Viewer',['../classViewer.html',1,'']]] +]; diff --git a/docs/html/search/close.svg b/docs/search/close.svg similarity index 100% rename from docs/html/search/close.svg rename to docs/search/close.svg diff --git a/docs/html/search/functions_0.html b/docs/search/functions_0.html similarity index 100% rename from docs/html/search/functions_0.html rename to docs/search/functions_0.html diff --git a/docs/search/functions_0.js b/docs/search/functions_0.js new file mode 100644 index 00000000..00e41cfb --- /dev/null +++ b/docs/search/functions_0.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['addelement_194',['addElement',['../classGroup.html#af4dafed0506ca5e9ea9e1028b1504919',1,'Group::addElement()'],['../classSVGElement.html#af699f9aa795572c2873e520849579881',1,'SVGElement::addElement()']]], + ['addpoint_195',['addPoint',['../classPath.html#ad4273c2a1b288fe43dd86375afc16f66',1,'Path::addPoint()'],['../classPolyShape.html#a3a5e4952aff469f241ee1c9b92833f55',1,'PolyShape::addPoint()']]], + ['addstop_196',['addStop',['../classGradient.html#a44218bd3fb347f4c269f1f2795fb77d5',1,'Gradient']]], + ['applytransform_197',['applyTransform',['../classRenderer.html#a8d159bc1ea8f4152339d6c5eead27e45',1,'Renderer']]], + ['applytransformsonbrush_198',['applyTransformsOnBrush',['../classRenderer.html#a33a87db2173a7509be2d60fcffff9058',1,'Renderer::applyTransformsOnBrush(std::vector< std::string > transform_order, Gdiplus::LinearGradientBrush *&brush) const'],['../classRenderer.html#a578e046986da5ec2585ce106562c3de3',1,'Renderer::applyTransformsOnBrush(std::vector< std::string > transform_order, Gdiplus::PathGradientBrush *&brush) const']]] +]; diff --git a/docs/html/search/functions_1.html b/docs/search/functions_1.html similarity index 100% rename from docs/html/search/functions_1.html rename to docs/search/functions_1.html diff --git a/docs/search/functions_1.js b/docs/search/functions_1.js new file mode 100644 index 00000000..802d67bc --- /dev/null +++ b/docs/search/functions_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['circle_199',['Circle',['../classCircle.html#a5d018c51bfa1fa3d1081e3deef5eddc0',1,'Circle']]] +]; diff --git a/docs/html/search/functions_10.html b/docs/search/functions_10.html similarity index 100% rename from docs/html/search/functions_10.html rename to docs/search/functions_10.html diff --git a/docs/html/search/functions_10.js b/docs/search/functions_10.js similarity index 100% rename from docs/html/search/functions_10.js rename to docs/search/functions_10.js diff --git a/docs/html/search/functions_2.html b/docs/search/functions_2.html similarity index 100% rename from docs/html/search/functions_2.html rename to docs/search/functions_2.html diff --git a/docs/search/functions_2.js b/docs/search/functions_2.js new file mode 100644 index 00000000..4d907a35 --- /dev/null +++ b/docs/search/functions_2.js @@ -0,0 +1,12 @@ +var searchData= +[ + ['draw_200',['draw',['../classRenderer.html#a1fac47f9b1c4c3fb1151f2b6ecb282f6',1,'Renderer']]], + ['drawcircle_201',['drawCircle',['../classRenderer.html#a9b5ca422ec7f1328d854cc4bff269858',1,'Renderer']]], + ['drawellipse_202',['drawEllipse',['../classRenderer.html#af4d92e92abb79e4431f7331f792194d9',1,'Renderer']]], + ['drawline_203',['drawLine',['../classRenderer.html#ab68c9e02c7eadf1f18286c9ecf0d90ca',1,'Renderer']]], + ['drawpath_204',['drawPath',['../classRenderer.html#a6cbcbb11e386c26eacef0b97342fee77',1,'Renderer']]], + ['drawpolygon_205',['drawPolygon',['../classRenderer.html#a27b883787b8f38afd04924edc97b5a04',1,'Renderer']]], + ['drawpolyline_206',['drawPolyline',['../classRenderer.html#a4e73148b7da0f585084520d12c514344',1,'Renderer']]], + ['drawrectangle_207',['drawRectangle',['../classRenderer.html#abf163a7895594e0a4ee5662805b1b572',1,'Renderer']]], + ['drawtext_208',['drawText',['../classRenderer.html#a87ce996c3ed0f963de9ef6c293ee3aec',1,'Renderer']]] +]; diff --git a/docs/html/search/functions_3.html b/docs/search/functions_3.html similarity index 100% rename from docs/html/search/functions_3.html rename to docs/search/functions_3.html diff --git a/docs/search/functions_3.js b/docs/search/functions_3.js new file mode 100644 index 00000000..ab0e4055 --- /dev/null +++ b/docs/search/functions_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ell_209',['Ell',['../classEll.html#a4a9956ca82cb9f957e993fa0c0faced6',1,'Ell']]] +]; diff --git a/docs/html/search/functions_4.html b/docs/search/functions_4.html similarity index 100% rename from docs/html/search/functions_4.html rename to docs/search/functions_4.html diff --git a/docs/search/functions_4.js b/docs/search/functions_4.js new file mode 100644 index 00000000..063ea822 --- /dev/null +++ b/docs/search/functions_4.js @@ -0,0 +1,43 @@ +var searchData= +[ + ['getanchor_210',['getAnchor',['../classText.html#a445117756f52b37ae8bce225e254bea6',1,'Text']]], + ['getattribute_211',['getAttribute',['../classParser.html#a63329a7accdf332feb3fba1bcc4deec6',1,'Parser']]], + ['getattributes_212',['getAttributes',['../classGroup.html#a317fcd42fd61b83c0d932bd1eb2c753f',1,'Group']]], + ['getbrush_213',['getBrush',['../classRenderer.html#a7539832835d19ee365dcbabf490d642c',1,'Renderer']]], + ['getclass_214',['getClass',['../classCircle.html#a09523e46318092d42a5969a1da5613bb',1,'Circle::getClass()'],['../classEll.html#a0d0a2a70c06878c5769bd7d092277892',1,'Ell::getClass()'],['../classGradient.html#adb86ee7c9171cb7294d1bb8956e97891',1,'Gradient::getClass()'],['../classGroup.html#a070e010084eaac6131e1bf814d10d234',1,'Group::getClass()'],['../classLine.html#a745f295541d412b49dac89423bd957a6',1,'Line::getClass()'],['../classLinearGradient.html#aa434164a18fa29e778cdb7fc96770b9a',1,'LinearGradient::getClass()'],['../classPath.html#ac99ffb44f19586a10ee39aa70fd4a260',1,'Path::getClass()'],['../classPlygon.html#aab00a0d0230ea320271e96c326c6b919',1,'Plygon::getClass()'],['../classPlyline.html#a5b9d86c75604d329037cd47e8ba3d5b9',1,'Plyline::getClass()'],['../classPolyShape.html#afc263d5407ca7ea50e30d641d779b73b',1,'PolyShape::getClass()'],['../classRadialGradient.html#a132c35f92ecceb604cdddf098c36824c',1,'RadialGradient::getClass()'],['../classRect.html#a4f6ba1c3eef4054847a89da472f392cd',1,'Rect::getClass()'],['../classSVGElement.html#adc98ebac66965dd303283cbf7ff28f38',1,'SVGElement::getClass()'],['../classText.html#a405fac6f66711e0063e18e9e211e3a62',1,'Text::getClass()']]], + ['getcolor_215',['getColor',['../classStop.html#a0ee1f3e4c4298b8712cef19f24e07dff',1,'Stop']]], + ['getcontent_216',['getContent',['../classText.html#ac593599637e5e7f0f929c59b440f1b94',1,'Text']]], + ['getdirection_217',['getDirection',['../classLine.html#adb348ce7ddf4b500c3593b7126aa4451',1,'Line']]], + ['getelements_218',['getElements',['../classGroup.html#a310fa83ccb20841373c11b6b4ac1d336',1,'Group']]], + ['getfillcolor_219',['getFillColor',['../classSVGElement.html#abb012cad5d6e9ee7a413f46042f99429',1,'SVGElement']]], + ['getfillrule_220',['getFillRule',['../classPath.html#a9395325e65f86fd2a4be2dc24408753a',1,'Path::getFillRule()'],['../classPolyShape.html#acac99a28e69ee5020eed782175a5a355',1,'PolyShape::getFillRule()']]], + ['getfloatattribute_221',['getFloatAttribute',['../classParser.html#ab2b1df7c69830fafcbe36de5199dcd30',1,'Parser']]], + ['getfontsize_222',['getFontSize',['../classText.html#a6e799a9b0ba6f88e704eea12599d3d5c',1,'Text']]], + ['getfontstyle_223',['getFontStyle',['../classText.html#a86fd1927b692d6691c8dd3901b6f6e48',1,'Text']]], + ['getgradient_224',['getGradient',['../classSVGElement.html#a9b64e7697c24a6972aacb01b89c0e542',1,'SVGElement']]], + ['getgradients_225',['GetGradients',['../classParser.html#ac00eac6bf37c45c9160fa47700d2466f',1,'Parser']]], + ['getgradientstops_226',['getGradientStops',['../classParser.html#aca2ed5f466436a9e9f78618bb1e356fd',1,'Parser']]], + ['getheight_227',['getHeight',['../classRect.html#a418fffe5bb9368f4e158b63e13faba16',1,'Rect']]], + ['getinstance_228',['getInstance',['../classViewer.html#a8235c9da7e144d7139c91901c0051cd8',1,'Viewer::getInstance()'],['../classRenderer.html#ac1bf10ff8b4f967f0d416a26d482abd6',1,'Renderer::getInstance()'],['../classParser.html#a06952fa44f19fdb573c1355ac26454c5',1,'Parser::getInstance()']]], + ['getlength_229',['getLength',['../classLine.html#afe6672bc7667cf45739c46f9fc8cb237',1,'Line']]], + ['getmaxbound_230',['getMaxBound',['../classEll.html#a8a8dd2acc8c7be5580dd8e549d247525',1,'Ell::getMaxBound()'],['../classPolyShape.html#a6ddda72dc27d7aade0ed444a52d7689f',1,'PolyShape::getMaxBound()'],['../classSVGElement.html#a03ac231161d1d5062951fa3fca33a39b',1,'SVGElement::getMaxBound()']]], + ['getminbound_231',['getMinBound',['../classEll.html#ab79368df57ee08382916fc52b69afb85',1,'Ell::getMinBound()'],['../classPolyShape.html#a0ad83e0129196572f99302830e0c9049',1,'PolyShape::getMinBound()'],['../classSVGElement.html#a0cce88c48233f4da470daad2edab0d06',1,'SVGElement::getMinBound()']]], + ['getoffset_232',['getOffset',['../classStop.html#a60a63002485122f30a80e80220d99748',1,'Stop']]], + ['getoutlinecolor_233',['getOutlineColor',['../classSVGElement.html#a9a243b2b8464d57df28f3f3e8c52511e',1,'SVGElement']]], + ['getoutlinethickness_234',['getOutlineThickness',['../classSVGElement.html#a2e4b1a48bfbc34a6a9f17bfd4b89eb51',1,'SVGElement']]], + ['getparent_235',['getParent',['../classSVGElement.html#a1b075314d4cda4fa895688979fe462fd',1,'SVGElement']]], + ['getpoints_236',['getPoints',['../classGradient.html#aced479d6a10d2aa53e6d363e1df5dc08',1,'Gradient::getPoints()'],['../classPath.html#a9d701e9231022249523970101bbc749c',1,'Path::getPoints()'],['../classPolyShape.html#a27704ef9fd50c041d1d233e9d99a4fd4',1,'PolyShape::getPoints()']]], + ['getposition_237',['getPosition',['../classSVGElement.html#a4e1ed8bb29fd4dbeb35471315976b3a2',1,'SVGElement']]], + ['getradius_238',['getRadius',['../classEll.html#a00d607a5238705b552ec61b4409b76c1',1,'Ell::getRadius()'],['../classRect.html#a31ca84cc8755233b5e61d22189f637b0',1,'Rect::getRadius()'],['../classRadialGradient.html#acfa8223581f3caf2db33c310cfa48d1d',1,'RadialGradient::getRadius()']]], + ['getroot_239',['getRoot',['../classParser.html#a59ed4455eaec306cde11939785c4e71a',1,'Parser']]], + ['getstops_240',['getStops',['../classGradient.html#a1125c4e5294389bb6698bf4fcb4f928d',1,'Gradient']]], + ['gettransformorder_241',['getTransformOrder',['../classParser.html#a99df58e649089762bf434502173716d6',1,'Parser']]], + ['gettransforms_242',['getTransforms',['../classGradient.html#adf0e8b360f2b8e6edc1059002f85b1c1',1,'Gradient::getTransforms()'],['../classSVGElement.html#a5f111964efd20e98eafafb3d168a1e87',1,'SVGElement::getTransforms()']]], + ['getunits_243',['getUnits',['../classGradient.html#a54cc5770c2dce46f1d56bcfb63285173',1,'Gradient']]], + ['getviewbox_244',['getViewBox',['../classParser.html#a4efa2342d694eff2ab6ba1d150c7bb69',1,'Parser']]], + ['getviewport_245',['getViewPort',['../classParser.html#a009fbe10a1b9b58a65be44634335a062',1,'Parser']]], + ['getwidth_246',['getWidth',['../classRect.html#a9c1dd853ea5df8e7c96a11bba72cc67a',1,'Rect']]], + ['getwindowsize_247',['getWindowSize',['../classViewer.html#aa8d0481396e20f1a8d4f6691ff0a67c1',1,'Viewer']]], + ['gradient_248',['Gradient',['../classGradient.html#aa27206a9cc0adb5309a6db6dbd9d0257',1,'Gradient']]], + ['group_249',['Group',['../classGroup.html#a7b74f9ac68e0504ccf2e2854b7355ff1',1,'Group::Group()'],['../classGroup.html#a123cdaf1fb7cdf873740757d3864a4a6',1,'Group::Group(Attributes attributes)']]] +]; diff --git a/docs/html/search/functions_5.html b/docs/search/functions_5.html similarity index 100% rename from docs/html/search/functions_5.html rename to docs/search/functions_5.html diff --git a/docs/search/functions_5.js b/docs/search/functions_5.js new file mode 100644 index 00000000..a6732265 --- /dev/null +++ b/docs/search/functions_5.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['handlekeydown_250',['handleKeyDown',['../classViewer.html#a8bcd4fdeb5c26092d65fc14474afeb38',1,'Viewer']]], + ['handlekeyevent_251',['handleKeyEvent',['../classViewer.html#a643c2fc659f06f4d4bfcefbad22ebd75',1,'Viewer']]], + ['handleleftbuttondown_252',['handleLeftButtonDown',['../classViewer.html#a2b889c5d09c8577ad1580dd610ac5678',1,'Viewer']]], + ['handleleftbuttonup_253',['handleLeftButtonUp',['../classViewer.html#ae0c94514f0897aa84732024855520e28',1,'Viewer']]], + ['handlemouseevent_254',['handleMouseEvent',['../classViewer.html#acb15ba2e5d3bab2ba58da0db724b3bd1',1,'Viewer']]], + ['handlemousemove_255',['handleMouseMove',['../classViewer.html#a81a24ea13ee1e7e8c83be60672a7a11e',1,'Viewer']]], + ['handlemousewheel_256',['handleMouseWheel',['../classViewer.html#a940c6147b33b273afdff6eef7309d500',1,'Viewer']]] +]; diff --git a/docs/html/search/functions_6.html b/docs/search/functions_6.html similarity index 100% rename from docs/html/search/functions_6.html rename to docs/search/functions_6.html diff --git a/docs/search/functions_6.js b/docs/search/functions_6.js new file mode 100644 index 00000000..e8c63a2b --- /dev/null +++ b/docs/search/functions_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['line_257',['Line',['../classLine.html#ab6e165ec2c3f412d5e5a860b28a52b4c',1,'Line']]], + ['lineargradient_258',['LinearGradient',['../classLinearGradient.html#aaa0260244d818cd9d1180cb2697cc83b',1,'LinearGradient']]] +]; diff --git a/docs/html/search/functions_7.html b/docs/search/functions_7.html similarity index 100% rename from docs/html/search/functions_7.html rename to docs/search/functions_7.html diff --git a/docs/html/search/functions_7.js b/docs/search/functions_7.js similarity index 81% rename from docs/html/search/functions_7.js rename to docs/search/functions_7.js index d1ff1f36..a2294692 100644 --- a/docs/html/search/functions_7.js +++ b/docs/search/functions_7.js @@ -1,4 +1,4 @@ var searchData= [ - ['mcolor_204',['mColor',['../classmColor.html#a9b1702a679c1c5f649787fe15d8b016a',1,'mColor::mColor()'],['../classmColor.html#a4376ef67b23a45be81daeecbfef1b2c3',1,'mColor::mColor(int red, int green, int blue, int alpha=255)'],['../classmColor.html#a8df59e284c6211d66b05fab14d726a5e',1,'mColor::mColor(int color)']]] + ['mcolor_259',['mColor',['../classmColor.html#a9b1702a679c1c5f649787fe15d8b016a',1,'mColor::mColor()'],['../classmColor.html#a4376ef67b23a45be81daeecbfef1b2c3',1,'mColor::mColor(int red, int green, int blue, int alpha=255)'],['../classmColor.html#a8df59e284c6211d66b05fab14d726a5e',1,'mColor::mColor(int color)']]] ]; diff --git a/docs/html/search/functions_8.html b/docs/search/functions_8.html similarity index 100% rename from docs/html/search/functions_8.html rename to docs/search/functions_8.html diff --git a/docs/html/search/functions_8.js b/docs/search/functions_8.js similarity index 71% rename from docs/html/search/functions_8.js rename to docs/search/functions_8.js index dbac7c10..e473423e 100644 --- a/docs/html/search/functions_8.js +++ b/docs/search/functions_8.js @@ -1,4 +1,4 @@ var searchData= [ - ['operator_3d_205',['operator=',['../classRenderer.html#aa42607899757d0a1c5e8fe0aa4cb5a7f',1,'Renderer::operator=()'],['../classViewer.html#a3d14cceacd94622e6b9d5d71bfb5b64f',1,'Viewer::operator=()']]] + ['operator_3d_260',['operator=',['../classRenderer.html#aa42607899757d0a1c5e8fe0aa4cb5a7f',1,'Renderer::operator=()'],['../classViewer.html#a3d14cceacd94622e6b9d5d71bfb5b64f',1,'Viewer::operator=()']]] ]; diff --git a/docs/html/search/functions_9.html b/docs/search/functions_9.html similarity index 100% rename from docs/html/search/functions_9.html rename to docs/search/functions_9.html diff --git a/docs/search/functions_9.js b/docs/search/functions_9.js new file mode 100644 index 00000000..3706b021 --- /dev/null +++ b/docs/search/functions_9.js @@ -0,0 +1,24 @@ +var searchData= +[ + ['parsecircle_261',['parseCircle',['../classParser.html#ab7776f740b7d63c388a086c8b8ecccd0',1,'Parser']]], + ['parsecolor_262',['parseColor',['../classParser.html#a18d5a9aa35bd124023a060940486e183',1,'Parser']]], + ['parseelements_263',['parseElements',['../classParser.html#aaf9f19591ff93f0c0c2fd68955e4a4af',1,'Parser']]], + ['parseellipse_264',['parseEllipse',['../classParser.html#a0af0085ee5e20739bdf23a5b685642b6',1,'Parser']]], + ['parsegradient_265',['parseGradient',['../classParser.html#ac1e519500fce1b4192362ed1aa5ccbc3',1,'Parser']]], + ['parseline_266',['parseLine',['../classParser.html#a95e84ae219109769fae08702381acf78',1,'Parser']]], + ['parsepath_267',['parsePath',['../classParser.html#a6f80728e7a771d2653baf1b453b655d9',1,'Parser']]], + ['parsepathpoints_268',['parsePathPoints',['../classParser.html#aecea54d6bc1ff225a6ac450ccbb560c3',1,'Parser']]], + ['parsepoints_269',['parsePoints',['../classParser.html#af408a2ef7b27ceed0547093d73e6b2eb',1,'Parser']]], + ['parsepolygon_270',['parsePolygon',['../classParser.html#a7afd52c648dc5983e596edfa7eb6bbb5',1,'Parser']]], + ['parsepolyline_271',['parsePolyline',['../classParser.html#a03766f0f9f6ebdead0474973d3ac50aa',1,'Parser']]], + ['parser_272',['Parser',['../classParser.html#a48044a8caa14a251cb4dad9fb363658e',1,'Parser::Parser(const Parser &)=delete'],['../classParser.html#a350fc3e35535c5891cd9e36e79ee546a',1,'Parser::Parser(const std::string &file_name)']]], + ['parserect_273',['parseRect',['../classParser.html#a20352ab58a59e61f6da1b4d20861907d',1,'Parser']]], + ['parseshape_274',['parseShape',['../classParser.html#abfd09c5dd46fb0dc9bcd9106857dbf5e',1,'Parser']]], + ['parsetext_275',['parseText',['../classParser.html#a539bda46a2832a22741105c9299c12cb',1,'Parser']]], + ['path_276',['Path',['../classPath.html#a089f2f59cc5574ce9e93826891044378',1,'Path']]], + ['plygon_277',['Plygon',['../classPlygon.html#ac3f4fb224f4f84c3bd6e41093cd847cd',1,'Plygon']]], + ['plyline_278',['Plyline',['../classPlyline.html#a8bf7677d7adb76f146607ef1aaa49bd3',1,'Plyline']]], + ['polyshape_279',['PolyShape',['../classPolyShape.html#a6fd054647bea080272ed79bbea7080ac',1,'PolyShape']]], + ['printdata_280',['printData',['../classEll.html#a1d6d60039d2405f2b7aa117206d128fb',1,'Ell::printData()'],['../classGroup.html#a42fa18c4215ad3669db32b78e22303fa',1,'Group::printData()'],['../classPath.html#a3d2df8f3367db525772586065e16151e',1,'Path::printData()'],['../classPolyShape.html#a40a83ac567156de6da65adb1a4380c7c',1,'PolyShape::printData()'],['../classRect.html#a66351fe7a171c2b3ed5f4bdf8d6661ba',1,'Rect::printData()'],['../classSVGElement.html#ad4bcd981ae7431161013811024b452e1',1,'SVGElement::printData()'],['../classText.html#a40e38d59ba9b34df9900375409f6f03f',1,'Text::printData()']]], + ['printshapesdata_281',['printShapesData',['../classParser.html#a3d8927f2e26abf6a63bd850c154b23c6',1,'Parser']]] +]; diff --git a/docs/html/search/functions_a.html b/docs/search/functions_a.html similarity index 100% rename from docs/html/search/functions_a.html rename to docs/search/functions_a.html diff --git a/docs/search/functions_a.js b/docs/search/functions_a.js new file mode 100644 index 00000000..86e14054 --- /dev/null +++ b/docs/search/functions_a.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['radialgradient_282',['RadialGradient',['../classRadialGradient.html#a656e8c8a107f28a06c356a3ad1a4827c',1,'RadialGradient']]], + ['rect_283',['Rect',['../classRect.html#ad52d66e844d848d0e95f744b697e7beb',1,'Rect']]], + ['renderer_284',['Renderer',['../classRenderer.html#a8c6e15f666cb188a936004add75e6c6b',1,'Renderer::Renderer(const Renderer &)=delete'],['../classRenderer.html#a7ebf46f54dab9905f79b80f7fddb76a6',1,'Renderer::Renderer()']]] +]; diff --git a/docs/html/search/functions_b.html b/docs/search/functions_b.html similarity index 100% rename from docs/html/search/functions_b.html rename to docs/search/functions_b.html diff --git a/docs/search/functions_b.js b/docs/search/functions_b.js new file mode 100644 index 00000000..8737a391 --- /dev/null +++ b/docs/search/functions_b.js @@ -0,0 +1,22 @@ +var searchData= +[ + ['setanchor_285',['setAnchor',['../classText.html#aa503905beb9dddf11c9c579424d0a84f',1,'Text']]], + ['setcontent_286',['setContent',['../classText.html#a12e8ae19a8e677eb6f1c2dc2716dcab0',1,'Text']]], + ['setdirection_287',['setDirection',['../classLine.html#ab46a879365e623e8b360c2db54d76782',1,'Line']]], + ['setfillcolor_288',['setFillColor',['../classSVGElement.html#abf7eef6d09fedba0d0f50a0f1a4be2fb',1,'SVGElement']]], + ['setfillrule_289',['setFillRule',['../classPath.html#ad2ba583a2dd567c3295ea62817b541e9',1,'Path::setFillRule()'],['../classPolyShape.html#a0c918fe8d9df68573a1c0d6e18bc6c9a',1,'PolyShape::setFillRule()']]], + ['setfontsize_290',['setFontSize',['../classText.html#a6a04680d93c625645278b1d1111420bb',1,'Text']]], + ['setfontstyle_291',['setFontStyle',['../classText.html#a4f24f78f8a962e758b70c5d9fd85b7cb',1,'Text']]], + ['setgradient_292',['setGradient',['../classSVGElement.html#a312b6aa934488672585c7e9d858300f8',1,'SVGElement']]], + ['setheight_293',['setHeight',['../classRect.html#a964a6107f787f612798bda5c0423fb5b',1,'Rect']]], + ['setoutlinecolor_294',['setOutlineColor',['../classSVGElement.html#ac0cc2f6d2e01d364a695bebaa7db18d2',1,'SVGElement']]], + ['setoutlinethickness_295',['setOutlineThickness',['../classSVGElement.html#a88653ebe8b92ec881ab436ea968375a8',1,'SVGElement']]], + ['setparent_296',['setParent',['../classSVGElement.html#a43b3bf06fae88a1634a189272088d11d',1,'SVGElement']]], + ['setposition_297',['setPosition',['../classSVGElement.html#a77aefe4b7e9dbf180cc531c969d0116d',1,'SVGElement::setPosition(float x, float y)'],['../classSVGElement.html#aec8a2f582f21a559c05d791e017efbd5',1,'SVGElement::setPosition(const Vector2Df &position)']]], + ['setradius_298',['setRadius',['../classEll.html#a9f67131ba02c02fccf42c52f5f04525e',1,'Ell::setRadius()'],['../classRect.html#a28b51c4f99cfa0208a2a5cef350c2a5e',1,'Rect::setRadius()']]], + ['settransforms_299',['setTransforms',['../classGradient.html#ae2afa93bd9b6759f5fe625065301d3d9',1,'Gradient::setTransforms()'],['../classSVGElement.html#a00fef2ebc5df4838b3f9bd7111b117c5',1,'SVGElement::setTransforms()']]], + ['setunits_300',['setUnits',['../classGradient.html#a61dd624d452ab2afe913414158888165',1,'Gradient']]], + ['setwidth_301',['setWidth',['../classRect.html#ae11a39d12f7a766f773e662b0830848d',1,'Rect']]], + ['stop_302',['Stop',['../classStop.html#a3ad6054f4ecb97b3fc68595b744f8d54',1,'Stop']]], + ['svgelement_303',['SVGElement',['../classSVGElement.html#ad30205005009d2ba4820d3ce372e81ea',1,'SVGElement::SVGElement()'],['../classSVGElement.html#a1a43e7717c20d50fd1990b592499fdba',1,'SVGElement::SVGElement(const mColor &fill, const mColor &stroke, float stroke_width)'],['../classSVGElement.html#a6ed48bcc78dd62e3da256ddbd103ccd1',1,'SVGElement::SVGElement(const mColor &fill, const mColor &stroke, float stroke_width, const Vector2Df &position)']]] +]; diff --git a/docs/html/search/functions_c.html b/docs/search/functions_c.html similarity index 100% rename from docs/html/search/functions_c.html rename to docs/search/functions_c.html diff --git a/docs/search/functions_c.js b/docs/search/functions_c.js new file mode 100644 index 00000000..a5b8ba7c --- /dev/null +++ b/docs/search/functions_c.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['text_304',['Text',['../classText.html#a92c5df61031c3a9af813f9cc6978f34a',1,'Text']]] +]; diff --git a/docs/html/search/functions_d.html b/docs/search/functions_d.html similarity index 100% rename from docs/html/search/functions_d.html rename to docs/search/functions_d.html diff --git a/docs/html/search/functions_d.js b/docs/search/functions_d.js similarity index 77% rename from docs/html/search/functions_d.js rename to docs/search/functions_d.js index 24518393..aab9efdf 100644 --- a/docs/html/search/functions_d.js +++ b/docs/search/functions_d.js @@ -1,5 +1,5 @@ var searchData= [ - ['vector2d_245',['Vector2D',['../classVector2D.html#a96580267fed7cd6686cbbf8e11048023',1,'Vector2D::Vector2D()'],['../classVector2D.html#a4f1bca1b63cd8b1323c85c9a5c597df4',1,'Vector2D::Vector2D(T X, T Y)'],['../classVector2D.html#af9cb4a6f06903844162f4c9d80d16b85',1,'Vector2D::Vector2D(const Vector2D< U > &vector)']]], - ['viewer_246',['Viewer',['../classViewer.html#aaedebacb31cba87de6e7d448ed8d6586',1,'Viewer::Viewer()'],['../classViewer.html#abb8e49e83e5c574411bb9995665fd7eb',1,'Viewer::Viewer(const Viewer &)=delete']]] + ['vector2d_305',['Vector2D',['../classVector2D.html#a96580267fed7cd6686cbbf8e11048023',1,'Vector2D::Vector2D()'],['../classVector2D.html#a4f1bca1b63cd8b1323c85c9a5c597df4',1,'Vector2D::Vector2D(T X, T Y)'],['../classVector2D.html#af9cb4a6f06903844162f4c9d80d16b85',1,'Vector2D::Vector2D(const Vector2D< U > &vector)']]], + ['viewer_306',['Viewer',['../classViewer.html#aaedebacb31cba87de6e7d448ed8d6586',1,'Viewer::Viewer()'],['../classViewer.html#abb8e49e83e5c574411bb9995665fd7eb',1,'Viewer::Viewer(const Viewer &)=delete']]] ]; diff --git a/docs/html/search/functions_e.html b/docs/search/functions_e.html similarity index 100% rename from docs/html/search/functions_e.html rename to docs/search/functions_e.html diff --git a/docs/search/functions_e.js b/docs/search/functions_e.js new file mode 100644 index 00000000..779e29cf --- /dev/null +++ b/docs/search/functions_e.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['_7egradient_307',['~Gradient',['../classGradient.html#a9332299756c51c99398ce09e584a8b42',1,'Gradient']]], + ['_7egroup_308',['~Group',['../classGroup.html#aed00a22ff227ee2657ae44a5cbcedf7c',1,'Group']]], + ['_7eparser_309',['~Parser',['../classParser.html#a3e658b5917a93a3ef648050d060e3a93',1,'Parser']]], + ['_7esvgelement_310',['~SVGElement',['../classSVGElement.html#a5087280fd4bbb637c3cde64e44e974f1',1,'SVGElement']]], + ['_7eviewer_311',['~Viewer',['../classViewer.html#a324e5a6a1532fe5eac3f3b0e4792b2da',1,'Viewer']]] +]; diff --git a/docs/html/search/functions_f.html b/docs/search/functions_f.html similarity index 100% rename from docs/html/search/functions_f.html rename to docs/search/functions_f.html diff --git a/docs/html/search/functions_f.js b/docs/search/functions_f.js similarity index 100% rename from docs/html/search/functions_f.js rename to docs/search/functions_f.js diff --git a/docs/html/search/mag_sel.svg b/docs/search/mag_sel.svg similarity index 100% rename from docs/html/search/mag_sel.svg rename to docs/search/mag_sel.svg diff --git a/docs/html/search/nomatches.html b/docs/search/nomatches.html similarity index 100% rename from docs/html/search/nomatches.html rename to docs/search/nomatches.html diff --git a/docs/html/search/related_0.html b/docs/search/related_0.html similarity index 100% rename from docs/html/search/related_0.html rename to docs/search/related_0.html diff --git a/docs/html/search/related_0.js b/docs/search/related_0.js similarity index 52% rename from docs/html/search/related_0.js rename to docs/search/related_0.js index d7c1c8ab..519f4122 100644 --- a/docs/html/search/related_0.js +++ b/docs/search/related_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['operator_3c_3c_292',['operator<<',['../classmColor.html#a1887c93301ffe92701baf17d6af3418e',1,'mColor']]] + ['operator_3c_3c_363',['operator<<',['../classmColor.html#a1887c93301ffe92701baf17d6af3418e',1,'mColor']]] ]; diff --git a/docs/html/search/search.css b/docs/search/search.css similarity index 100% rename from docs/html/search/search.css rename to docs/search/search.css diff --git a/docs/html/search/search.js b/docs/search/search.js similarity index 100% rename from docs/html/search/search.js rename to docs/search/search.js diff --git a/docs/html/search/search_l.png b/docs/search/search_l.png similarity index 100% rename from docs/html/search/search_l.png rename to docs/search/search_l.png diff --git a/docs/html/search/search_m.png b/docs/search/search_m.png similarity index 100% rename from docs/html/search/search_m.png rename to docs/search/search_m.png diff --git a/docs/html/search/search_r.png b/docs/search/search_r.png similarity index 100% rename from docs/html/search/search_r.png rename to docs/search/search_r.png diff --git a/docs/html/search/searchdata.js b/docs/search/searchdata.js similarity index 82% rename from docs/html/search/searchdata.js rename to docs/search/searchdata.js index 4127796b..cb0b4877 100644 --- a/docs/html/search/searchdata.js +++ b/docs/search/searchdata.js @@ -1,9 +1,9 @@ var indexSectionsWithContent = { - 0: "abcdefghilmnoprstvwxyz~", + 0: "abcdefghilmnoprstuvwxyz~", 1: "ceglmprstv", 2: "acdeghlmoprstv~", - 3: "abcdfghilmnoprstwxyz", + 3: "abcdfghilmnoprstuvwxyz", 4: "o" }; diff --git a/docs/html/search/variables_0.html b/docs/search/variables_0.html similarity index 100% rename from docs/html/search/variables_0.html rename to docs/search/variables_0.html diff --git a/docs/search/variables_0.js b/docs/search/variables_0.js new file mode 100644 index 00000000..cd2b06c2 --- /dev/null +++ b/docs/search/variables_0.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['a_312',['a',['../classmColor.html#ac086aa72806b8ce55fed3df9ba976f6c',1,'mColor']]], + ['anchor_313',['anchor',['../classText.html#a33f5c94508241a960c139923c284491e',1,'Text']]], + ['attributes_314',['attributes',['../classGroup.html#a9308f587c63720ccbe2bfd1bad868547',1,'Group']]] +]; diff --git a/docs/html/search/variables_1.html b/docs/search/variables_1.html similarity index 100% rename from docs/html/search/variables_1.html rename to docs/search/variables_1.html diff --git a/docs/search/variables_1.js b/docs/search/variables_1.js new file mode 100644 index 00000000..9071da0d --- /dev/null +++ b/docs/search/variables_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['b_315',['b',['../classmColor.html#ad56f2424fa451364becdc4d1c4df657c',1,'mColor']]], + ['black_316',['Black',['../classmColor.html#aa3910d2b82d32c8aa4e50127874a6d03',1,'mColor']]], + ['blue_317',['Blue',['../classmColor.html#a59dc727125e9f3d4ed0c59433dfa0780',1,'mColor']]] +]; diff --git a/docs/html/search/variables_10.html b/docs/search/variables_10.html similarity index 100% rename from docs/html/search/variables_10.html rename to docs/search/variables_10.html diff --git a/docs/search/variables_10.js b/docs/search/variables_10.js new file mode 100644 index 00000000..a30cd44d --- /dev/null +++ b/docs/search/variables_10.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['units_353',['units',['../classGradient.html#a592dda454dc4df897263212191d6e3cb',1,'Gradient']]] +]; diff --git a/docs/html/search/variables_11.html b/docs/search/variables_11.html similarity index 100% rename from docs/html/search/variables_11.html rename to docs/search/variables_11.html diff --git a/docs/search/variables_11.js b/docs/search/variables_11.js new file mode 100644 index 00000000..ac4e26dc --- /dev/null +++ b/docs/search/variables_11.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['viewbox_354',['viewbox',['../classParser.html#a7eb24f4915ba9b7a652ca204c1edb2c7',1,'Parser']]], + ['viewport_355',['viewport',['../classParser.html#a2872aff3bfb15fdb1df2dcdce2bd632a',1,'Parser']]] +]; diff --git a/docs/html/search/variables_12.html b/docs/search/variables_12.html similarity index 100% rename from docs/html/search/variables_12.html rename to docs/search/variables_12.html diff --git a/docs/search/variables_12.js b/docs/search/variables_12.js new file mode 100644 index 00000000..c7887d10 --- /dev/null +++ b/docs/search/variables_12.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['white_356',['White',['../classmColor.html#a73b9b91ca8c79e6e3876e5d83980ebec',1,'mColor']]], + ['width_357',['width',['../classRect.html#a800053c390ccb818add47e627e535a5e',1,'Rect']]], + ['window_5fsize_358',['window_size',['../classViewer.html#aa172f661daf24807148fb697f10e750a',1,'Viewer']]] +]; diff --git a/docs/html/search/variables_13.html b/docs/search/variables_13.html similarity index 100% rename from docs/html/search/variables_13.html rename to docs/search/variables_13.html diff --git a/docs/search/variables_13.js b/docs/search/variables_13.js new file mode 100644 index 00000000..52b10613 --- /dev/null +++ b/docs/search/variables_13.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['x_359',['x',['../classVector2D.html#a65e391ec61c185092a02cf6301d0fff7',1,'Vector2D']]] +]; diff --git a/docs/search/variables_14.html b/docs/search/variables_14.html new file mode 100644 index 00000000..ab9e0fa9 --- /dev/null +++ b/docs/search/variables_14.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
                                                          +
                                                          Loading...
                                                          +
                                                          + +
                                                          Searching...
                                                          +
                                                          No Matches
                                                          + +
                                                          + + diff --git a/docs/search/variables_14.js b/docs/search/variables_14.js new file mode 100644 index 00000000..e9c59ddc --- /dev/null +++ b/docs/search/variables_14.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['y_360',['y',['../classVector2D.html#a6a91fccbbd37162d28fa54aeeb88f9d2',1,'Vector2D']]], + ['yellow_361',['Yellow',['../classmColor.html#a68265f053324eea11265c7f8d7fdb5ff',1,'mColor']]] +]; diff --git a/docs/search/variables_15.html b/docs/search/variables_15.html new file mode 100644 index 00000000..45b78e3d --- /dev/null +++ b/docs/search/variables_15.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
                                                          +
                                                          Loading...
                                                          +
                                                          + +
                                                          Searching...
                                                          +
                                                          No Matches
                                                          + +
                                                          + + diff --git a/docs/html/search/all_15.js b/docs/search/variables_15.js similarity index 50% rename from docs/html/search/all_15.js rename to docs/search/variables_15.js index 5f48e99b..d2dffecc 100644 --- a/docs/html/search/all_15.js +++ b/docs/search/variables_15.js @@ -1,4 +1,4 @@ var searchData= [ - ['zoom_5ffactor_135',['zoom_factor',['../classViewer.html#a46377febc22fd7f2cc38a73ddb66b8ad',1,'Viewer']]] + ['zoom_5ffactor_362',['zoom_factor',['../classViewer.html#a46377febc22fd7f2cc38a73ddb66b8ad',1,'Viewer']]] ]; diff --git a/docs/html/search/variables_2.html b/docs/search/variables_2.html similarity index 100% rename from docs/html/search/variables_2.html rename to docs/search/variables_2.html diff --git a/docs/search/variables_2.js b/docs/search/variables_2.js new file mode 100644 index 00000000..2c321170 --- /dev/null +++ b/docs/search/variables_2.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['color_318',['color',['../classStop.html#afb57d3535781a9e40efff24c43520a21',1,'Stop']]], + ['content_319',['content',['../classText.html#a9336f13d0d4a26d41c2fd2e103ac5dde',1,'Text']]], + ['cyan_320',['Cyan',['../classmColor.html#a04a0d2485c1106ccc94d065a0e62ecfb',1,'mColor']]] +]; diff --git a/docs/html/search/variables_3.html b/docs/search/variables_3.html similarity index 100% rename from docs/html/search/variables_3.html rename to docs/search/variables_3.html diff --git a/docs/search/variables_3.js b/docs/search/variables_3.js new file mode 100644 index 00000000..c5b0a55d --- /dev/null +++ b/docs/search/variables_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['direction_321',['direction',['../classLine.html#a3fe45077492213ef490739c6137200d1',1,'Line']]] +]; diff --git a/docs/html/search/variables_4.html b/docs/search/variables_4.html similarity index 100% rename from docs/html/search/variables_4.html rename to docs/search/variables_4.html diff --git a/docs/search/variables_4.js b/docs/search/variables_4.js new file mode 100644 index 00000000..8baae654 --- /dev/null +++ b/docs/search/variables_4.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['fill_322',['fill',['../classSVGElement.html#a6d3a39e763d3273715ea11f8959f81b1',1,'SVGElement']]], + ['fill_5frule_323',['fill_rule',['../classPath.html#ac5abd8d5994a75cca56205c7e55a5b4f',1,'Path::fill_rule()'],['../classPolyShape.html#abd758b76bbc30e790602b1f37a814fe1',1,'PolyShape::fill_rule()']]], + ['font_5fsize_324',['font_size',['../classText.html#a71158226b190f16477820e45b549133f',1,'Text']]] +]; diff --git a/docs/html/search/variables_5.html b/docs/search/variables_5.html similarity index 100% rename from docs/html/search/variables_5.html rename to docs/search/variables_5.html diff --git a/docs/search/variables_5.js b/docs/search/variables_5.js new file mode 100644 index 00000000..b2f86e4f --- /dev/null +++ b/docs/search/variables_5.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['g_325',['g',['../classmColor.html#a0cd1254821d108bb8c5be8ec5536f8ec',1,'mColor']]], + ['gradient_326',['gradient',['../classSVGElement.html#aab61149df9916892540627a0d7c4480c',1,'SVGElement']]], + ['gradients_327',['gradients',['../classParser.html#a7f085da78317baf2cc61e6e92b4b29c8',1,'Parser']]], + ['green_328',['Green',['../classmColor.html#aa69dc1cb58cec64672952d1e84744f8c',1,'mColor']]] +]; diff --git a/docs/html/search/variables_6.html b/docs/search/variables_6.html similarity index 100% rename from docs/html/search/variables_6.html rename to docs/search/variables_6.html diff --git a/docs/search/variables_6.js b/docs/search/variables_6.js new file mode 100644 index 00000000..a6fbe3a6 --- /dev/null +++ b/docs/search/variables_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['height_329',['height',['../classRect.html#a31428cce67b56b6daf168131c7dbe1e8',1,'Rect']]] +]; diff --git a/docs/html/search/variables_7.html b/docs/search/variables_7.html similarity index 100% rename from docs/html/search/variables_7.html rename to docs/search/variables_7.html diff --git a/docs/html/search/variables_7.js b/docs/search/variables_7.js similarity index 68% rename from docs/html/search/variables_7.js rename to docs/search/variables_7.js index 75c69c57..61c65111 100644 --- a/docs/html/search/variables_7.js +++ b/docs/search/variables_7.js @@ -1,5 +1,5 @@ var searchData= [ - ['instance_265',['instance',['../classParser.html#ae3a28c02c18171f4e83fae54b9f21a90',1,'Parser::instance()'],['../classRenderer.html#a7431a2f9b03f35752e034410ffebfbe1',1,'Renderer::instance()'],['../classViewer.html#a53c3dca921442983d13f335d0e8a7e20',1,'Viewer::instance()']]], - ['is_5fdragging_266',['is_dragging',['../classViewer.html#a452e9dd05638bf3da01d8f51dba009a5',1,'Viewer']]] + ['instance_330',['instance',['../classParser.html#ae3a28c02c18171f4e83fae54b9f21a90',1,'Parser::instance()'],['../classRenderer.html#a7431a2f9b03f35752e034410ffebfbe1',1,'Renderer::instance()'],['../classViewer.html#a53c3dca921442983d13f335d0e8a7e20',1,'Viewer::instance()']]], + ['is_5fdragging_331',['is_dragging',['../classViewer.html#a452e9dd05638bf3da01d8f51dba009a5',1,'Viewer']]] ]; diff --git a/docs/html/search/variables_8.html b/docs/search/variables_8.html similarity index 100% rename from docs/html/search/variables_8.html rename to docs/search/variables_8.html diff --git a/docs/html/search/variables_8.js b/docs/search/variables_8.js similarity index 53% rename from docs/html/search/variables_8.js rename to docs/search/variables_8.js index 6927fd6d..20359b6d 100644 --- a/docs/html/search/variables_8.js +++ b/docs/search/variables_8.js @@ -1,4 +1,4 @@ var searchData= [ - ['last_5fmouse_5fpos_267',['last_mouse_pos',['../classViewer.html#a77bc329e7ae0aecaf60a4de4f8dcc037',1,'Viewer']]] + ['last_5fmouse_5fpos_332',['last_mouse_pos',['../classViewer.html#a77bc329e7ae0aecaf60a4de4f8dcc037',1,'Viewer']]] ]; diff --git a/docs/html/search/variables_9.html b/docs/search/variables_9.html similarity index 100% rename from docs/html/search/variables_9.html rename to docs/search/variables_9.html diff --git a/docs/search/variables_9.js b/docs/search/variables_9.js new file mode 100644 index 00000000..0815550e --- /dev/null +++ b/docs/search/variables_9.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['magenta_333',['Magenta',['../classmColor.html#a777df695011fdb21f6b5d3e6745389c4',1,'mColor']]] +]; diff --git a/docs/html/search/variables_a.html b/docs/search/variables_a.html similarity index 100% rename from docs/html/search/variables_a.html rename to docs/search/variables_a.html diff --git a/docs/html/search/variables_a.js b/docs/search/variables_a.js similarity index 52% rename from docs/html/search/variables_a.js rename to docs/search/variables_a.js index 920ef9bc..f25f5d7f 100644 --- a/docs/html/search/variables_a.js +++ b/docs/search/variables_a.js @@ -1,4 +1,4 @@ var searchData= [ - ['needs_5frepaint_269',['needs_repaint',['../classViewer.html#a59a507a835919e78114601d5bd1784e6',1,'Viewer']]] + ['needs_5frepaint_334',['needs_repaint',['../classViewer.html#a59a507a835919e78114601d5bd1784e6',1,'Viewer']]] ]; diff --git a/docs/html/search/variables_b.html b/docs/search/variables_b.html similarity index 100% rename from docs/html/search/variables_b.html rename to docs/search/variables_b.html diff --git a/docs/search/variables_b.js b/docs/search/variables_b.js new file mode 100644 index 00000000..57ba003b --- /dev/null +++ b/docs/search/variables_b.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['offset_335',['offset',['../classStop.html#a2b6aaf0f14507df64c6bbd99043ad44b',1,'Stop']]], + ['offset_5fx_336',['offset_x',['../classViewer.html#a3e16ebbf5c0ed98dc75fe2c4d46fe0d5',1,'Viewer']]], + ['offset_5fy_337',['offset_y',['../classViewer.html#a30b0f57907c82de620339e105f9a3c5b',1,'Viewer']]] +]; diff --git a/docs/html/search/variables_c.html b/docs/search/variables_c.html similarity index 100% rename from docs/html/search/variables_c.html rename to docs/search/variables_c.html diff --git a/docs/search/variables_c.js b/docs/search/variables_c.js new file mode 100644 index 00000000..fe7d50a3 --- /dev/null +++ b/docs/search/variables_c.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['parent_338',['parent',['../classSVGElement.html#adee748c3014de1c1ebd20411a52e824a',1,'SVGElement']]], + ['points_339',['points',['../classGradient.html#a8da859d1b12459800e763c31f18d0d41',1,'Gradient::points()'],['../classPath.html#a1880b844baafdeca91a7cf5d155cf9f1',1,'Path::points()'],['../classPolyShape.html#acbd1d536ad25e34b160e849a0fc12697',1,'PolyShape::points()']]], + ['position_340',['position',['../classSVGElement.html#acf9b9906b6d0cba8bb5c0b38b032e40f',1,'SVGElement']]] +]; diff --git a/docs/html/search/variables_d.html b/docs/search/variables_d.html similarity index 100% rename from docs/html/search/variables_d.html rename to docs/search/variables_d.html diff --git a/docs/search/variables_d.js b/docs/search/variables_d.js new file mode 100644 index 00000000..abd2a608 --- /dev/null +++ b/docs/search/variables_d.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['r_341',['r',['../classmColor.html#a427453d377b30c62f7d25f47120959d6',1,'mColor']]], + ['radius_342',['radius',['../classEll.html#af57a48abe0e2bc8806e73dfa7762388f',1,'Ell::radius()'],['../classRadialGradient.html#abad9345ee5091075d8fc1b7a3511dbd7',1,'RadialGradient::radius()'],['../classRect.html#a7857e3568d2a2a35bf0c6b28028005b5',1,'Rect::radius()']]], + ['red_343',['Red',['../classmColor.html#aa0fc6fe3033f7ff2806c59e39c072dbc',1,'mColor']]], + ['root_344',['root',['../classParser.html#a13a5e2fdac62670c1584de1edbba77f2',1,'Parser']]], + ['rotate_5fangle_345',['rotate_angle',['../classViewer.html#a82dfd34668f986b72e51ee86d4029fc6',1,'Viewer']]] +]; diff --git a/docs/html/search/variables_e.html b/docs/search/variables_e.html similarity index 100% rename from docs/html/search/variables_e.html rename to docs/search/variables_e.html diff --git a/docs/search/variables_e.js b/docs/search/variables_e.js new file mode 100644 index 00000000..5b17d499 --- /dev/null +++ b/docs/search/variables_e.js @@ -0,0 +1,8 @@ +var searchData= +[ + ['shapes_346',['shapes',['../classGroup.html#a6ff10d6fceb2a78103db2d9783de6f41',1,'Group']]], + ['stops_347',['stops',['../classGradient.html#a7831fa94135c818481ef7c85f792e1ca',1,'Gradient']]], + ['stroke_348',['stroke',['../classSVGElement.html#aab937dcb566cd83d94d00d69b4083f13',1,'SVGElement']]], + ['stroke_5fwidth_349',['stroke_width',['../classSVGElement.html#a88449b487a890e3765ae20e96ee95c06',1,'SVGElement']]], + ['style_350',['style',['../classText.html#a12ee81ccf865a414867d4101c8dbbdb2',1,'Text']]] +]; diff --git a/docs/html/search/variables_f.html b/docs/search/variables_f.html similarity index 100% rename from docs/html/search/variables_f.html rename to docs/search/variables_f.html diff --git a/docs/search/variables_f.js b/docs/search/variables_f.js new file mode 100644 index 00000000..35c4cad6 --- /dev/null +++ b/docs/search/variables_f.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['transforms_351',['transforms',['../classGradient.html#a1387db53f850dd8cc765fc837c6e97e8',1,'Gradient::transforms()'],['../classSVGElement.html#aefeee5c1de3e802d9f5f0a54078170e6',1,'SVGElement::transforms()']]], + ['transparent_352',['Transparent',['../classmColor.html#ac4f0afaa513bbe9e68c16156136d4ada',1,'mColor']]] +]; diff --git a/docs/html/splitbar.png b/docs/splitbar.png similarity index 100% rename from docs/html/splitbar.png rename to docs/splitbar.png diff --git a/docs/html/structPathPoint-members.html b/docs/structPathPoint-members.html similarity index 83% rename from docs/html/structPathPoint-members.html rename to docs/structPathPoint-members.html index cbea2178..07568558 100644 --- a/docs/html/structPathPoint-members.html +++ b/docs/structPathPoint-members.html @@ -60,7 +60,7 @@
                                                          svg-reader -  0.2 +  0.3
                                                          Parse and render SVG files, handle user interactions.
                                                          @@ -124,8 +124,12 @@

                                                          This is the complete list of members for PathPoint, including all inherited members.

                                                          - - + + + + + +
                                                          Point (defined in PathPoint)PathPoint
                                                          TC (defined in PathPoint)PathPoint
                                                          large_arc_flag (defined in PathPoint)PathPoint
                                                          point (defined in PathPoint)PathPoint
                                                          radius (defined in PathPoint)PathPoint
                                                          sweep_flag (defined in PathPoint)PathPoint
                                                          tc (defined in PathPoint)PathPoint
                                                          x_axis_rotation (defined in PathPoint)PathPoint