SkillGuiBatchRenderer Class Reference

DOT graph batch renderer. More...

Inheritance diagram for SkillGuiBatchRenderer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SkillGuiBatchRenderer (int argc, char **argv)
 Constructor.
 ~SkillGuiBatchRenderer ()
 Destructor.
void usage ()
 Show usage instructions.
virtual Cairo::RefPtr
< Cairo::Context > 
get_cairo ()
 Get Cairo context.
virtual bool scale_override ()
 Check if scale override is enabled.
virtual void get_dimensions (double &width, double &height)
 Get available space dimensions.
virtual double get_scale ()
 Get scale factor.
virtual void set_scale (double scale)
 Set scale.
virtual void set_translation (double tx, double ty)
 Set translation.
virtual void get_translation (double &tx, double &ty)
 Get translation values.
virtual void set_bb (double bbw, double bbh)
 Set the bounding box.
virtual void set_pad (double pad_x, double pad_y)
 Set padding.
virtual void get_pad (double &pad_x, double &pad_y)
 Get padding.
void render ()
 Render graph.
void run ()
 Run the renderer.
void postprocess ()
 Post-process files.

Static Public Member Functions

static cairo_status_t write_func (void *closure, const unsigned char *data, unsigned int length)
 Write function for Cairo.

Detailed Description

DOT graph batch renderer.

Definition at line 41 of file batch_render.cpp.


Constructor & Destructor Documentation

SkillGuiBatchRenderer::SkillGuiBatchRenderer ( int  argc,
char **  argv 
) [inline]

Constructor.

Parameters:
argc number of arguments
argv arguments

Definition at line 49 of file batch_render.cpp.

References fawkes::ArgumentParser::arg(), fawkes::ArgumentParser::has_arg(), and usage().

SkillGuiBatchRenderer::~SkillGuiBatchRenderer (  )  [inline]

Destructor.

Definition at line 121 of file batch_render.cpp.


Member Function Documentation

virtual Cairo::RefPtr<Cairo::Context> SkillGuiBatchRenderer::get_cairo (  )  [inline, virtual]

Get Cairo context.

Returns:
cairo context to use for drawing

Implements SkillGuiCairoRenderInstructor.

Definition at line 141 of file batch_render.cpp.

virtual void SkillGuiBatchRenderer::get_dimensions ( double &  width,
double &  height 
) [inline, virtual]

Get available space dimensions.

Parameters:
width upon return contains the available width
height upon return contains the available height

Implements SkillGuiCairoRenderInstructor.

Definition at line 168 of file batch_render.cpp.

virtual void SkillGuiBatchRenderer::get_pad ( double &  pad_x,
double &  pad_y 
) [inline, virtual]

Get padding.

If scale_override() returns true, shall return the requested padding values.

Parameters:
pad_x upon return contains padding in x
pad_y upon return contains padding in y

Implements SkillGuiCairoRenderInstructor.

Definition at line 207 of file batch_render.cpp.

virtual double SkillGuiBatchRenderer::get_scale (  )  [inline, virtual]

Get scale factor.

If scale_override() returns true, shall return the requested scale value.

Returns:
scale factor

Implements SkillGuiCairoRenderInstructor.

Definition at line 174 of file batch_render.cpp.

virtual void SkillGuiBatchRenderer::get_translation ( double &  tx,
double &  ty 
) [inline, virtual]

Get translation values.

If scale_override() returns true, shall return the requested translation values.

Parameters:
tx upon return contains translation in x
ty upon return contains translation in y

Implements SkillGuiCairoRenderInstructor.

Definition at line 178 of file batch_render.cpp.

void SkillGuiBatchRenderer::postprocess (  )  [inline]

Post-process files.

Only valid for PNGs.

Definition at line 281 of file batch_render.cpp.

References write_func().

Referenced by run().

void SkillGuiBatchRenderer::render (  )  [inline]

Render graph.

Definition at line 214 of file batch_render.cpp.

Referenced by run().

void SkillGuiBatchRenderer::run (  )  [inline]

Run the renderer.

Definition at line 236 of file batch_render.cpp.

References postprocess(), and render().

virtual bool SkillGuiBatchRenderer::scale_override (  )  [inline, virtual]

Check if scale override is enabled.

Returns:
true if the instructor determines the scaling, false to have the plugin do this.

Implements SkillGuiCairoRenderInstructor.

Definition at line 166 of file batch_render.cpp.

virtual void SkillGuiBatchRenderer::set_bb ( double  bbw,
double  bbh 
) [inline, virtual]

Set the bounding box.

Set by the plugin before calling any other function.

Parameters:
bbw bounding box width
bbh bounding box height

Implements SkillGuiCairoRenderInstructor.

Definition at line 185 of file batch_render.cpp.

virtual void SkillGuiBatchRenderer::set_pad ( double  pad_x,
double  pad_y 
) [inline, virtual]

Set padding.

Set by the plugin immediately after set_bb() is called.

Parameters:
pad_x padding in x
pad_y padding in y

Implements SkillGuiCairoRenderInstructor.

Definition at line 200 of file batch_render.cpp.

virtual void SkillGuiBatchRenderer::set_scale ( double  scale  )  [inline, virtual]

Set scale.

Set the scale value that the plugin determined.

Parameters:
scale scale determined by plugin

Implements SkillGuiCairoRenderInstructor.

Definition at line 175 of file batch_render.cpp.

virtual void SkillGuiBatchRenderer::set_translation ( double  tx,
double  ty 
) [inline, virtual]

Set translation.

Set the translation values the plugin determined.

Parameters:
tx translation in x
ty translation in y

Implements SkillGuiCairoRenderInstructor.

Definition at line 176 of file batch_render.cpp.

void SkillGuiBatchRenderer::usage (  )  [inline]

Show usage instructions.

Definition at line 128 of file batch_render.cpp.

References fawkes::ArgumentParser::program_name().

Referenced by SkillGuiBatchRenderer().

static cairo_status_t SkillGuiBatchRenderer::write_func ( void *  closure,
const unsigned char *  data,
unsigned int  length 
) [inline, static]

Write function for Cairo.

Parameters:
closure contains the file handle
data data to write
length length of data
Returns:
Cairo status

Definition at line 269 of file batch_render.cpp.

Referenced by postprocess().


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

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1