Board  0.6.devel
 All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Macros
LibBoard::Image Struct Reference

#include <Shapes.h>

Inheritance diagram for LibBoard::Image:
Collaboration diagram for LibBoard::Image:

Public Member Functions

 Image (double x0, double y0, double width, double height, std::string fileName, int depthValue, double alpha=1.0)
const std::string & name () const
Imageclone () const
void flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< DGtal::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::Rectangle
 Rectangle (double x, double y, double width, double height, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
 Rectangle (const Rect &rect, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle style=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
double x () const
double y () const
double width ()
double height ()
Point topLeft ()
Point topRight ()
Point bottomLeft ()
Point bottomRight ()
Rectangle rotated (double angle, const Point &center) const
Rectangle rotated (double angle) const
Rectangle translated (double dx, double dy) const
Rectangle scaled (double sx, double sy) const
Rectangle scaled (double s) const
void scaleAll (double s)
- Public Member Functions inherited from LibBoard::Polyline
 Polyline (const std::vector< Point > &points, bool closed, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle lineStyle=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
 Polyline (const Path &path, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle lineStyle=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
 Polyline (bool closed, DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, const LineStyle lineStyle=SolidStyle, const LineCap cap=ButtCap, const LineJoin join=MiterJoin, int depth=-1)
Point center () const
Polylineoperator<< (const Point &p)
Pointoperator[] (const unsigned int n)
Polylinerotate (double angle, const Point &center)
Polylinerotate (double angle)
Polylinetranslate (double dx, double dy)
Shapescale (double sx, double sy)
Shapescale (double s)
void flushPostscript (std::ostream &stream, const TransformEPS &transform) const
Rect boundingBox () const
- Public Member Functions inherited from LibBoard::Shape
 Shape (DGtal::Color penColor, DGtal::Color fillColor, double lineWidth, LineStyle style, const LineCap cap, const LineJoin join, int depth)
virtual ~Shape ()
bool filled () const
ShaperotateDeg (double angle, const Point &center)
ShaperotateDeg (double angle)
Rect bbox ()
Shapeoperator-- ()
Shapeoperator++ ()
int depth () const
virtual void depth (int)
virtual void shiftDepth (int shift)
const DGtal::Color & penColor () const
const DGtal::Color & fillColor () const

Protected Attributes

double _x0
double _y0
double _width
double _height
std::string _filename
double _alpha
- Protected Attributes inherited from LibBoard::Rectangle
bool _isRectangle
- Protected Attributes inherited from LibBoard::Polyline
Path _path
- Protected Attributes inherited from LibBoard::Shape
int _depth
DGtal::Color _penColor
DGtal::Color _fillColor
double _lineWidth
LineStyle _lineStyle
LineCap _lineCap
LineJoin _lineJoin

Static Private Attributes

static const std::string _name

Detailed Description

Used to draw image in figure.

The Image structure.


Constructor & Destructor Documentation

LibBoard::Image::Image ( double  x0,
double  y0,
double  width,
double  height,
std::string  fileName,
int  depthValue,
double  alpha = 1.0 
)
inline

Constructs a Image.

Parameters:
x0First coordinate of the start point.
y0Second coordinate of the start point.
widthFirst coordinate of the end point.
heightSecond coordinate of the end point.
filenamethe image filename.
depthThe depth of the image.
alphaThe image transparency used for display (works only is cairo is installed).

Referenced by clone().


Member Function Documentation

Image * LibBoard::Image::clone ( ) const
virtual

Return a copy of the shape.

Returns:

Reimplemented from LibBoard::Rectangle.

References Image().

void LibBoard::Image::flushFIG ( std::ostream &  stream,
const TransformFIG transform,
std::map< DGtal::Color, int > &  colormap 
) const
virtual

Writes the FIG code of the shape in a stream according to a transform.

Parameters:
streamThe output stream.
transformA 2D transform to be applied.

Reimplemented from LibBoard::Rectangle.

References LibBoard::Shape::_depth, _filename, LibBoard::Shape::_lineStyle, LibBoard::Shape::_lineWidth, LibBoard::Polyline::_path, LibBoard::Shape::_penColor, LibBoard::Path::flushFIG(), LibBoard::TransformFIG::mapDepth(), and LibBoard::TransformFIG::mapWidth().

void LibBoard::Image::flushSVG ( std::ostream &  stream,
const TransformSVG transform 
) const
virtual

Writes the SVG code of the shape in a stream according to a transform.

Parameters:
streamThe output stream.
transformA 2D transform to be applied.

Reimplemented from LibBoard::Rectangle.

References _filename, LibBoard::Polyline::_path, LibBoard::Transform::mapX(), LibBoard::TransformSVG::mapY(), LibBoard::Transform::scale(), LibBoard::Rectangle::x(), and LibBoard::Rectangle::y().

void LibBoard::Image::flushTikZ ( std::ostream &  stream,
const TransformTikZ transform 
) const
virtual

Writes the TikZ code of the shape in a stream according to a transform.

Parameters:
streamThe output stream.
transformA 2D transform to be applied.

Reimplemented from LibBoard::Rectangle.

References _filename, LibBoard::Polyline::_path, LibBoard::Transform::mapX(), LibBoard::TransformSVG::mapY(), LibBoard::Transform::scale(), LibBoard::Rectangle::x(), and LibBoard::Rectangle::y().

const std::string & LibBoard::Image::name ( ) const
virtual

Returns the generic name of the shape (e.g., Circle, Rectangle, etc.)

Returns:

Reimplemented from LibBoard::Rectangle.

References _name.


Field Documentation

double LibBoard::Image::_alpha
protected
std::string LibBoard::Image::_filename
protected

Referenced by flushFIG(), flushSVG(), and flushTikZ().

double LibBoard::Image::_height
protected
const std::string LibBoard::Image::_name
staticprivate

The generic name of the shape.

Reimplemented from LibBoard::Rectangle.

Referenced by name().

double LibBoard::Image::_width
protected
double LibBoard::Image::_x0
protected

First coordinate of the bottom left point.

double LibBoard::Image::_y0
protected

Second coordinate of the bottom left point.


The documentation for this struct was generated from the following files: