#include <DummyGraphics.hpp>
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 > ¢er, 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 GraphicsInterface & | operator<< (const CommandInterface &command) |
virtual GraphicsInterface & | operator<< (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 |
Image formats to be used in write_image().
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.
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.
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.
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.
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.
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.
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
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.
DummyGraphics imaging::DummyGraphics::out [static] |
Standard graphics output. Currently only output to out is possible.
Reimplemented in imaging::OpenGlViewer.