SVG_Struct is the data structure for representing Scalable Vector Graphics.
More...
#include <SVG.hpp>
|
void | cartesian_scale (double x_width, double y_height, BoundingBox *bounding_box) |
| Turns svg into a cartesian graphing canvas bounded by bounding_box. More...
|
|
void | line (double x1, double y1, double x2, double y2, String_Const stroke) |
| Draw a line from (x1, y1) to (x2, y2) using stroke. More...
|
|
void | rectangle (double x, double y, double width, double height, String_Const stroke_color, String_Const fill_color) |
| Draw a width by height rectangle at (x, y). More...
|
|
void | setOffsets (double x_offset, double y_offset) |
|
| SVG (String_Const base_name, double width, double height, double x_scale, double y_scale, String_Const units) |
| Open an SVG object: More...
|
|
void | text (String_Const message, double x, double y, String_Const font_family, unsigned int font_size) |
| draw message at (x, y). More...
|
|
| ~SVG () |
| Close SVG object. More...
|
|
SVG_Struct is the data structure for representing Scalable Vector Graphics.
Definition at line 15 of file SVG.hpp.
Open an SVG object:
- Parameters
-
base_name | is the base name of the file name without the .svg. |
width | is the width of the SVG. |
height | is the height of the SVG. |
x_scale | is the amount is scale in X. |
y_scale | is the amount to scale in Y. |
units | is the units to use. |
- Returns
- a new SVG object.
SVG__open() will create and return a new SVG for writing out scable vector graphics.
Definition at line 117 of file SVG.cpp.
Close SVG object.
- Parameters
-
SVG__close() will close svg.
Definition at line 74 of file SVG.cpp.
void SVG::cartesian_scale |
( |
double |
x_width, |
|
|
double |
y_height, |
|
|
BoundingBox * |
bounding_box |
|
) |
| |
Turns svg into a cartesian graphing canvas bounded by bounding_box.
- Parameters
-
svg | is the SVG object to modify. |
x_width | is the available width graph on. |
y_height | is the available height graph on. |
bounding_box | specifies the BoundingBox of the values to be graphed. |
SVG__cartesian_scale() will modifiy svg so that it can graph lines, rectangles, etc, in an area bounded by bounding_box. The available graphing area is x_width by y_height.
Definition at line 23 of file SVG.cpp.
void SVG::line |
( |
double |
x1, |
|
|
double |
y1, |
|
|
double |
x2, |
|
|
double |
y2, |
|
|
String_Const |
stroke |
|
) |
| |
Draw a line from (x1, y1) to (x2, y2) using stroke.
- Parameters
-
svg | is the SVG object to draw line to. |
x1 | is X coordinate of first point. |
y1 | is Y coordinate of first point. |
x2 | is X coordinate of second point. |
y2 | is Y coordinate of second point. |
stroke | is stroke string. |
SVG__line() will draw a line to svg from (x1, y1) to (x2, y2) using stroke.
Definition at line 91 of file SVG.cpp.
void SVG::rectangle |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
width, |
|
|
double |
height, |
|
|
String_Const |
stroke_color, |
|
|
String_Const |
fill_color |
|
) |
| |
Draw a width by height rectangle at (x, y).
- Parameters
-
svg | is the SVG object to draw rectangle to. |
x | is the upper left X coordinate. |
y | is the uppper left Y coordinate. |
width | is the rectangle width. |
height | is the rectangle height. |
stroke_color | is the exterior line color. |
fill_color | is the interior fill color. |
SVG__rectangle will draw a width by height rectangle at (x, y) with stroke_color and fill_color specifying the external line color and internal fill color respectivily.
Definition at line 171 of file SVG.cpp.
void SVG::setOffsets |
( |
double |
x_offset, |
|
|
double |
y_offset |
|
) |
| |
draw message at (x, y).
- Parameters
-
svg | is the SVG object to use. |
message | is the message to draw. |
x | is the X coordinate to draw text at. |
y | is the Y coordinate of draw text at. |
font_family | is the font family to use. |
font_size | is the font size. |
SVG__text() will draw message at (x, y) with font_size font of type font_family.
Definition at line 196 of file SVG.cpp.
The output stream.
Definition at line 18 of file SVG.hpp.
Units to use for SVG values.
Definition at line 27 of file SVG.hpp.
Amount to offset X by.
Definition at line 30 of file SVG.hpp.
Amount to scale X by.
Definition at line 33 of file SVG.hpp.
Amount to offset Y by.
Definition at line 36 of file SVG.hpp.
Amount to scale Y by.
Definition at line 39 of file SVG.hpp.
The documentation for this class was generated from the following files: