FLTK 1.4.5: Fl_SVG_File_Surface.H Source File

FLTK 1.4.5

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
47 class 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);
65 ~Fl_SVG_File_Surface();
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;
71 void untranslate() FL_OVERRIDE;
72 int printable_rect(int *w, int *h) FL_OVERRIDE;
77 int close();
78};
79
80#endif /* Fl_SVG_File_Surface_H */
Fl_SVG_File_Surface::untranslate
void untranslate() FL_OVERRIDE
Undoes the effect of a previous translate() call.
Fl_SVG_File_Surface::printable_rect
int printable_rect(int *w, int *h) FL_OVERRIDE
Computes the width and height of the drawable area of the drawing surface.
Fl_SVG_File_Surface::~Fl_SVG_File_Surface
~Fl_SVG_File_Surface()
Destructor.
Fl_SVG_File_Surface::Fl_SVG_File_Surface
Fl_SVG_File_Surface(int width, int height, FILE *svg, int(*closef)(FILE *)=NULL)
Constructor of the SVG drawing surface.
Fl_SVG_File_Surface::translate
void translate(int x, int y) FL_OVERRIDE
Translates the current graphics origin accounting for the current rotation.
Fl_SVG_File_Surface::origin
void origin(int *x, int *y) FL_OVERRIDE
Computes the coordinates of the current origin of graphics functions.
Fl_SVG_File_Surface::file
FILE * file()
Returns the underlying FILE pointer.
Fl_SVG_File_Surface::origin
void origin(int x, int y) FL_OVERRIDE
Sets the position of the origin of graphics in the drawable part of the drawing surface.
Fl_SVG_File_Surface::close
int close()
Closes the FILE pointer where SVG data is output.
Fl_Widget_Surface::Fl_Widget_Surface
Fl_Widget_Surface(Fl_Graphics_Driver *d)
The constructor.
Definition Fl_Widget_Surface.cxx:28
FL_OVERRIDE
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46