imaging::DummyGraphics Class Reference
[Graphics Module]

Graphics output that ignores any input. More...

#include <DummyGraphics.hpp>

Inheritance diagram for imaging::DummyGraphics:

imaging::GraphicsInterface imaging::OpenGlViewer

List of all members.

Public Types

enum  image_formats { IMAGE_FORMAT_EPS, IMAGE_FORMAT_SVG, IMAGE_FORMAT_PDF, IMAGE_FORMAT_DETERMINE }

Public Member Functions

virtual void init (int argc, char **argv, const ublas::fixed_vector< float_t, 2 > &lower_left, const ublas::fixed_vector< float_t, 2 > &upper_right, const size_t window_width=STD_WINDOW_SIZE, const size_t window_height=STD_WINDOW_SIZE)
virtual void clear ()
virtual void set_coordinates (const ublas::fixed_vector< float_t, 2 > &lower_left, const ublas::fixed_vector< float_t, 2 > &upper_right)
virtual void circle (const ublas::fixed_vector< float_t, 2 > &center, float_t radius)
virtual void polygon (const std::vector< ublas::fixed_vector< float_t, 2 > > &vertices)
virtual void fill_polygon (const std::vector< ublas::fixed_vector< float_t, 2 > > &vertices)
virtual void polyline (const std::vector< ublas::fixed_vector< float_t, 2 > > &vertices)
virtual void vertex (const ublas::fixed_vector< float_t, 2 > &vertex)
virtual void image (const ColorImage2d &image, const ublas::fixed_vector< float_t, 2 > x_interval, const ublas::fixed_vector< float_t, 2 > y_interval)
virtual void spline_curve (const Bspline< ublas::fixed_vector< float_t, 2 > > &spline_curve)
virtual GraphicsInterfaceoperator<< (const CommandInterface &command)
virtual GraphicsInterfaceoperator<< (const StreamStatus &status)
virtual const StreamStatus & get_stream_status ()
virtual void write_image (const std::string &file_name, const int image_format=IMAGE_FORMAT_DETERMINE)
virtual void write_image (const std::string &file_name, size_t width, size_t height, const int image_format=IMAGE_FORMAT_DETERMINE)

Static Public Attributes

static DummyGraphics out
static const size_t STD_WINDOW_SIZE = 400


Detailed Description

Graphics output that ignores any input.

Member Enumeration Documentation

Image formats to be used in write_image().

Enumerator:
IMAGE_FORMAT_EPS  EPS file with suffix eps.
IMAGE_FORMAT_SVG  Compressed SVG file with suffix svgz.
IMAGE_FORMAT_PDF  PDF file with suffix pdf.
IMAGE_FORMAT_DETERMINE  Determine image format from file name suffix.


Member Function Documentation

virtual void imaging::DummyGraphics::init ( int  argc,
char **  argv,
const ublas::fixed_vector< float_t, 2 > &  lower_left,
const ublas::fixed_vector< float_t, 2 > &  upper_right,
const size_t  window_width = STD_WINDOW_SIZE,
const size_t  window_height = STD_WINDOW_SIZE 
) [inline, virtual]

Initializes graphics. The arguments lower_left and upper_right specify the sections of the x-axis and the y-axis which are displayed, window_width and window_height the size of the output window.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::clear (  )  [inline, virtual]

Clears the graphics output. All groups are reset and all objects removed from the window.

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::set_coordinates ( const ublas::fixed_vector< float_t, 2 > &  lower_left,
const ublas::fixed_vector< float_t, 2 > &  upper_right 
) [inline, virtual]

Initializes the coordinate system of the graphics output. The arguments lower_left and upper_right specify the sections of the x-axis and the y-axis which are displayed.

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::circle ( const ublas::fixed_vector< float_t, 2 > &  center,
float_t  radius 
) [inline, virtual]

Draws the circle determined by center and radius.

See also:
operator<<(gr & out, const Circle & circle)

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::polygon ( const std::vector< ublas::fixed_vector< float_t, 2 > > &  vertices  )  [inline, virtual]

Draws the polygon determined by vertices. The first and the last point in vertices will automatically be connected, i.e. there is no need for them to be the same.

See also:
polyline()

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::fill_polygon ( const std::vector< ublas::fixed_vector< float_t, 2 > > &  vertices  )  [inline, virtual]

Fills the polygon determined by vertices with the current color.

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::polyline ( const std::vector< ublas::fixed_vector< float_t, 2 > > &  vertices  )  [inline, virtual]

Draws the polyline determined by vertices. The first and the last point in vertices will not be connected.

See also:
polygon

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::vertex ( const ublas::fixed_vector< float_t, 2 > &  vertex  )  [inline, virtual]

Draws vertex as point on the drawing plane.

See also:
operator<<(gr & out, const ublas::fixed_vector<float_t, 2> &)

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::image ( const ColorImage2d image,
const ublas::fixed_vector< float_t, 2 >  x_interval,
const ublas::fixed_vector< float_t, 2 >  y_interval 
) [inline, virtual]

Rescales image such that it fits into the rectangle x_interval x y_interval and draws it.

See also:
operator<<(gr & out, const ColorImage2d &)

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::spline_curve ( const Bspline< ublas::fixed_vector< float_t, 2 > > &  spline_curve  )  [inline, virtual]

Draws the spline curve of order with knots and coefficient.

See also:
operator<<(gr & out, const Bspline< ublas::fixed_vector<float_t, 2> > &), operator<<(gr & out, const PeriodicBspline< ublas::fixed_vector<float_t, 2> > &), operator<<(gr & out, const BsplineShape & spline_shape)

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual GraphicsInterface& imaging::DummyGraphics::operator<< ( const CommandInterface command  )  [inline, virtual]

Pass the stream command command to the stream.

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual const StreamStatus& imaging::DummyGraphics::get_stream_status (  )  [inline, virtual]

Get the current stream status. Use this function to backup the status and restore it later. The status of a stream is determined by its

  • color,
  • group,
  • z_value,
  • translation, and
  • line width.

Implements imaging::GraphicsInterface.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::write_image ( const std::string &  file_name,
const int  image_format = IMAGE_FORMAT_DETERMINE 
) [inline, virtual]

Write the content of the graphics output to an image file. The file format of the output image is determined by image_format. The size of the image will be the current size of the coordinate axes.

Reimplemented in imaging::OpenGlViewer.

virtual void imaging::DummyGraphics::write_image ( const std::string &  file_name,
size_t  width,
size_t  height,
const int  image_format = IMAGE_FORMAT_DETERMINE 
) [inline, virtual]

Write the content of the graphics output to an image file. The file format of the output image is determined by image_format. The size of the image is determined by width and height.

Reimplemented in imaging::OpenGlViewer.


Member Data Documentation

Standard graphics output. Currently only output to out is possible.

Reimplemented in imaging::OpenGlViewer.


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

Generated on Tue Feb 10 10:01:31 2009 for imaging2 by  doxygen 1.5.5