Fawkes API  Fawkes Development Version
SkillGuiBatchRenderer Class Reference

DOT graph batch renderer. More...

Inheritance diagram for SkillGuiBatchRenderer:

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

DOT graph batch renderer.

Definition at line 41 of file batch_render.cpp.

Constructor & Destructor Documentation

◆ SkillGuiBatchRenderer()

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

Constructor.

Parameters
argcnumber of arguments
argvarguments

Definition at line 49 of file batch_render.cpp.

◆ ~SkillGuiBatchRenderer()

SkillGuiBatchRenderer::~SkillGuiBatchRenderer ( )
inline

Destructor.

Definition at line 121 of file batch_render.cpp.

Member Function Documentation

◆ get_cairo()

virtual Cairo::RefPtr<Cairo::Context> SkillGuiBatchRenderer::get_cairo ( )
inlinevirtual

Get Cairo context.

Returns
cairo context to use for drawing

Implements SkillGuiCairoRenderInstructor.

Definition at line 141 of file batch_render.cpp.

◆ get_dimensions()

virtual void SkillGuiBatchRenderer::get_dimensions ( double &  width,
double &  height 
)
inlinevirtual

Get available space dimensions.

Parameters
widthupon return contains the available width
heightupon return contains the available height

Implements SkillGuiCairoRenderInstructor.

Definition at line 166 of file batch_render.cpp.

◆ get_pad()

virtual void SkillGuiBatchRenderer::get_pad ( double &  pad_x,
double &  pad_y 
)
inlinevirtual

Get padding.

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

Parameters
pad_xupon return contains padding in x
pad_yupon return contains padding in y

Implements SkillGuiCairoRenderInstructor.

Definition at line 205 of file batch_render.cpp.

◆ get_scale()

virtual double SkillGuiBatchRenderer::get_scale ( )
inlinevirtual

Get scale factor.

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

Returns
scale factor

Implements SkillGuiCairoRenderInstructor.

Definition at line 172 of file batch_render.cpp.

◆ get_translation()

virtual void SkillGuiBatchRenderer::get_translation ( double &  tx,
double &  ty 
)
inlinevirtual

Get translation values.

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

Parameters
txupon return contains translation in x
tyupon return contains translation in y

Implements SkillGuiCairoRenderInstructor.

Definition at line 176 of file batch_render.cpp.

◆ postprocess()

void SkillGuiBatchRenderer::postprocess ( )
inline

Post-process files.

Only valid for PNGs.

Definition at line 283 of file batch_render.cpp.

References run(), and write_func().

◆ render()

void SkillGuiBatchRenderer::render ( )
inline

Render graph.

Definition at line 212 of file batch_render.cpp.

◆ run()

void SkillGuiBatchRenderer::run ( )
inline

Run the renderer.

Definition at line 238 of file batch_render.cpp.

Referenced by postprocess().

◆ scale_override()

virtual bool SkillGuiBatchRenderer::scale_override ( )
inlinevirtual

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 164 of file batch_render.cpp.

◆ set_bb()

virtual void SkillGuiBatchRenderer::set_bb ( double  bbw,
double  bbh 
)
inlinevirtual

Set the bounding box.

Set by the plugin before calling any other function.

Parameters
bbwbounding box width
bbhbounding box height

Implements SkillGuiCairoRenderInstructor.

Definition at line 183 of file batch_render.cpp.

◆ set_pad()

virtual void SkillGuiBatchRenderer::set_pad ( double  pad_x,
double  pad_y 
)
inlinevirtual

Set padding.

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

Parameters
pad_xpadding in x
pad_ypadding in y

Implements SkillGuiCairoRenderInstructor.

Definition at line 198 of file batch_render.cpp.

◆ set_scale()

virtual void SkillGuiBatchRenderer::set_scale ( double  scale)
inlinevirtual

Set scale.

Set the scale value that the plugin determined.

Parameters
scalescale determined by plugin

Implements SkillGuiCairoRenderInstructor.

Definition at line 173 of file batch_render.cpp.

◆ set_translation()

virtual void SkillGuiBatchRenderer::set_translation ( double  tx,
double  ty 
)
inlinevirtual

Set translation.

Set the translation values the plugin determined.

Parameters
txtranslation in x
tytranslation in y

Implements SkillGuiCairoRenderInstructor.

Definition at line 174 of file batch_render.cpp.

◆ usage()

void SkillGuiBatchRenderer::usage ( )
inline

Show usage instructions.

Definition at line 128 of file batch_render.cpp.

◆ write_func()

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

Write function for Cairo.

Parameters
closurecontains the file handle
datadata to write
lengthlength of data
Returns
Cairo status

Definition at line 271 of file batch_render.cpp.

Referenced by postprocess().


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