Class to render a draw file to the screen.
More...
#include <drawfile.h>
Class to render a draw file to the screen.
This class uses the DrawFile module to render the drawfile.
Return the bounding box for a drawfile with the given transform.
Note: bounds will not be updated if a valid draw file has not been loaded.
- Parameters
-
bounds | bounds to return - note the coordinates return are in 256ths of an os unit |
dt | Transformation applied to the drawing. |
bool tbx::DrawFile::load |
( |
const std::string & |
file_name | ) |
|
Load JPEG from file.
- Parameters
-
file_name | name of file to load from |
- Returns
- true if load succeeded
void tbx::DrawFile::plot |
( |
int |
x, |
|
|
int |
y |
|
) |
| const |
|
virtual |
Plot draw file at given location.
- Parameters
-
x | x coordinate for plot in os units |
y | y coordinate for plot in os units |
Implements tbx::Image.
void tbx::DrawFile::plot |
( |
const tbx::Point & |
pt | ) |
const |
|
virtual |
Plot draw file at given location.
- Parameters
-
pt | location for plot in os units |
Reimplemented from tbx::Image.
void tbx::DrawFile::render |
( |
DrawTransform * |
dt = 0 , |
|
|
BBox * |
clip = 0 , |
|
|
int |
flatness = -1 |
|
) |
| const |
Render a draw file to screen.
- Parameters
-
dt | DrawTransform to position, rotate and translate drawing or 0 for identity transform. |
clip | point to box to clip the drawing or 0 for no clip |
flatness | for curves or -1 if not specified. |
The documentation for this class was generated from the following files: