Go to the documentation of this file.
45 #define M_PI 3.14159265358979323846
49 #define M_PI_2 1.57079632679489661923
56 struct ConstShapeVisitor;
57 struct CompositeShapeTransform;
80 virtual const std::string &
name()
const;
95 virtual Point center(LineWidthFlag lineWidthFlag = IgnoreLineWidth)
const;
154 Shape &
moveCenter(
double x,
double y, LineWidthFlag lineWidthFlag = IgnoreLineWidth);
174 virtual Shape &
scale(
double sx,
double sy) = 0;
194 Shape &
resize(
double width,
double height, LineWidthFlag lineWidthFlag);
228 inline Rect bbox(LineWidthFlag)
const;
236 virtual void scaleAll(
double s) = 0;
255 virtual void flushFIG(std::ostream & stream,
const TransformFIG & transform, std::map<Color, int> & colormap)
const = 0;
318 static const std::string _name;
Shape & rotateDeg(double angle, const Point ¢er)
Definition: Shape.h:336
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...
The Point structure. @copyright This source code is part of the Board project, a C++ library whose pu...
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...
Shape & scaleToWidth(double w, LineWidthFlag lineWidthFlag)
Definition: Shape.cpp:85
Shape & scaleToHeight(double h, LineWidthFlag lineWidthFlag)
Definition: Shape.cpp:92
Shape()
Definition: Shape.h:329
Struct representing a rectangle on the plane.
Definition: Rect.h:39
The Point structure. @copyright This source code is part of the Board project, a C++ library whose pu...
virtual Rect boundingBox(LineWidthFlag) const =0
virtual Shape & scale(double sx, double sy)=0
virtual void accept(ShapeVisitor &visitor)
Accepts a visitor object.
Definition: Shape.cpp:99
Struct representing a 2D point.
Definition: Point.h:42
Shape & moveCenter(double x, double y, LineWidthFlag lineWidthFlag=IgnoreLineWidth)
Definition: Shape.cpp:64
Rect bbox(LineWidthFlag) const
Definition: Shape.h:331
Abstract structure for a 2D shape.
Definition: Shape.h:63
virtual void flushTikZ(std::ostream &stream, const TransformTikZ &transform) const =0
virtual void flushFIG(std::ostream &stream, const TransformFIG &transform, std::map< Color, int > &colormap) const =0
A ConstShapeVisitor may visit const shapes of a composite shape tree in back-to-front order.
Definition: ShapeVisitor.h:78
virtual void flushSVG(std::ostream &stream, const TransformSVG &transform) const =0
virtual ~Shape()
Definition: Shape.cpp:52
virtual Shape * clone() const =0
Shape & resize(double width, double height, LineWidthFlag lineWidthFlag)
Definition: Shape.cpp:78
virtual Point center(LineWidthFlag lineWidthFlag=IgnoreLineWidth) const
Definition: Shape.cpp:59
virtual Shape & translate(double dx, double dy)=0
virtual const std::string & name() const
Definition: Shape.cpp:54
virtual Shape & rotate(double angle, const Point ¢er)=0
The Color structure. @copyright This source code is part of the Board project, a C++ library whose pu...
virtual void scaleAll(double s)=0
@copyright This source code is part of the Board project, a C++ library whose purpose is to allow sim...
virtual void flushPostscript(std::ostream &stream, const TransformEPS &transform) const =0
A ShapeVisitor visits all shapes in a composite shape tree in back-to-front order.
Definition: ShapeVisitor.h:53