Implementation of create_image_settings for generating LaTeX code using PsTricks. More...
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... | |
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
Default constructor.
|
virtual |
Begin with drawing.
This method is called when it is started to paint the image.
| os | Output stream of the create_image function |
Implements create_image_settings.
|
virtual |
Draws a control.
This methods draws a control
| os | Output stream of the create_image function |
| x | X-coordinate of the center of the control |
| y | Y-coordinate of the center of the control |
Implements create_image_settings.
|
virtual |
Stops ending the image.
This methods is called after finishing painting the image.
| os | Output stream of the create_image function |
Implements create_image_settings.
|
virtual |
Draws a gate line.
Draws a line from the top most element to the bottom most element
| os | Output stream of the create_image function |
| x | X-coordinate of the line |
| y1 | Top Y-coordinate of the line |
| y2 | Bottom Y-coordinate of the line |
Implements create_image_settings.
|
virtual |
Draws an input name.
This methods draws an input name at the starting position of a line
| os | Output stream of the create_image function |
| x | Horizontal starting position of the ascending line |
| y | Vertical position of the ascending line |
| text | Name of the input |
| is_constant | Specifies whether the input is a constant input |
Implements create_image_settings.
|
virtual |
Draws a circuit line.
This method draws a circuit line.
| os | Output stream of the create_image function |
| x1 | Horizontal starting position of the line |
| x2 | Horizontal ending position of the line |
| y | Vertical position of the line |
Implements create_image_settings.
|
virtual |
Draws an output name.
This methods draws an output name at the starting position of a line
| os | Output stream of the create_image function |
| x | Horizontal ending position of the ascending line |
| y | Vertical position of the ascending line |
| text | Name of the output |
| is_garbage | Specifies whether the output is a garbage output |
Implements create_image_settings.
|
virtual |
Draws the frame around Peres Gates.
This method draws the frame around Peres gates.
| os | Output stream of the create_image function |
| x1 | Left X-coordinate |
| y1 | Bottom Y-coordinate |
| x2 | Right X-coordinate |
| y2 | Top Y-coordinate |
Implements create_image_settings.
|
virtual |
Draws a control.
This methods draws a control
| os | Output stream of the create_image function |
| x | X-coordinate of the center of the targets |
| ys | Y-coordinates of the centers of the targets |
| target_tag | Type of the target |
Implements create_image_settings.
| bool math_emph |
Specifies whether inputs and outputs should be put in $ ... $ math mode.
Default value is false.
1.8.3.1