73 lines
1.1 KiB
C++
73 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "SvgShapeElement.h"
|
|
#include "Point.h"
|
|
|
|
#include "XmlAttribute.h"
|
|
|
|
class SvgCircle : public SvgShapeElement
|
|
{
|
|
public:
|
|
enum class Type
|
|
{
|
|
REGULAR,
|
|
ELLIPSE
|
|
};
|
|
|
|
SvgCircle(Type type = Type::REGULAR);
|
|
|
|
Point getLocation() const;
|
|
|
|
double getRadius() const;
|
|
|
|
Type getType() const;
|
|
|
|
double getMinorRadius() const;
|
|
|
|
void setLocation(const Point& loc);
|
|
|
|
void setRadius(double rad);
|
|
|
|
void setMinorRadius(double rad);
|
|
private:
|
|
Type mType{ Type::REGULAR };
|
|
};
|
|
|
|
class SvgRectangle : public SvgShapeElement
|
|
{
|
|
public:
|
|
SvgRectangle();
|
|
|
|
void setLocation(const Point& loc);
|
|
|
|
void setWidth(double width);
|
|
|
|
void setHeight(double height);
|
|
|
|
void setRadius(double radius);
|
|
};
|
|
|
|
class SvgPolygon : public SvgShapeElement
|
|
{
|
|
public:
|
|
SvgPolygon();
|
|
|
|
void setPoints(const std::vector<Point>& loc);
|
|
};
|
|
|
|
class SvgPolyline : public SvgShapeElement
|
|
{
|
|
public:
|
|
SvgPolyline();
|
|
|
|
void setPoints(const std::vector<Point>& loc);
|
|
};
|
|
|
|
class SvgPath : public SvgShapeElement
|
|
{
|
|
public:
|
|
SvgPath();
|
|
|
|
void setPath(const std::string& mPath);
|
|
void setFillRule(const std::string& fillRule);
|
|
};
|