17 #ifndef FL_SVG_IMAGE_H 18 #define FL_SVG_IMAGE_H 138 NSVGimage* svg_image;
141 counted_NSVGimage* counted_svg_image_;
143 int raster_w_, raster_h_;
146 float average_weight_;
147 float svg_scaling_(
int W,
int H);
148 void rasterize_(
int W,
int H);
149 void init_(
const char *filename,
const char *filedata,
Fl_SVG_Image *copy_source);
155 Fl_SVG_Image(
const char *filename,
const char *svg_data = NULL);
157 virtual Fl_Image *copy(
int W,
int H);
159 void resize(
int width,
int height);
162 virtual void draw(
int X,
int Y,
int W,
int H,
int cx = 0,
int cy = 0);
163 void draw(
int X,
int Y) {
draw(X, Y,
w(),
h(), 0, 0); }
168 #endif // FL_SVG_IMAGE_H virtual Fl_SVG_Image * as_svg_image()
Returns whether an image is an Fl_SVG_Image or not.
Definition: Fl_SVG_Image.H:164
int h() const
Returns the current image drawing height in FLTK units.
Definition: Fl_Image.H:132
virtual void normalize()
Makes sure the object is fully initialized.
Definition: Fl_Image.H:340
The Fl_SVG_Image class supports loading, caching and drawing of scalable vector graphics (SVG) images...
Definition: Fl_SVG_Image.H:135
Base class for image caching, scaling and drawing.
Definition: Fl_Image.H:62
Fl_Image, Fl_RGB_Image classes.
int w() const
Returns the current image drawing width in FLTK units.
Definition: Fl_Image.H:126
The Fl_RGB_Image class supports caching and drawing of full-color images with 1 to 4 channels of colo...
Definition: Fl_Image.H:287
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0)
Draws the image to the current drawing surface with a bounding box.
Definition: Fl_Image.cxx:643
Fl_Image * copy()
Creates a copy of the specified image.
Definition: Fl_Image.H:217
virtual void color_average(Fl_Color c, float i)
The color_average() method averages the colors in the image with the FLTK color value c...
Definition: Fl_Image.cxx:545
virtual void desaturate()
The desaturate() method converts an image to grayscale.
Definition: Fl_Image.cxx:604
bool proportional
Set this to false to allow image re-scaling that alters the image aspect ratio.
Definition: Fl_SVG_Image.H:154
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition: Enumerations.H:1042