Public Member Functions | Protected Attributes | Static Private Attributes

LibBoard::Image Struct Reference

Used to draw image in figure. More...

#include <Shapes.h>

Inheritance diagram for LibBoard::Image:
Inheritance graph
[legend]
Collaboration diagram for LibBoard::Image:
Collaboration graph
[legend]

Public Member Functions

 Image (double x0, double y0, double width, double height, std::string fileName, int depthValue)
const std::string & name () const
Imageclone () const
void flushFIG (std::ostream &stream, const TransformFIG &transform, std::map< Color, int > &colormap) const
void flushSVG (std::ostream &stream, const TransformSVG &transform) const

Protected Attributes

double _x0
double _y0
double _width
double _height
std::string _filename

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 
) [inline]

Constructs a Image.

Parameters:
x0 First coordinate of the start point.
y0 Second coordinate of the start point.
width First coordinate of the end point.
height Second coordinate of the end point.
filename the image filename.
depth The depth of the image.

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< Color, int > &  colormap 
) const [virtual]

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

Parameters:
stream The output stream.
transform A 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(), LibBoard::TransformFIG::mapWidth(), and LibBoard::Color::valid().

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:
stream The output stream.
transform A 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

std::string LibBoard::Image::_filename [protected]

Referenced by flushFIG(), and flushSVG().

double LibBoard::Image::_height [protected]
const std::string LibBoard::Image::_name [static, private]

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: