FLTK 1.4.0
Loading...
Searching...
No Matches
Fl_SVG_File_Surface.H
1//
2// Declaration of Fl_SVG_File_Surface in the Fast Light Tool Kit (FLTK).
3//
4// Copyright 2020 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
17#ifndef Fl_SVG_File_Surface_H
18#define Fl_SVG_File_Surface_H
19
20#include <FL/Fl_Widget_Surface.H>
21#include <stdio.h>
22
47class FL_EXPORT Fl_SVG_File_Surface : public Fl_Widget_Surface {
48 int width_, height_;
49 int (*closef_)(FILE*);
50public:
60 Fl_SVG_File_Surface(int width, int height, FILE *svg, int (*closef)(FILE*) = NULL);
67 FILE *file();
68 void origin(int x, int y) FL_OVERRIDE;
69 void origin(int *x, int *y) FL_OVERRIDE;
70 void translate(int x, int y) FL_OVERRIDE;
72 int printable_rect(int *w, int *h) FL_OVERRIDE;
77 int close();
78};
79
80#endif /* Fl_SVG_File_Surface_H */
A drawing surface producing a Scalable Vector Graphics (SVG) file.
Definition Fl_SVG_File_Surface.H:47
void untranslate() FL_OVERRIDE
Undoes the effect of a previous translate() call.
~Fl_SVG_File_Surface()
Destructor.
Fl_SVG_File_Surface(int width, int height, FILE *svg, int(*closef)(FILE *)=NULL)
Constructor of the SVG drawing surface.
void translate(int x, int y) FL_OVERRIDE
Translates the current graphics origin accounting for the current rotation.
void origin(int *x, int *y) FL_OVERRIDE
Computes the coordinates of the current origin of graphics functions.
FILE * file()
Returns the underlying FILE pointer.
void origin(int x, int y) FL_OVERRIDE
Sets the position of the origin of graphics in the drawable part of the drawing surface.
A surface on which any FLTK widget can be drawn.
Definition Fl_Widget_Surface.H:25
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46