|
Board
0.9.4
|
Structure for a bitmap image shape. More...
#include <Image.h>
Public Member Functions | |
| Image (const char *filename, double left, double top, double width, double height=0.0, int depth=-1) | |
| Image (const char *filename, const Rect &rect, int depth=-1) | |
| ~Image () | |
| const std::string & | name () const |
| Image * | clone () const |
| Shape & | rotate (double angle, const Point ¢er) |
| Shape & | rotate (double angle) |
| Image | rotated (double angle) const |
| Image | rotated (double angle, const Point &) const |
| Shape & | translate (double dx, double dy) |
| Image | translated (double dx, double dy) const |
| Shape & | scale (double sx, double sy) |
| Shape & | scale (double s) |
| Image | scaled (double sx, double sy) |
| Rect | boundingBox (LineWidthFlag lineWidthFlag) const |
| void | scaleAll (double s) |
| void | flushPostscript (std::ostream &stream, const TransformEPS &transform) const |
| void | flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< Color, int > &colormap) const |
| void | flushSVG (std::ostream &stream, const TransformSVG &transform) const |
| void | flushTikZ (std::ostream &stream, const TransformTikZ &transform) const |
Public Member Functions inherited from LibBoard::Shape | |
| Shape (Color penColor, Color fillColor, double lineWidth, LineStyle style, const LineCap cap, const LineJoin join, int depth) | |
| virtual | ~Shape () |
| bool | filled () const |
| virtual Point | center (LineWidthFlag lineWidthFlag=IgnoreLineWidth) const |
| Shape & | rotateDeg (double angle, const Point ¢er) |
| Shape & | rotateDeg (double angle) |
| Shape & | moveCenter (double x, double y, LineWidthFlag lineWidthFlag=IgnoreLineWidth) |
| Shape & | moveCenter (Point p, LineWidthFlag lineWidthFlag=IgnoreLineWidth) |
| Shape & | scaleToWidth (double w, LineWidthFlag lineWidthFlag) |
| Shape & | scaleToHeight (double h, LineWidthFlag lineWidthFlag) |
| Rect | bbox (LineWidthFlag) const |
| Shape & | operator-- () |
| Shape & | operator++ () |
| int | depth () const |
| virtual void | depth (int) |
| virtual void | shiftDepth (int shift) |
| const Color & | penColor () const |
| const Color & | fillColor () const |
| virtual void | accept (ShapeVisitor &visitor) |
| Accepts a visitor object. More... | |
| virtual void | accept (const ShapeVisitor &visitor) |
| Accepts a visitor object. More... | |
Additional Inherited Members | |
Public Types inherited from LibBoard::Shape | |
| enum | LineCap { ButtCap = 0, RoundCap, SquareCap } |
| enum | LineJoin { MiterJoin = 0, RoundJoin, BevelJoin } |
| enum | LineStyle { SolidStyle = 0, DashStyle, DotStyle, DashDotStyle, DashDotDotStyle, DashDotDotDotStyle } |
| enum | LineWidthFlag { IgnoreLineWidth, UseLineWidth } |
Static Public Member Functions inherited from LibBoard::Shape | |
| static void | enableLineWidthScaling () |
| static void | disableLineWidthScaling () |
| static void | setLineWidthScaling (bool) |
| static void | setDefaultLineWidth (double) |
| static void | setDefaultPenColor (Color) |
| static void | setDefaultFillColor (Color) |
| static void | setDefaultLineStyle (Shape::LineStyle) |
| static void | setDefaultLineCap (Shape::LineCap) |
| static void | setDefaultLineJoin (Shape::LineJoin) |
| static double | defaultLineWidth () |
| defaultLineWidth More... | |
| static Color | defaultPenColor () |
| defaultPenColor More... | |
| static Color | defaultFillColor () |
| defaultFillColor More... | |
| static Shape::LineStyle | defaultLineStyle () |
| defaultLineStyle More... | |
| static Shape::LineCap | defaultLineCap () |
| defaultLineCap More... | |
| static Shape::LineJoin | defaultLineJoin () |
| defaultLineJoin More... | |
Protected Member Functions inherited from LibBoard::Shape | |
| void | updateLineWidth (double s) |
| std::string | svgProperties (const TransformSVG &transform) const |
| std::string | postscriptProperties (const TransformEPS &transform) const |
| std::string | tikzProperties (const TransformTikZ &transform) const |
Protected Attributes inherited from LibBoard::Shape | |
| int | _depth |
| Color | _penColor |
| Color | _fillColor |
| double | _lineWidth |
| LineStyle | _lineStyle |
| LineCap | _lineCap |
| LineJoin | _lineJoin |
Static Protected Attributes inherited from LibBoard::Shape | |
| static bool | _lineWidthScaling = true |
| static double | _defaultLineWidth = 1.0 |
| static Color | _defaultPenColor = Color::Black |
| static Color | _defaultFillColor = Color::Null |
| static Shape::LineStyle | _defaultLineStyle = Shape::SolidStyle |
| static Shape::LineCap | _defaultLineCap = Shape::ButtCap |
| static Shape::LineJoin | _defaultLineJoin = Shape::MiterJoin |
Structure for a bitmap image shape.
Image structure.
| LibBoard::Image::Image | ( | const char * | filename, |
| double | left, | ||
| double | top, | ||
| double | width, | ||
| double | height = 0.0, |
||
| int | depth = -1 |
||
| ) |
Construct an Image given a filename, a size and (possibly) a depth. If the height parameter is 0.0, then the correct height is computed according to the actual aspect ratio of the bitmap image, obtained from the file.
| filename | |
| left | |
| top | |
| width | |
| height | |
| depth |
Referenced by clone(), rotated(), scaled(), and translated().
| LibBoard::Image::Image | ( | const char * | filename, |
| const Rect & | rect, | ||
| int | depth = -1 |
||
| ) |
Construct an Image given a filename, a size and (possibly) a depth.
| filename | The image filename |
| rect | The position and size of the image |
| depth | The depth (default -1) |
|
inline |
Image destructor.
|
virtual |
Returns the bounding box of the figure.
| lineWidthFlag | Should the line width be considered when computing bounding boxes. |
Implements LibBoard::Shape.
References LibBoard::Polyline::boundingBox().
|
virtual |
|
virtual |
Writes the FIG code of the shape in a stream according to a transform.
| stream | The output stream. |
| transform | A 2D transform to be applied. |
Implements LibBoard::Shape.
References LibBoard::Shape::_depth, LibBoard::Shape::bbox(), LibBoard::Polyline::boundingBox(), and LibBoard::Rectangle::flushFIG().
|
virtual |
Writes the EPS code of the shape in a stream according to a transform.
| stream | The output stream. |
| transform | A 2D transform to be applied. |
Implements LibBoard::Shape.
References LibBoard::Rect::height, and LibBoard::Rect::width.
|
virtual |
Writes the SVG code of the shape in a stream according to a transform.
| stream | The output stream. |
| transform | A 2D transform to be applied. |
Implements LibBoard::Shape.
|
virtual |
Writes the TikZ code of the shape in a stream according to a transform.
| stream | The output stream. |
| transform | A 2D transform to be applied. |
Implements LibBoard::Shape.
References LibBoard::Rectangle::flushTikZ().
|
virtual |
Rotate the shape around a given center of rotation.
| angle | The rotation angle in radian. |
| center | The center of rotation. |
Implements LibBoard::Shape.
References LibBoard::Polyline::rotate().
|
virtual |
Rotate the shape around its center.
| angle | The rotation angle in radian. |
Implements LibBoard::Shape.
References LibBoard::Shape::center(), and LibBoard::Polyline::rotate().
| Image LibBoard::Image::rotated | ( | double | angle | ) | const |
Returns a rotated copy of the image.
| angle | The rotation angle in radian. |
References Image().
Returns a rotated copy of the image.
| angle | The rotation angle in radian. |
| center | The center of rotation. |
References Image().
|
virtual |
Scale the shape along the x an y axis.
| sx | The scale factor along the x axis. |
| sy | The scale factor along the y axis. |
Implements LibBoard::Shape.
References LibBoard::Shape::center(), and LibBoard::Polyline::scale().
Referenced by scale().
|
virtual |
Scale the shape along both axis.
| s | The scale factor along both axis. |
Implements LibBoard::Shape.
References scale().
|
virtual |
Scales all the values (positions, dimensions, etc.) associated with the shape.
| s | The scaling factor. |
Implements LibBoard::Shape.
References LibBoard::Rectangle::scaleAll().
| Image LibBoard::Image::scaled | ( | double | sx, |
| double | sy | ||
| ) |
Returns a scaled copy of the image.
| sx | Scale factor along the x axis. |
| sy | Scale factor along the y axis. |
References Image().
|
virtual |
Translate the shape by a given offset.
| dx | The x offset. |
| dy | The y offset. |
Implements LibBoard::Shape.
References LibBoard::Polyline::translate().
| Image LibBoard::Image::translated | ( | double | dx, |
| double | dy | ||
| ) | const |
Returns a translated copy of the image.
| dx | The x offset. |
| dy | The y offset. |
References Image().
1.8.10