List of all members | Public Member Functions | Public Attributes
create_pstricks_settings Class Reference

Implementation of create_image_settings for generating LaTeX code using PsTricks. More...

Inheritance diagram for create_pstricks_settings:
create_image_settings

Public Member Functions

 create_pstricks_settings ()
 Default constructor. More...
 
virtual void draw_begin (std::ostream &os) const
 Begin with drawing. More...
 
virtual void draw_line (std::ostream &os, float x1, float x2, float y) const
 Draws a circuit line. More...
 
virtual void draw_input (std::ostream &os, float x, float y, const std::string &text, bool is_constant) const
 Draws an input name. More...
 
virtual void draw_output (std::ostream &os, float x, float y, const std::string &text, bool is_garbage) const
 Draws an output name. More...
 
virtual void draw_control (std::ostream &os, float x, float y) const
 Draws a control. More...
 
virtual void draw_targets (std::ostream &os, float x, const std::vector< float > &ys, const boost::any &target_tag) const
 Draws a control. More...
 
virtual void draw_peres_frame (std::ostream &os, float x1, float y1, float x2, float y2) const
 Draws the frame around Peres Gates. More...
 
virtual void draw_gate_line (std::ostream &os, float x, float y1, float y2) const
 Draws a gate line. More...
 
virtual void draw_end (std::ostream &os) const
 Stops ending the image. More...
 
- Public Member Functions inherited from create_image_settings
virtual void draw_before (std::ostream &os) const
 User callback for user-defined drawing before the circuit is painted. More...
 
virtual void draw_in_between (std::ostream &os) const
 User callback for user-defined drawing after the lines but before the gates are painted. More...
 
virtual void draw_after (std::ostream &os) const
 User callback for user-defined drawing after the circuit was painted. More...
 

Public Attributes

bool math_emph
 Specifies whether inputs and outputs should be put in $ ... $ math mode. More...
 
- Public Attributes inherited from create_image_settings
float width
 With of the image. More...
 
float height
 Height of the image. More...
 
float elem_width
 Width of a gate. More...
 
float elem_height
 Height of a gate. More...
 
float line_width
 Width of a line. More...
 
float control_radius
 Radius of a control element. More...
 
float target_radius
 Radius of a target element. More...
 
std::string draw_before_text
 Text written before the circuit is printed. More...
 
std::string draw_in_between_text
 Text written after the lines but before the gates are printed. More...
 
std::string draw_after_text
 Text written after the circuit is printed. More...
 

Detailed Description

Implementation of create_image_settings for generating LaTeX code using PsTricks.

For drawing the circuit the PsTricks package is used. For more information check http://www.pstricks.de

Author
RevKit
Since
1.0

Constructor & Destructor Documentation

Default constructor.

Author
RevKit
Since
1.0

Member Function Documentation

virtual void draw_begin ( std::ostream &  os) const
virtual

Begin with drawing.

This method is called when it is started to paint the image.

Parameters
osOutput stream of the create_image function
Author
RevKit
Since
1.0

Implements create_image_settings.

virtual void draw_control ( std::ostream &  os,
float  x,
float  y 
) const
virtual

Draws a control.

This methods draws a control

Parameters
osOutput stream of the create_image function
xX-coordinate of the center of the control
yY-coordinate of the center of the control
Author
RevKit
Since
1.0

Implements create_image_settings.

virtual void draw_end ( std::ostream &  os) const
virtual

Stops ending the image.

This methods is called after finishing painting the image.

Parameters
osOutput stream of the create_image function
Author
RevKit
Since
1.0

Implements create_image_settings.

virtual void draw_gate_line ( std::ostream &  os,
float  x,
float  y1,
float  y2 
) const
virtual

Draws a gate line.

Draws a line from the top most element to the bottom most element

Parameters
osOutput stream of the create_image function
xX-coordinate of the line
y1Top Y-coordinate of the line
y2Bottom Y-coordinate of the line
Author
RevKit
Since
1.0

Implements create_image_settings.

virtual void draw_input ( std::ostream &  os,
float  x,
float  y,
const std::string &  text,
bool  is_constant 
) const
virtual

Draws an input name.

This methods draws an input name at the starting position of a line

Parameters
osOutput stream of the create_image function
xHorizontal starting position of the ascending line
yVertical position of the ascending line
textName of the input
is_constantSpecifies whether the input is a constant input
Author
RevKit
Since
1.0

Implements create_image_settings.

virtual void draw_line ( std::ostream &  os,
float  x1,
float  x2,
float  y 
) const
virtual

Draws a circuit line.

This method draws a circuit line.

Parameters
osOutput stream of the create_image function
x1Horizontal starting position of the line
x2Horizontal ending position of the line
yVertical position of the line
Author
RevKit
Since
1.0

Implements create_image_settings.

virtual void draw_output ( std::ostream &  os,
float  x,
float  y,
const std::string &  text,
bool  is_garbage 
) const
virtual

Draws an output name.

This methods draws an output name at the starting position of a line

Parameters
osOutput stream of the create_image function
xHorizontal ending position of the ascending line
yVertical position of the ascending line
textName of the output
is_garbageSpecifies whether the output is a garbage output
Author
RevKit
Since
1.0

Implements create_image_settings.

virtual void draw_peres_frame ( std::ostream &  os,
float  x1,
float  y1,
float  x2,
float  y2 
) const
virtual

Draws the frame around Peres Gates.

This method draws the frame around Peres gates.

Parameters
osOutput stream of the create_image function
x1Left X-coordinate
y1Bottom Y-coordinate
x2Right X-coordinate
y2Top Y-coordinate
Author
RevKit
Since
1.0

Implements create_image_settings.

virtual void draw_targets ( std::ostream &  os,
float  x,
const std::vector< float > &  ys,
const boost::any &  target_tag 
) const
virtual

Draws a control.

This methods draws a control

Parameters
osOutput stream of the create_image function
xX-coordinate of the center of the targets
ysY-coordinates of the centers of the targets
target_tagType of the target
Author
RevKit
Since
1.0

Implements create_image_settings.

Member Data Documentation

bool math_emph

Specifies whether inputs and outputs should be put in $ ... $ math mode.

Default value is false.

Author
RevKit
Since
1.0

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

Generated on Tue Apr 16 2013 08:12:02 for RevKit by doxygen 1.8.3.1