#include <Fl_SVG_Image.H>
Public Member Functions | |
IMAGO_EXPORT | Fl_SVG_Image (const char *bits, size_t len, int W=0, int H=0) |
IMAGO_EXPORT | Fl_SVG_Image (const char *filename, int W=0, int H=0) |
virtual IMAGO_EXPORT | ~Fl_SVG_Image () |
IMAGO_EXPORT int | pt_width () const |
IMAGO_EXPORT int | pt_height () const |
IMAGO_EXPORT void | size (int W, int H) |
IMAGO_EXPORT void | destroy () |
IMAGO_EXPORT int | svgdata (const char *data, size_t len) |
virtual IMAGO_EXPORT void | draw (int XP, int YP, int WP, int HP, int cx, int cy) |
IMAGO_EXPORT bool | hit (int at_x, int at_y, int thresh=1) |
Static Protected Member Functions | |
char * | decompGZ (const char *in, size_t size) |
|
Constructor for user provided data. The main difference between this and a normal image is that SVG images do not have any specific size and the size can be specified here.
|
|
Constructor for reading from file.
|
|
Destructor |
|
GZip decompressor used for SVGZ files
|
|
This "cleans" the current state. Freeing any memory, etc. |
|
FLTK draw() method. Rebuilds the image if the dimensions have changed. SVG allows clean scaling to any size. This caches the generated image so that the SVG data does not need to be reparsed and rescaled every time the image is drawn.
|
|
Tests to see if a particular x/y coordinate "hit" the image in a non- transparent part. It might be worthwhile to make this inline by moving it to the header.
|
|
|
|
|
|
|
|
Parses the SVG data to be used in generating the image.
|