Board 0.9.6
|
Abstract structure for a 2D shape. More...
#include <ShapeWithStyle.h>
Public Member Functions | |
ShapeWithStyle (Color penColor, Color fillColor, double lineWidth, LineStyle style, const LineCap cap, const LineJoin join) | |
ShapeWithStyle (const Style &style) | |
ShapeWithStyle (const ShapeWithStyle &other) | |
ShapeWithStyle & | operator= (const ShapeWithStyle &other) |
~ShapeWithStyle () | |
const std::string & | name () const |
Shape * | clone () const =0 |
const Color & | penColor () const |
ShapeWithStyle & | setPenColor (const Color &) |
const Color & | fillColor () const |
ShapeWithStyle & | setFillColor (const Color &) |
double | lineWidth () const |
ShapeWithStyle & | setLineWidth (double) |
LineStyle | lineStyle () const |
ShapeWithStyle & | setLineStyle (LineStyle) |
LineCap | lineCap () const |
ShapeWithStyle & | setLineCap (LineCap) |
LineJoin | lineJoin () const |
ShapeWithStyle & | setLineJoin (LineJoin) |
Style | style () const |
ShapeWithStyle & | setStyle (const Style &) |
bool | filled () const |
Public Member Functions inherited from LibBoard::Shape | |
Shape () | |
virtual | ~Shape () |
virtual const std::string & | name () const |
virtual Shape * | clone () const =0 |
virtual Point | center (LineWidthFlag lineWidthFlag=IgnoreLineWidth) const |
virtual Shape & | rotate (double angle, const Point ¢er)=0 |
virtual Shape & | rotate (double angle)=0 |
Shape & | rotateDeg (double angle, const Point ¢er) |
Shape & | rotateDeg (double angle) |
virtual Shape & | translate (double dx, double dy)=0 |
Shape & | moveCenter (double x, double y, LineWidthFlag lineWidthFlag=IgnoreLineWidth) |
Shape & | moveCenter (Point p, LineWidthFlag lineWidthFlag=IgnoreLineWidth) |
virtual Shape & | scale (double sx, double sy)=0 |
virtual Shape & | scale (double s)=0 |
Shape & | resize (double width, double height, LineWidthFlag lineWidthFlag) |
Shape & | scaleToWidth (double w, LineWidthFlag lineWidthFlag) |
Shape & | scaleToHeight (double h, LineWidthFlag lineWidthFlag) |
virtual Rect | boundingBox (LineWidthFlag) const =0 |
Rect | bbox (LineWidthFlag) const |
virtual void | scaleAll (double s)=0 |
virtual void | flushPostscript (std::ostream &stream, const TransformEPS &transform) const =0 |
virtual void | flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< Color, int > &colormap) const =0 |
virtual void | flushSVG (std::ostream &stream, const TransformSVG &transform) const =0 |
virtual void | flushTikZ (std::ostream &stream, const TransformTikZ &transform) const =0 |
virtual void | accept (ShapeVisitor &visitor) |
Accepts a visitor object. | |
virtual void | accept (const ShapeVisitor &visitor) |
Accepts a visitor object. | |
virtual void | accept (ConstShapeVisitor &visitor) const |
Accepts a const-shape visitor object. | |
virtual void | accept (const ConstShapeVisitor &visitor) const |
Accepts a const-shape visitor object. | |
virtual Shape * | accept (CompositeShapeTransform &transform) const |
Accept a composite shape transform. | |
virtual Shape * | accept (const CompositeShapeTransform &transform) const |
Accept a constant composite shape transform. | |
Shape (const Shape &other) | |
Static Public Member Functions | |
static void | setLineWidthScaling (bool) |
Protected Member Functions | |
void | updateLineWidth (double s) |
Protected Attributes | |
Style | _style |
Abstract structure for a 2D shape.
ShapeWithStyle structure.
|
inline |
ShapeWithStyle constructor.
penColor | The pen color of the shape. |
fillColor | The fill color of the shape. |
lineWidth | The line thickness. |
style | The line style. |
cap | The line cap style. |
join | The line join style. |
|
inline |
ShapeWithStyle constructor.
style | Style properties |
LibBoard::ShapeWithStyle::ShapeWithStyle | ( | const ShapeWithStyle & | other | ) |
LibBoard::ShapeWithStyle::~ShapeWithStyle | ( | ) |
Shape destructor.
|
pure virtual |
Return a copy of the shape.
Implements LibBoard::Shape.
Implemented in LibBoard::Arrow, LibBoard::Bezier, LibBoard::Dot, LibBoard::Ellipse, LibBoard::Line, LibBoard::Polyline, LibBoard::GouraudTriangle, and LibBoard::Text.
|
inline |
References _style, and LibBoard::Style::fillColor.
Referenced by LibBoard::Arrow::Arrow(), LibBoard::Arrow::Arrow(), filled(), LibBoard::Arrow::flushFIG(), LibBoard::Ellipse::flushFIG(), LibBoard::Polyline::flushFIG(), LibBoard::Bezier::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Polyline::flushPostscript(), LibBoard::Text::flushSVG(), LibBoard::mix(), LibBoard::FillColorExtractor::visit(), LibBoard::FillColorExtractor::visit(), LibBoard::FillColorExtractor::visit(), LibBoard::FillColorExtractor::visit(), LibBoard::FillColorExtractor::visit(), and LibBoard::FillColorExtractor::visit().
|
inline |
Checks whether a shape is filled with a color or not.
References fillColor(), and LibBoard::Color::Null.
Referenced by LibBoard::Ellipse::flushFIG(), LibBoard::Polyline::flushFIG(), LibBoard::Bezier::flushPostscript(), LibBoard::Ellipse::flushPostscript(), and LibBoard::Polyline::flushPostscript().
|
inline |
References _style, and LibBoard::Style::lineCap.
Referenced by LibBoard::Arrow::boundingBox(), LibBoard::Bezier::boundingBox(), LibBoard::Line::boundingBox(), LibBoard::Polyline::boundingBox(), LibBoard::Arrow::flushFIG(), LibBoard::Dot::flushFIG(), LibBoard::Line::flushFIG(), LibBoard::Polyline::flushFIG(), and LibBoard::mix().
|
inline |
|
inline |
References _style, and LibBoard::Style::lineStyle.
Referenced by LibBoard::Arrow::flushFIG(), LibBoard::Ellipse::flushFIG(), LibBoard::Line::flushFIG(), LibBoard::Polyline::flushFIG(), and LibBoard::mix().
|
inline |
References _style, and LibBoard::Style::lineWidth.
Referenced by LibBoard::Arrow::boundingBox(), LibBoard::Bezier::boundingBox(), LibBoard::Dot::boundingBox(), LibBoard::Ellipse::boundingBox(), LibBoard::Line::boundingBox(), LibBoard::Polyline::boundingBox(), LibBoard::Arrow::extremity(), LibBoard::Arrow::flushFIG(), LibBoard::Dot::flushFIG(), LibBoard::Ellipse::flushFIG(), LibBoard::Line::flushFIG(), LibBoard::Polyline::flushFIG(), LibBoard::Bezier::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Polyline::flushPostscript(), LibBoard::RoughVisitor::map(), and LibBoard::mix().
|
virtual |
ShapeWithStyle & LibBoard::ShapeWithStyle::operator= | ( | const ShapeWithStyle & | other | ) |
References _style.
|
inline |
References _style, and LibBoard::Style::penColor.
Referenced by LibBoard::Arrow::Arrow(), LibBoard::Arrow::Arrow(), LibBoard::Arrow::flushFIG(), LibBoard::Dot::flushFIG(), LibBoard::Ellipse::flushFIG(), LibBoard::Line::flushFIG(), LibBoard::Polyline::flushFIG(), LibBoard::Text::flushFIG(), LibBoard::Arrow::flushPostscript(), LibBoard::Bezier::flushPostscript(), LibBoard::Dot::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Line::flushPostscript(), LibBoard::Polyline::flushPostscript(), LibBoard::Text::flushPostscript(), LibBoard::Text::flushSVG(), LibBoard::mix(), LibBoard::PenColorExtractor::visit(), LibBoard::PenColorExtractor::visit(), LibBoard::PenColorExtractor::visit(), LibBoard::PenColorExtractor::visit(), LibBoard::PenColorExtractor::visit(), and LibBoard::PenColorExtractor::visit().
|
inline |
References _style, and LibBoard::Style::fillColor.
Referenced by ell(), LibBoard::RoughVisitor::map(), and LibBoard::RoughVisitor::map().
|
inline |
References _style, and LibBoard::Style::lineCap.
|
inline |
References _style, and LibBoard::Style::lineJoin.
|
inline |
References _style, LibBoard::Style::lineStyle, and style().
|
inline |
References _style, and LibBoard::Style::lineWidth.
|
static |
Globally enable/disable linewidth scaling when using scale functions.
Referenced by LibBoard::Board::disableLineWidthScaling(), LibBoard::Board::enableLineWidthScaling(), and LibBoard::Board::setLineWidthScaling().
|
inline |
References _style, and LibBoard::Style::penColor.
Referenced by ell().
|
inline |
|
inline |
References _style.
Referenced by LibBoard::Arrow::Arrow(), LibBoard::Arrow::Arrow(), ell(), LibBoard::Arrow::flushPostscript(), LibBoard::Arrow::flushSVG(), LibBoard::Bezier::interpolation(), LibBoard::RoughVisitor::map(), LibBoard::RoughVisitor::map(), LibBoard::RoughVisitor::map(), LibBoard::RoughVisitor::map(), LibBoard::RoughVisitor::map(), setLineStyle(), setStyle(), LibBoard::Bezier::smoothedPolyline(), and LibBoard::Bezier::smoothedPolyline().
|
inlineprotected |
References _style, and LibBoard::Style::lineWidth.
Referenced by LibBoard::Bezier::scale(), LibBoard::Ellipse::scale(), LibBoard::Line::scale(), and LibBoard::Polyline::scale().
|
protected |
Referenced by LibBoard::Arrow::Arrow(), LibBoard::Arrow::Arrow(), LibBoard::Arrow::Arrow(), LibBoard::Arrow::Arrow(), fillColor(), LibBoard::Arrow::flushPostscript(), LibBoard::Bezier::flushPostscript(), LibBoard::Dot::flushPostscript(), LibBoard::Ellipse::flushPostscript(), LibBoard::Line::flushPostscript(), LibBoard::Polyline::flushPostscript(), LibBoard::Arrow::flushSVG(), LibBoard::Bezier::flushSVG(), LibBoard::Dot::flushSVG(), LibBoard::Ellipse::flushSVG(), LibBoard::Line::flushSVG(), LibBoard::Polyline::flushSVG(), LibBoard::Arrow::flushTikZ(), LibBoard::Ellipse::flushTikZ(), LibBoard::Line::flushTikZ(), LibBoard::Polyline::flushTikZ(), LibBoard::Text::flushTikZ(), LibBoard::GouraudTriangle::GouraudTriangle(), LibBoard::GouraudTriangle::GouraudTriangle(), lineCap(), lineJoin(), lineStyle(), lineWidth(), operator=(), penColor(), setFillColor(), setLineCap(), setLineJoin(), setLineStyle(), setLineWidth(), setPenColor(), setStyle(), style(), and updateLineWidth().