Board
0.9.5
|
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) | |
Image (const char *filename, const Rect &rect) | |
const std::string & | name () const override |
Image * | clone () const override |
Shape & | rotate (double angle, const Point ¢er) override |
Shape & | rotate (double angle) override |
Image | rotated (double angle) const |
Image | rotated (double angle, const Point &) const |
Shape & | translate (double dx, double dy) override |
Image | translated (double dx, double dy) const |
Shape & | scale (double sx, double sy) override |
Shape & | scale (double s) override |
Image | scaled (double sx, double sy) |
Rect | boundingBox (LineWidthFlag lineWidthFlag) const override |
void | scaleAll (double s) override |
void | flushPostscript (std::ostream &stream, const TransformEPS &transform) const override |
void | flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< Color, int > &colormap) const override |
void | flushSVG (std::ostream &stream, const TransformSVG &transform) const override |
void | flushTikZ (std::ostream &stream, const TransformTikZ &transform) const override |
virtual void | accept (ShapeVisitor &visitor) override |
Accepts a visitor object. More... | |
virtual void | accept (const ShapeVisitor &visitor) override |
Accepts a visitor object. More... | |
virtual void | accept (ConstShapeVisitor &visitor) const override |
Accepts a const-shape visitor object. More... | |
virtual void | accept (const ConstShapeVisitor &visitor) const override |
Accepts a const-shape visitor object. More... | |
virtual Shape * | accept (CompositeShapeTransform &transform) const override |
Accept a composite shape transform. More... | |
virtual Shape * | accept (const CompositeShapeTransform &transform) const override |
Accept a constant composite shape transform. More... | |
Image (const Image &)=default | |
Image (Image &&)=default | |
Image & | operator= (Image &&)=default |
![]() | |
Shape () | |
virtual | ~Shape () |
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 & | resize (double width, double height, LineWidthFlag lineWidthFlag) |
Shape & | scaleToWidth (double w, LineWidthFlag lineWidthFlag) |
Shape & | scaleToHeight (double h, LineWidthFlag lineWidthFlag) |
Rect | bbox (LineWidthFlag) const |
Shape (const Shape &other) | |
LibBoard::Image::Image | ( | const char * | filename, |
double | left, | ||
double | top, | ||
double | width, | ||
double | height = 0.0 |
||
) |
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 |
Referenced by clone(), rotated(), scaled(), and translated().
LibBoard::Image::Image | ( | const char * | filename, |
const Rect & | rect | ||
) |
Construct an Image given a filename, a size and (possibly) a depth.
filename | The image filename |
rect | The position and size of the image |
|
overridevirtual |
Accept a composite shape transform.
transform | A composite shape transform object. |
Reimplemented from LibBoard::Shape.
|
overridevirtual |
Accept a constant composite shape transform.
transform | A constant composite shape transform object.. |
Reimplemented from LibBoard::Shape.
|
overridevirtual |
Accepts a const-shape visitor object.
visitor | A const-shape visitor object. |
Reimplemented from LibBoard::Shape.
|
overridevirtual |
|
overridevirtual |
Accepts a const-shape visitor object.
visitor | A const-shape visitor object. |
Reimplemented from LibBoard::Shape.
|
overridevirtual |
|
overridevirtual |
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().
|
overridevirtual |
|
overridevirtual |
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. |
colormap |
Implements LibBoard::Shape.
References LibBoard::Shape::bbox(), LibBoard::Polyline::boundingBox(), and LibBoard::Polyline::flushFIG().
|
overridevirtual |
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.
|
overridevirtual |
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.
|
overridevirtual |
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::Polyline::flushTikZ().
|
overridevirtual |
|
overridevirtual |
Rotate the shape around its center.
angle | The rotation angle in radian. |
Implements LibBoard::Shape.
References LibBoard::Shape::center(), and LibBoard::Polyline::rotate().
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::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 LibBoard::Shape::center(), and Image().
|
overridevirtual |
Scale the shape along both axis.
s | The scale factor along both axis. |
Implements LibBoard::Shape.
References scale().
|
overridevirtual |
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().
|
overridevirtual |
Scales all the values (positions, dimensions, etc.) associated with the shape.
s | The scaling factor. |
Implements LibBoard::Shape.
References LibBoard::Polyline::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().
|
overridevirtual |
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().