37#include <FL/Fl_Plugin.H>
38#include <FL/Fl_Image.H>
39#include <FL/Fl_Bitmap.H>
40#include <FL/Fl_Pixmap.H>
41#include <FL/Fl_RGB_Image.H>
43#include <FL/Fl_Cairo.H>
64#elif defined(__APPLE__)
66typedef struct {
float x;
float y; } QPoint;
68extern float fl_quartz_line_width_;
100#define FL_REGION_STACK_SIZE 10
101#define FL_MATRIX_STACK_SIZE 32
114 struct matrix {
double a, b, c, d, x, y;};
121 static const int matrix_stack_size = FL_MATRIX_STACK_SIZE;
122 static matrix stack[FL_MATRIX_STACK_SIZE];
125 enum {LINE, LOOP, POLYGON, POINT_};
132 static int fl_clip_state_number;
133 static int rstackptr;
134 static const int region_stack_max = FL_REGION_STACK_SIZE - 1;
135 static Fl_Region rstack[FL_REGION_STACK_SIZE];
147 void transformed_vertex0(COORD_T x, COORD_T y);
159 friend void fl_rect(
int x,
int y,
int w,
int h);
160 friend void fl_rectf(
int x,
int y,
int w,
int h);
161 friend void fl_line_style(
int style,
int width,
char* dashes);
162 friend void fl_xyline(
int x,
int y,
int x1);
163 friend void fl_xyline(
int x,
int y,
int x1,
int y2);
164 friend void fl_xyline(
int x,
int y,
int x1,
int y2,
int x3);
165 friend void fl_yxline(
int x,
int y,
int y1);
166 friend void fl_yxline(
int x,
int y,
int y1,
int x2);
167 friend void fl_yxline(
int x,
int y,
int y1,
int x2,
int y3);
168 friend void fl_line(
int x,
int y,
int x1,
int y1);
169 friend void fl_line(
int x,
int y,
int x1,
int y1,
int x2,
int y2);
170 friend void fl_draw(
const char *str,
int n,
int x,
int y);
172 friend void fl_draw(
const char *str,
int n,
float x,
float y);
174 friend void fl_draw(
int angle,
const char *str,
int n,
int x,
int y);
175 friend void fl_rtl_draw(
const char *str,
int n,
int x,
int y);
180 friend void fl_loop(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
181 friend void fl_loop(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
182 friend void fl_polygon(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
183 friend void fl_polygon(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
188 friend void fl_vertex(
double x,
double y);
189 friend void fl_curve(
double X0,
double Y0,
double X1,
double Y1,
double X2,
double Y2,
double X3,
double Y3);
190 friend void fl_circle(
double x,
double y,
double r);
191 friend void fl_arc(
double x,
double y,
double r,
double start,
double end);
192 friend void fl_arc(
int x,
int y,
int w,
int h,
double a1,
double a2);
193 friend void fl_pie(
int x,
int y,
int w,
int h,
double a1,
double a2);
200 friend int fl_clip_box(
int x,
int y,
int w,
int h,
int &X,
int &Y,
int &W,
int &H);
209 friend void fl_mult_matrix(
double a,
double b,
double c,
double d,
double x,
double y );
210 friend void fl_scale(
double x,
double y);
231 virtual void rect(
int x,
int y,
int w,
int h);
233 virtual void rectf(
int x,
int y,
int w,
int h);
235 virtual void line_style(
int style,
int width=0,
char* dashes=0);
237 virtual void xyline(
int x,
int y,
int x1);
239 virtual void xyline(
int x,
int y,
int x1,
int y2);
241 virtual void xyline(
int x,
int y,
int x1,
int y2,
int x3);
243 virtual void yxline(
int x,
int y,
int y1);
245 virtual void yxline(
int x,
int y,
int y1,
int x2);
247 virtual void yxline(
int x,
int y,
int y1,
int x2,
int y3);
249 virtual void line(
int x,
int y,
int x1,
int y1);
251 virtual void line(
int x,
int y,
int x1,
int y1,
int x2,
int y2);
253 virtual void draw(
const char *str,
int n,
int x,
int y) = 0;
255 virtual void draw(
const char *str,
int n,
float x,
float y) = 0;
258 virtual void draw(
int angle,
const char *str,
int n,
int x,
int y) = 0;
260 virtual void rtl_draw(
const char *str,
int n,
int x,
int y) = 0;
266 virtual void point(
int x,
int y);
268 virtual void loop(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
270 virtual void loop(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
272 virtual void polygon(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2);
274 virtual void polygon(
int x0,
int y0,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3);
276 virtual void begin_points();
278 virtual void begin_line();
280 virtual void begin_loop();
282 virtual void begin_polygon();
284 virtual void vertex(
double x,
double y);
286 virtual void curve(
double X0,
double Y0,
double X1,
double Y1,
double X2,
double Y2,
double X3,
double Y3);
288 virtual void circle(
double x,
double y,
double r);
290 virtual void arc(
double x,
double y,
double r,
double start,
double end);
292 virtual void arc(
int x,
int y,
int w,
int h,
double a1,
double a2);
294 virtual void pie(
int x,
int y,
int w,
int h,
double a1,
double a2);
296 virtual void end_points();
298 virtual void end_line();
300 virtual void end_loop();
302 virtual void end_polygon();
304 virtual void begin_complex_polygon();
308 virtual void end_complex_polygon();
310 virtual void transformed_vertex(
double xf,
double yf);
312 virtual void push_clip(
int x,
int y,
int w,
int h);
314 virtual int clip_box(
int x,
int y,
int w,
int h,
int &X,
int &Y,
int &W,
int &H);
316 virtual int not_clipped(
int x,
int y,
int w,
int h);
318 virtual void push_no_clip();
320 virtual void pop_clip();
323 virtual void push_matrix();
325 virtual void pop_matrix();
327 virtual void mult_matrix(
double a,
double b,
double c,
double d,
double x,
double y);
329 virtual void scale(
double x,
double y) { mult_matrix(x,0,0,y,0,0); }
333 virtual void translate(
double x,
double y) { mult_matrix(1,0,0,1,x,y); }
335 virtual void rotate(
double d);
337 double transform_x(
double x,
double y);
339 double transform_y(
double x,
double y);
341 double transform_dx(
double x,
double y);
343 double transform_dy(
double x,
double y);
345 Fl_Region clip_region();
347 void clip_region(Fl_Region r);
349 virtual void restore_clip();
353 virtual void draw_image(
const uchar* buf,
int X,
int Y,
int W,
int H,
int D=3,
int L=0) = 0;
372 virtual void draw(
Fl_Pixmap * pxm,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy) = 0;
378 virtual void draw(
Fl_Bitmap *bm,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy) = 0;
381 static const char *class_id;
390 virtual double width(
const char *str,
int n) = 0;
392 virtual inline double width(
unsigned int c) {
char ch = (char)c;
return width(&ch, 1); }
394 virtual void text_extents(
const char*,
int n,
int& dx,
int& dy,
int&
w,
int&
h);
409#if defined(__APPLE__) || defined(FL_DOXYGEN)
417 static const char *class_id;
421 void draw(
const char* str,
int n,
int x,
int y);
423 void draw(
const char *str,
int n,
float x,
float y);
425 void draw(
int angle,
const char *str,
int n,
int x,
int y);
426 void rtl_draw(
const char* str,
int n,
int x,
int y);
431 void draw_image(
const uchar* buf,
int X,
int Y,
int W,
int H,
int D=3,
int L=0);
432 void draw_image(
Fl_Draw_Image_Cb cb,
void* data,
int X,
int Y,
int W,
int H,
int D=3);
433 void draw_image_mono(
const uchar* buf,
int X,
int Y,
int W,
int H,
int D=1,
int L=0);
434 void draw_image_mono(
Fl_Draw_Image_Cb cb,
void* data,
int X,
int Y,
int W,
int H,
int D=1);
435 double width(
const char *str,
int n);
437 void text_extents(
const char*,
int n,
int& dx,
int& dy,
int& w,
int& h);
442#if defined(WIN32) || defined(FL_DOXYGEN)
450 static const char *class_id;
454 void draw(
const char* str,
int n,
int x,
int y);
455 void draw(
int angle,
const char *str,
int n,
int x,
int y);
456 void rtl_draw(
const char* str,
int n,
int x,
int y);
461 void draw_image(
const uchar* buf,
int X,
int Y,
int W,
int H,
int D=3,
int L=0);
462 void draw_image(
Fl_Draw_Image_Cb cb,
void* data,
int X,
int Y,
int W,
int H,
int D=3);
463 void draw_image_mono(
const uchar* buf,
int X,
int Y,
int W,
int H,
int D=1,
int L=0);
464 void draw_image_mono(
Fl_Draw_Image_Cb cb,
void* data,
int X,
int Y,
int W,
int H,
int D=1);
465 double width(
const char *str,
int n);
467 void text_extents(
const char*,
int n,
int& dx,
int& dy,
int& w,
int& h);
472#if !(defined(__APPLE__) || defined(WIN32))
480 static const char *class_id;
484 void draw(
const char* str,
int n,
int x,
int y);
485 void draw(
int angle,
const char *str,
int n,
int x,
int y);
486 void rtl_draw(
const char* str,
int n,
int x,
int y);
488 void draw(
Fl_Pixmap *pxm,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
489 void draw(
Fl_Bitmap *pxm,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
490 void draw(
Fl_RGB_Image *img,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
491 void draw_image(
const uchar* buf,
int X,
int Y,
int W,
int H,
int D=3,
int L=0);
495 double width(
const char *str,
int n);
497 void text_extents(
const char*,
int n,
int& dx,
int& dy,
int& w,
int& h);
504 static cairo_matrix_t m;
505 static cairo_matrix_t stack[FL_MATRIX_STACK_SIZE];
510 static const char *class_id;
527 void arc(
int x,
int y,
int w,
int h,
double a1,
double a2 );
528 void pie(
int x,
int y,
int w,
int h,
double a1,
double a2 );
529 void arc(
double x,
double y,
double r,
double a1,
double a2 );
530 void line(
int x1,
int y1,
int x2,
int y2 );
531 void line(
int x1,
int y1,
int x2,
int y2,
int x3,
int y3 );
532 void rect (
int x,
int y,
int w,
int h );
534 void rectf (
int x,
int y,
int w,
int h );
535 void circle (
double x,
double y,
double r );
540 void curve(
double x,
double y,
double x1,
double y1,
double x2,
double y2,
double x3,
double y3 );
543 void loop (
int x,
int y,
int x1,
int y1,
int x2,
int y2 );
544 void polygon (
int x,
int y,
int x1,
int y1,
int x2,
int y2 );
545 void loop (
int x,
int y,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3 );
546 void polygon (
int x,
int y,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3 );
547 void xyline(
int x,
int y,
int x1);
548 void xyline(
int x,
int y,
int x1,
int y2);
549 void xyline(
int x,
int y,
int x1,
int y2,
int x3);
550 void yxline(
int x,
int y,
int y1);
551 void yxline(
int x,
int y,
int y1,
int x2);
552 void yxline(
int x,
int y,
int y1,
int x2,
int y3);
561 void vertex(
double x,
double y );
564 virtual void mult_matrix(
double a,
double b,
double c,
double d,
double x,
double y);
565 virtual void rotate(
double d);
566 virtual void scale(
double x,
double y);
567 virtual void translate(
double x,
double y);
575 void draw(
Fl_RGB_Image *img,
int XP,
int YP,
int WP,
int HP,
int cx,
int cy);
601 static const char *class_id;
603 virtual void set_current(
void);
621 static const char *class_id;
640 virtual const char *
klass() {
return "fltk:device"; }
642 virtual const char *
name() = 0;
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:707
unsigned int Fl_Color
an FLTK color value
Definition: Enumerations.H:764
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:736
void(* Fl_Draw_Image_Cb)(void *data, int x, int y, int w, uchar *buf)
signature of image generation callback function.
Definition: Fl_Device.H:58
FL_EXPORT Fl_Graphics_Driver * fl_graphics_driver
Points to the driver that currently receives all graphics requests.
The Fl_Bitmap class supports caching and drawing of mono-color (bitmap) images.
Definition: Fl_Bitmap.H:42
Definition: Fl_Device.H:502
void pie(int x, int y, int w, int h, double a1, double a2)
see fl_pie(int x, int y, int w, int h, double a1, double a2).
Definition: Fl_Cairo_Graphics_Driver.cxx:438
void line(int x1, int y1, int x2, int y2)
see fl_line(int x, int y, int x1, int y1).
Definition: Fl_Cairo_Graphics_Driver.cxx:451
void xyline(int x, int y, int x1)
see fl_xyline(int x, int y, int x1).
Definition: Fl_Cairo_Graphics_Driver.cxx:753
virtual void begin_points()
see fl_begin_points().
Definition: Fl_Cairo_Graphics_Driver.cxx:571
void end_polygon(void)
see fl_end_polygon().
Definition: Fl_Cairo_Graphics_Driver.cxx:679
void rectf(int x, int y, int w, int h)
see fl_rectf(int x, int y, int w, int h).
Definition: Fl_Cairo_Graphics_Driver.cxx:546
virtual void begin_complex_polygon()
see fl_begin_complex_polygon().
Definition: Fl_Cairo_Graphics_Driver.cxx:589
virtual void pop_matrix()
see fl_pop_matrix().
Definition: Fl_Cairo_Graphics_Driver.cxx:170
virtual void begin_loop()
see fl_begin_loop().
Definition: Fl_Cairo_Graphics_Driver.cxx:583
void end_complex_polygon(void)
see fl_end_complex_polygon().
Definition: Fl_Cairo_Graphics_Driver.cxx:660
void polygon(int x, int y, int x1, int y1, int x2, int y2)
see fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2).
Definition: Fl_Cairo_Graphics_Driver.cxx:706
void rect(int x, int y, int w, int h)
see fl_rect(int x, int y, int w, int h).
Definition: Fl_Cairo_Graphics_Driver.cxx:520
void end_line(void)
see fl_end_line().
Definition: Fl_Cairo_Graphics_Driver.cxx:595
void vertex(double x, double y)
see fl_vertex(double x, double y).
Definition: Fl_Cairo_Graphics_Driver.cxx:643
void arc(int x, int y, int w, int h, double a1, double a2)
see fl_arc(int x, int y, int w, int h, double a1, double a2).
Definition: Fl_Cairo_Graphics_Driver.cxx:416
void circle(double x, double y, double r)
see fl_circle(double x, double y, double r).
Definition: Fl_Cairo_Graphics_Driver.cxx:339
virtual void rotate(double d)
see fl_rotate(double d).
Definition: Fl_Cairo_Graphics_Driver.cxx:194
void line_style(int style, int width=0, char *dashes=0)
see fl_line_style(int style, int width, char* dashes).
Definition: Fl_Cairo_Graphics_Driver.cxx:212
void end_loop(void)
see fl_end_loop().
Definition: Fl_Cairo_Graphics_Driver.cxx:626
virtual void begin_line()
see fl_begin_line().
Definition: Fl_Cairo_Graphics_Driver.cxx:565
void draw(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy)
Draws an Fl_RGB_Image object to the device.
Definition: Fl_Cairo_Graphics_Driver.cxx:889
void gap()
see fl_gap().
Definition: Fl_Cairo_Graphics_Driver.cxx:655
virtual void begin_polygon()
see fl_begin_polygon().
Definition: Fl_Cairo_Graphics_Driver.cxx:577
void curve(double x, double y, double x1, double y1, double x2, double y2, double x3, double y3)
see fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3,...
Definition: Fl_Cairo_Graphics_Driver.cxx:698
virtual void mult_matrix(double a, double b, double c, double d, double x, double y)
see fl_mult_matrix(double a, double b, double c, double d, double x, double y).
Definition: Fl_Cairo_Graphics_Driver.cxx:201
void loop(int x, int y, int x1, int y1, int x2, int y2)
see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2).
Definition: Fl_Cairo_Graphics_Driver.cxx:729
void end_points(void)
see fl_end_points().
Definition: Fl_Cairo_Graphics_Driver.cxx:615
virtual void translate(double x, double y)
see fl_translate(double x, double y).
Definition: Fl_Cairo_Graphics_Driver.cxx:180
virtual void scale(double x, double y)
see fl_scale(double x, double y).
Definition: Fl_Cairo_Graphics_Driver.cxx:187
virtual void push_matrix()
see fl_push_matrix().
Definition: Fl_Cairo_Graphics_Driver.cxx:158
void yxline(int x, int y, int y1)
see fl_yxline(int x, int y, int y1).
Definition: Fl_Cairo_Graphics_Driver.cxx:815
This plugin socket allows the integration of new device drivers for special window or screen types.
Definition: Fl_Device.H:634
virtual const char * klass()
Returns the class name.
Definition: Fl_Device.H:640
virtual const char * name()=0
Returns the plugin name.
Fl_Device_Plugin(const char *name)
The constructor.
Definition: Fl_Device.H:637
virtual int print(Fl_Widget *w, int x, int y, int height)=0
Prints a widget.
All graphical output devices and all graphics systems.
Definition: Fl_Device.H:77
virtual const char * class_name()
Returns the name of the class of this object.
Definition: Fl_Device.H:90
virtual ~Fl_Device()
Virtual destructor.
Definition: Fl_Device.H:97
static const char * class_id
A string that identifies each subclass of Fl_Device.
Definition: Fl_Device.H:82
A display to which the computer can draw.
Definition: Fl_Device.H:617
const char * class_name()
Returns the name of the class of this object.
Definition: Fl_Device.H:622
static Fl_Display_Device * display_device()
Returns the platform display device.
Definition: Fl_Device.H:626
This a structure for an actual system font, with junk to help choose it and info on character sizes.
Definition: Fl_Font.H:50
The MSWindows-specific graphics class.
Definition: Fl_Device.H:448
int height()
see fl_height().
void draw(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy)
Draws an Fl_Bitmap object to the device.
void text_extents(const char *, int n, int &dx, int &dy, int &w, int &h)
see fl_text_extents(const char*, int n, int& dx, int& dy, int& w, int& h).
int descent()
see fl_descent().
void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy)
Draws an Fl_Pixmap object to the device.
void draw(int angle, const char *str, int n, int x, int y)
see fl_draw(int angle, const char *str, int n, int x, int y).
double width(unsigned int c)
see fl_width(unsigned int n).
void rtl_draw(const char *str, int n, int x, int y)
see fl_rtl_draw(const char *str, int n, int x, int y).
void font(Fl_Font face, Fl_Fontsize size)
see fl_font(Fl_Font face, Fl_Fontsize size).
double width(const char *str, int n)
see fl_width(const char *str, int n).
const char * class_name()
Returns the name of the class of this object.
Definition: Fl_Device.H:451
void draw(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy)
Draws an Fl_RGB_Image object to the device.
void draw(const char *str, int n, int x, int y)
see fl_draw(const char *str, int n, int x, int y).
A virtual class subclassed for each graphics driver FLTK uses.
Definition: Fl_Device.H:110
virtual int height()=0
see fl_height().
virtual int descent()=0
see fl_descent().
virtual void draw_image(Fl_Draw_Image_Cb cb, void *data, int X, int Y, int W, int H, int D=3)=0
see fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D).
friend FL_EXPORT void fl_draw_image_mono(Fl_Draw_Image_Cb cb, void *data, int X, int Y, int W, int H, int D)
Draws a gray-scale image using a callback function to generate image data.
virtual void draw_image(const uchar *buf, int X, int Y, int W, int H, int D=3, int L=0)=0
see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L).
virtual void draw(int angle, const char *str, int n, int x, int y)=0
see fl_draw(int angle, const char *str, int n, int x, int y).
virtual const char * class_name()
Returns the name of the class of this object.
Definition: Fl_Device.H:382
virtual void color(uchar r, uchar g, uchar b)=0
see fl_color(uchar r, uchar g, uchar b).
void font_descriptor(Fl_Font_Descriptor *d)
Sets the current Fl_Font_Descriptor for the graphics driver.
Definition: Fl_Device.H:404
Fl_Color color()
see fl_color(void).
Definition: Fl_Device.H:400
virtual void rtl_draw(const char *str, int n, int x, int y)=0
see fl_rtl_draw(const char *str, int n, int x, int y).
virtual void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy)=0
Draws an Fl_Pixmap object to the device.
static matrix * fl_matrix
Points to the current coordinate transformation matrix.
Definition: Fl_Device.H:144
virtual void draw(Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy)=0
Draws an Fl_RGB_Image object to the device.
virtual void scale(double x)
see fl_scale(double x).
Definition: Fl_Device.H:331
Fl_Font_Descriptor * font_descriptor()
Returns a pointer to the current Fl_Font_Descriptor for the graphics driver.
Definition: Fl_Device.H:402
virtual void draw(const char *str, int n, int x, int y)=0
see fl_draw(const char *str, int n, int x, int y).
virtual double width(const char *str, int n)=0
see fl_width(const char *str, int n).
virtual void scale(double x, double y)
see fl_scale(double x, double y).
Definition: Fl_Device.H:329
virtual void draw_image_mono(const uchar *buf, int X, int Y, int W, int H, int D=1, int L=0)=0
see fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L).
virtual void color(Fl_Color c)
see fl_color(Fl_Color c).
Definition: Fl_Device.H:262
virtual void translate(double x, double y)
see fl_translate(double x, double y).
Definition: Fl_Device.H:333
virtual void draw_image_mono(Fl_Draw_Image_Cb cb, void *data, int X, int Y, int W, int H, int D=1)=0
see fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D).
virtual ~Fl_Graphics_Driver()
The destructor.
Definition: Fl_Device.H:406
Fl_Fontsize size()
see fl_size().
Definition: Fl_Device.H:388
virtual void font(Fl_Font face, Fl_Fontsize size)
see fl_font(Fl_Font face, Fl_Fontsize size).
Definition: Fl_Device.H:384
Fl_Font font()
see fl_font(void).
Definition: Fl_Device.H:386
virtual void draw(Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy)=0
Draws an Fl_Bitmap object to the device.
virtual double width(unsigned int c)
see fl_width(unsigned int n).
Definition: Fl_Device.H:392
const char *const * data() const
Returns a pointer to the current image data array.
Definition: Fl_Image.H:118
int w() const
Returns the current image width in pixels.
Definition: Fl_Image.H:91
int h() const
Returns the current image height in pixels.
Definition: Fl_Image.H:94
int d() const
Returns the current image depth.
Definition: Fl_Image.H:100
The Fl_Pixmap class supports caching and drawing of colormap (pixmap) images, including transparency.
Definition: Fl_Pixmap.H:47
Fl_Plugin allows link-time and run-time integration of binary modules.
Definition: Fl_Plugin.H:70
The Mac OS X-specific graphics class.
Definition: Fl_Device.H:415
void draw(Fl_Bitmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy)
Draws an Fl_Bitmap object to the device.
int height()
see fl_height().
double width(unsigned int c)
see fl_width(unsigned int n).
void draw(Fl_RGB_Image *img, int XP, int YP, int WP, int HP, int cx, int cy)
Draws an Fl_RGB_Image object to the device.
void rtl_draw(const char *str, int n, int x, int y)
see fl_rtl_draw(const char *str, int n, int x, int y).
int descent()
see fl_descent().
void draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int HP, int cx, int cy)
Draws an Fl_Pixmap object to the device.
const char * class_name()
Returns the name of the class of this object.
Definition: Fl_Device.H:418
void draw(int angle, const char *str, int n, int x, int y)
see fl_draw(int angle, const char *str, int n, int x, int y).
void draw(const char *str, int n, int x, int y)
see fl_draw(const char *str, int n, int x, int y).
void text_extents(const char *, int n, int &dx, int &dy, int &w, int &h)
see fl_text_extents(const char*, int n, int& dx, int& dy, int& w, int& h).
void font(Fl_Font face, Fl_Fontsize size)
see fl_font(Fl_Font face, Fl_Fontsize size).
double width(const char *str, int n)
see fl_width(const char *str, int n).
The Fl_RGB_Image class supports caching and drawing of full-color images with 1 to 4 channels of colo...
Definition: Fl_Image.H:175
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0)
Draws the image with a bounding box.
Definition: Fl_Image.cxx:435
A surface that's susceptible to receive graphical output.
Definition: Fl_Device.H:592
void driver(Fl_Graphics_Driver *graphics_driver)
Sets the graphics driver of this drawing surface.
Definition: Fl_Device.H:605
virtual ~Fl_Surface_Device()
The destructor.
Definition: Fl_Device.H:611
Fl_Graphics_Driver * driver()
Returns the graphics driver of this drawing surface.
Definition: Fl_Device.H:607
Fl_Surface_Device(Fl_Graphics_Driver *graphics_driver)
Constructor that sets the graphics driver to use for the created surface.
Definition: Fl_Device.H:599
static Fl_Surface_Device * surface()
the surface that currently receives graphics output
Definition: Fl_Device.H:609
const char * class_name()
Returns the name of the class of this object.
Definition: Fl_Device.H:602
The Xlib-specific graphics class.
Definition: Fl_Device.H:478
const char * class_name()
Returns the name of the class of this object.
Definition: Fl_Device.H:481
double width(const char *str, int n)
see fl_width(const char *str, int n).
void draw_image_mono(const uchar *buf, int X, int Y, int W, int H, int D=1, int L=0)
see fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L).
Definition: fl_draw_image.cxx:538
double width(unsigned int c)
see fl_width(unsigned int n).
void rtl_draw(const char *str, int n, int x, int y)
see fl_rtl_draw(const char *str, int n, int x, int y).
void text_extents(const char *, int n, int &dx, int &dy, int &w, int &h)
see fl_text_extents(const char*, int n, int& dx, int& dy, int& w, int& h).
void draw(int angle, const char *str, int n, int x, int y)
see fl_draw(int angle, const char *str, int n, int x, int y).
int height()
see fl_height().
void draw_image(const uchar *buf, int X, int Y, int W, int H, int D=3, int L=0)
see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L).
Definition: fl_draw_image.cxx:531
int descent()
see fl_descent().
void font(Fl_Font face, Fl_Fontsize size)
see fl_font(Fl_Font face, Fl_Fontsize size).
void draw(const char *str, int n, int x, int y)
see fl_draw(const char *str, int n, int x, int y).
unsigned char uchar
unsigned char
Definition: fl_types.h:39
FL_EXPORT void gl_start()
Creates an OpenGL context.
Definition: gl_start.cxx:64
void fl_font(Fl_Font face, Fl_Fontsize size)
Sets the current font, which is then used in various drawing routines.
Definition: fl_draw.H:502
void fl_color(Fl_Color c)
Sets the color for all subsequent drawing operations.
Definition: fl_draw.H:61
void fl_push_no_clip()
Pushes an empty clip region onto the stack so nothing will be clipped.
Definition: fl_draw.H:104
void fl_begin_complex_polygon()
Starts drawing a complex filled polygon.
Definition: fl_draw.H:448
void fl_vertex(double x, double y)
Adds a single vertex to the current path.
Definition: fl_draw.H:390
void fl_point(int x, int y)
Draws a single pixel at the given coordinates.
Definition: fl_draw.H:156
void fl_gap()
Call fl_gap() to separate loops of the path.
Definition: fl_draw.H:455
void fl_rectf(int x, int y, int w, int h)
Colors with current color a rectangle that exactly fills the given bounding box.
Definition: fl_draw.H:217
int fl_not_clipped(int x, int y, int w, int h)
Does the rectangle intersect the current clip region?
Definition: fl_draw.H:123
void fl_translate(double x, double y)
Concatenates translation transformation onto the current one.
Definition: fl_draw.H:356
void fl_begin_points()
Starts drawing a list of points.
Definition: fl_draw.H:373
double fl_transform_dy(double x, double y)
Transforms distance using current transformation matrix.
Definition: fl_draw.H:480
void fl_arc(int x, int y, int w, int h, double a1, double a2)
Draw ellipse sections using integer coordinates.
Definition: fl_draw.H:315
void fl_begin_loop()
Starts drawing a closed sequence of lines.
Definition: fl_draw.H:381
void fl_transformed_vertex(double xf, double yf)
Adds coordinate pair to the vertex list without further transformations.
Definition: fl_draw.H:485
void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3)
Adds a series of points on a Bezier curve to the path.
Definition: fl_draw.H:399
void fl_rtl_draw(const char *str, int n, int x, int y)
Draws an array of n characters right to left starting at given location.
Definition: fl_draw.H:615
double fl_transform_dx(double x, double y)
Transforms distance using current transformation matrix.
Definition: fl_draw.H:475
void fl_end_loop()
Ends closed sequence of lines, and draws.
Definition: fl_draw.H:429
void fl_scale(double x, double y)
Concatenates scaling transformation onto the current one.
Definition: fl_draw.H:346
void fl_begin_polygon()
Starts drawing a convex filled polygon.
Definition: fl_draw.H:385
void fl_rect(int x, int y, int w, int h)
Draws a 1-pixel border inside the given bounding box.
Definition: fl_draw.H:212
int fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H)
Intersects the rectangle with the current clip region and returns the bounding box of the result.
Definition: fl_draw.H:135
void fl_line_style(int style, int width=0, char *dashes=0)
Sets how to draw lines (the "pen").
Definition: fl_draw.H:186
void fl_pop_clip()
Restores the previous clip region.
Definition: fl_draw.H:112
void fl_loop(int x, int y, int x1, int y1, int x2, int y2)
Outlines a 3-sided polygon with lines.
Definition: fl_draw.H:244
void fl_yxline(int x, int y, int y1)
Draws a vertical line from (x,y) to (x,y1)
Definition: fl_draw.H:281
void fl_polygon(int x, int y, int x1, int y1, int x2, int y2)
Fills a 3-sided polygon.
Definition: fl_draw.H:255
void fl_end_line()
Ends list of lines, and draws.
Definition: fl_draw.H:425
void fl_pop_matrix()
Restores the current transformation matrix from the stack.
Definition: fl_draw.H:341
void fl_clip_region(Fl_Region r)
Replaces the top of the clipping stack with a clipping region of any shape.
Definition: fl_draw.H:145
void fl_rotate(double d)
Concatenates rotation transformation onto the current one.
Definition: fl_draw.H:361
void fl_pie(int x, int y, int w, int h, double a1, double a2)
Draw filled ellipse sections using integer coordinates.
Definition: fl_draw.H:328
void fl_mult_matrix(double a, double b, double c, double d, double x, double y)
Concatenates another transformation onto the current one.
Definition: fl_draw.H:368
double fl_transform_x(double x, double y)
Transforms coordinate using the current transformation matrix.
Definition: fl_draw.H:465
void fl_push_clip(int x, int y, int w, int h)
Intersects the current clip region with a rectangle and pushes this new region onto the stack.
Definition: fl_draw.H:91
void fl_circle(double x, double y, double r)
fl_circle() is equivalent to fl_arc(x,y,r,0,360), but may be faster.
Definition: fl_draw.H:417
void fl_push_matrix()
Saves the current transformation matrix on the stack.
Definition: fl_draw.H:337
void fl_end_complex_polygon()
Ends complex filled polygon, and draws.
Definition: fl_draw.H:459
FL_EXPORT void fl_draw(const char *str, int x, int y)
Draws a nul-terminated string starting at the given location.
Definition: fl_font.cxx:73
void fl_xyline(int x, int y, int x1)
Draws a horizontal line from (x,y) to (x1,y)
Definition: fl_draw.H:266
void fl_end_polygon()
Ends convex filled polygon, and draws.
Definition: fl_draw.H:433
void fl_begin_line()
Starts drawing a list of lines.
Definition: fl_draw.H:377
void fl_line(int x, int y, int x1, int y1)
Draws a line from (x,y) to (x1,y1)
Definition: fl_draw.H:234
double fl_transform_y(double x, double y)
Transforms coordinate using the current transformation matrix.
Definition: fl_draw.H:470
void fl_end_points()
Ends list of points, and draws.
Definition: fl_draw.H:421
void fl_restore_clip()
Undoes any clobbering of clip done by your program.
Definition: fl_draw.H:138
void fl_draw_image(const uchar *buf, int X, int Y, int W, int H, int D=3, int L=0)
Draws an 8-bit per color RGB or luminance image.
Definition: fl_draw.H:668
void fl_draw_image_mono(const uchar *buf, int X, int Y, int W, int H, int D=1, int L=0)
Draws a gray-scale (1 channel) image.
Definition: fl_draw.H:675
A 2D coordinate transformation matrix.
Definition: Fl_Device.H:114