Fl_Graphics_Driver Class Reference

A virtual class subclassed for each graphics driver FLTK uses. More...

`#include <Fl_Device.H>`

Inheritance diagram for Fl_Graphics_Driver:

## Classes

struct | matrix
| A 2D coordinate transformation matrix. More...

## Public Member Functions

virtual const char * | class_name ()
| Returns the name of the class of this object. More...
Fl_Color | color ()
| see fl_color(void). More...
virtual int | descent ()
| see fl_descent(). More...
virtual void | font (Fl_Font face, Fl_Fontsize fsize)
| see fl_font(Fl_Font face, Fl_Fontsize size). More...
Fl_Font | font ()
| see fl_font(void). More...
Fl_Font_Descriptor * | font_descriptor ()
| Returns a pointer to the current Fl_Font_Descriptor for the graphics driver.
void | font_descriptor (Fl_Font_Descriptor *d)
| Sets the current Fl_Font_Descriptor for the graphics driver.
virtual int | height ()
| see fl_height(). More...
Fl_Fontsize | size ()
| see fl_size(). More...
virtual 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). More...
virtual double | width (const char *str, int n)
| see fl_width(const char *str, int n). More...
virtual double | width (unsigned int c)
| see fl_width(unsigned int n). More...
virtual | ~Fl_Graphics_Driver ()
| The destructor.
Public Member Functions inherited from Fl_Device
virtual | ~Fl_Device ()
| Virtual destructor. More...

## Static Public Attributes

static const char * | class_id = "Fl_Graphics_Driver"
Static Public Attributes inherited from Fl_Device
static const char * | class_id = "Fl_Device"
| A string that identifies each subclass of Fl_Device. More...

## Protected Member Functions

virtual void | arc (double x, double y, double r, double start, double end)
| see fl_arc(double x, double y, double r, double start, double end). More...
virtual 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). More...
virtual void | begin_complex_polygon ()
| see fl_begin_complex_polygon(). More...
virtual void | begin_line ()
| see fl_begin_line(). More...
virtual void | begin_loop ()
| see fl_begin_loop(). More...
virtual void | begin_points ()
| see fl_begin_points(). More...
virtual void | begin_polygon ()
| see fl_begin_polygon(). More...
virtual void | circle (double x, double y, double r)
| see fl_circle(double x, double y, double r). More...
virtual int | clip_box (int x, int y, int w, int h, int &X, int &Y, int &W, int &H)
| see fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H). More...
Fl_Region | clip_region ()
| see fl_clip_region(). More...
void | clip_region (Fl_Region r)
| see fl_clip_region(Fl_Region r). More...
virtual void | color (Fl_Color c)
| see fl_color(Fl_Color c). More...
virtual void | color (uchar r, uchar g, uchar b)
| see fl_color(uchar r, uchar g, uchar b). More...
void | copy_offscreen (int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy)
| see fl_copy_offscreen()
virtual void | curve (double X0, double Y0, 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, double Y3). More...
virtual void | draw (const char *str, int n, int x, int y)
| see fl_draw(const char *str, int n, int x, int y). More...
virtual 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). More...
virtual void | draw (Fl_RGB_Image *rgb, int XP, int YP, int WP, int HP, int cx, int cy)
| Draws an Fl_RGB_Image object to the device. More...
virtual 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. More...
virtual void | draw (Fl_Bitmap *bm, int XP, int YP, int WP, int HP, int cx, int cy)
| Draws an Fl_Bitmap object to the device. More...
virtual 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). More...
virtual void | draw_image (Fl_Draw_Image_Cb cb, void *data, int X, int Y, int W, int H, int D=3)
| see fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D). More...
virtual 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). More...
virtual void | draw_image_mono (Fl_Draw_Image_Cb cb, void *data, int X, int Y, int W, int H, int D=1)
| see fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D). More...
virtual void | end_complex_polygon ()
| see fl_end_complex_polygon(). More...
virtual void | end_line ()
| see fl_end_line(). More...
virtual void | end_loop ()
| see fl_end_loop(). More...
virtual void | end_points ()
| see fl_end_points(). More...
virtual void | end_polygon ()
| see fl_end_polygon(). More...
| Fl_Graphics_Driver ()
| The constructor. More...
virtual void | gap ()
| see fl_gap(). More...
virtual void | line (int x, int y, int x1, int y1)
| see fl_line(int x, int y, int x1, int y1). More...
virtual void | line (int x, int y, int x1, int y1, int x2, int y2)
| see fl_line(int x, int y, int x1, int y1, int x2, int y2). More...
virtual void | line_style (int style, int width=0, char *dashes=0)
| see fl_line_style(int style, int width, char* dashes). More...
virtual void | loop (int x0, int y0, int x1, int y1, int x2, int y2)
| see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2). More...
virtual void | loop (int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3)
| see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3). More...
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). More...
virtual int | not_clipped (int x, int y, int w, int h)
| see fl_not_clipped(int x, int y, int w, int h). More...
virtual 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). More...
virtual void | point (int x, int y)
| see fl_point(int x, int y). More...
virtual void | polygon (int x0, int y0, int x1, int y1, int x2, int y2)
| see fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2). More...
virtual void | polygon (int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3)
| see fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3). More...
virtual void | pop_clip ()
| see fl_pop_clip(). More...
void | pop_matrix ()
| see fl_pop_matrix(). More...
virtual void | push_clip (int x, int y, int w, int h)
| see fl_push_clip(int x, int y, int w, int h). More...
void | push_matrix ()
| see fl_push_matrix(). More...
virtual void | push_no_clip ()
| see fl_push_no_clip(). More...
virtual void | rect (int x, int y, int w, int h)
| see fl_rect(int x, int y, int w, int h). More...
virtual void | rectf (int x, int y, int w, int h)
| see fl_rectf(int x, int y, int w, int h). More...
void | restore_clip ()
| see fl_restore_clip(). More...
void | rotate (double d)
| see fl_rotate(double d). More...
virtual 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). More...
void | scale (double x, double y)
| see fl_scale(double x, double y). More...
void | scale (double x)
| see fl_scale(double x). More...
double | transform_dx (double x, double y)
| see fl_transform_dx(double x, double y). More...
double | transform_dy (double x, double y)
| see fl_transform_dy(double x, double y). More...
double | transform_x (double x, double y)
| see fl_transform_x(double x, double y). More...
double | transform_y (double x, double y)
| see fl_transform_y(double x, double y). More...
virtual void | transformed_vertex (double xf, double yf)
| see fl_transformed_vertex(double xf, double yf). More...
void | translate (double x, double y)
| see fl_translate(double x, double y). More...
virtual void | vertex (double x, double y)
| see fl_vertex(double x, double y). More...
virtual void | xyline (int x, int y, int x1)
| see fl_xyline(int x, int y, int x1). More...
virtual void | xyline (int x, int y, int x1, int y2)
| see fl_xyline(int x, int y, int x1, int y2). More...
virtual void | xyline (int x, int y, int x1, int y2, int x3)
| see fl_xyline(int x, int y, int x1, int y2, int x3). More...
virtual void | yxline (int x, int y, int y1)
| see fl_yxline(int x, int y, int y1). More...
virtual void | yxline (int x, int y, int y1, int x2)
| see fl_yxline(int x, int y, int y1, int x2). More...
virtual void | yxline (int x, int y, int y1, int x2, int y3)
| see fl_yxline(int x, int y, int y1, int x2, int y3). More...

## Protected Attributes

matrix * | fl_matrix
| Points to the current coordinate transformation matrix.

## Friends

void | fl_arc (double x, double y, double r, double start, double end)
| Adds a series of points to the current path on the arc of a circle. More...
void | fl_arc (int x, int y, int w, int h, double a1, double a2)
| Draw ellipse sections using integer coordinates. More...
void | fl_begin_complex_polygon ()
| Starts drawing a complex filled polygon. More...
void | fl_begin_line ()
| Starts drawing a list of lines.
void | fl_begin_loop ()
| Starts drawing a closed sequence of lines.
void | fl_begin_points ()
| Starts drawing a list of points. More...
void | fl_begin_polygon ()
| Starts drawing a convex filled polygon.
class | Fl_Bitmap
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. More...
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. More...
Fl_Region | fl_clip_region ()
| Returns the current clipping region.
void | fl_clip_region (Fl_Region r)
| Replaces the top of the clipping stack with a clipping region of any shape. More...
void | fl_color (Fl_Color c)
| Sets the color for all subsequent drawing operations. More...
void | fl_color (uchar r, uchar g, uchar b)
| Sets the color for all subsequent drawing operations. More...
void | fl_copy_offscreen (int x, int y, int w, int h, Fl_Offscreen pixmap, int srcx, int srcy)
| Copy a rectangular area of the given offscreen buffer into the current drawing destination. More...
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. More...
void | fl_draw (const char *str, int n, int x, int y)
| Draws starting at the given `x`, `y` location a UTF-8 string of length `n` bytes.
void | fl_draw (int angle, const char *str, int n, int x, int y)
| Draws at the given `x`, `y` location a UTF-8 string of length `n` bytes rotating `angle` degrees counter-clockwise.
void | fl_draw_image (const uchar *buf, int X, int Y, int W, int H, int D, int L)
| Draws an 8-bit per color RGB or luminance image. More...
void | fl_draw_image (Fl_Draw_Image_Cb cb, void *data, int X, int Y, int W, int H, int D)
| Draws an image using a callback function to generate image data. More...
void | fl_draw_image_mono (const uchar *buf, int X, int Y, int W, int H, int D, int L)
| Draws a gray-scale (1 channel) image. More...
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. More...
void | fl_end_complex_polygon ()
| Ends complex filled polygon, and draws.
void | fl_end_line ()
| Ends list of lines, and draws.
void | fl_end_loop ()
| Ends closed sequence of lines, and draws.
void | fl_end_points ()
| Ends list of points, and draws.
void | fl_end_polygon ()
| Ends convex filled polygon, and draws.
void | fl_font (Fl_Font face, Fl_Fontsize size)
| Sets the current font, which is then used in various drawing routines. More...
void | fl_gap ()
| Call fl_gap() to separate loops of the path. More...
void | fl_line (int x, int y, int x1, int y1)
| Draws a line from (x,y) to (x1,y1)
void | fl_line (int x, int y, int x1, int y1, int x2, int y2)
| Draws a line from (x,y) to (x1,y1) and another from (x1,y1) to (x2,y2)
void | fl_line_style (int style, int width, char *dashes)
| Sets how to draw lines (the "pen"). More...
void | fl_loop (int x0, int y0, int x1, int y1, int x2, int y2)
| Outlines a 3-sided polygon with lines.
void | fl_loop (int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3)
| Outlines a 4-sided polygon with lines.
void | fl_mult_matrix (double a, double b, double c, double d, double x, double y)
| Concatenates another transformation onto the current one. More...
int | fl_not_clipped (int x, int y, int w, int h)
| Does the rectangle intersect the current clip region? More...
void | fl_pie (int x, int y, int w, int h, double a1, double a2)
| Draw filled ellipse sections using integer coordinates. More...
class | Fl_Pixmap
void | fl_point (int x, int y)
| Draws a single pixel at the given coordinates.
void | fl_polygon (int x0, int y0, int x1, int y1, int x2, int y2)
| Fills a 3-sided polygon. More...
void | fl_polygon (int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3)
| Fills a 4-sided polygon. More...
void | fl_pop_clip ()
| Restores the previous clip region. More...
void | fl_pop_matrix ()
| Restores the current transformation matrix from the stack.
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. More...
void | fl_push_matrix ()
| Saves the current transformation matrix on the stack. More...
void | fl_push_no_clip ()
| Pushes an empty clip region onto the stack so nothing will be clipped.
void | fl_rect (int x, int y, int w, int h)
| Draws a 1-pixel border inside the given bounding box. More...
void | fl_rectf (int x, int y, int w, int h)
| Colors with current color a rectangle that exactly fills the given bounding box.
void | fl_restore_clip ()
| Undoes any clobbering of clip done by your program.
class | Fl_RGB_Image
void | fl_rotate (double d)
| Concatenates rotation transformation onto the current one. More...
void | fl_rtl_draw (const char *str, int n, int x, int y)
| Draws a UTF-8 string of length `n` bytes right to left starting at the given `x`, `y` location.
void | fl_scale (double x, double y)
| Concatenates scaling transformation onto the current one. More...
void | fl_scale (double x)
| Concatenates scaling transformation onto the current one. More...
double | fl_transform_dx (double x, double y)
| Transforms distance using current transformation matrix. More...
double | fl_transform_dy (double x, double y)
| Transforms distance using current transformation matrix. More...
double | fl_transform_x (double x, double y)
| Transforms coordinate using the current transformation matrix. More...
double | fl_transform_y (double x, double y)
| Transforms coordinate using the current transformation matrix. More...
void | fl_transformed_vertex (double xf, double yf)
| Adds coordinate pair to the vertex list without further transformations. More...
void | fl_translate (double x, double y)
| Concatenates translation transformation onto the current one. More...
void | fl_vertex (double x, double y)
| Adds a single vertex to the current path. More...
void | fl_xyline (int x, int y, int x1)
| Draws a horizontal line from (x,y) to (x1,y)
void | fl_xyline (int x, int y, int x1, int y2)
| Draws a horizontal line from (x,y) to (x1,y), then vertical from (x1,y) to (x1,y2)
void | fl_xyline (int x, int y, int x1, int y2, int x3)
| Draws a horizontal line from (x,y) to (x1,y), then a vertical from (x1,y) to (x1,y2) and then another horizontal from (x1,y2) to (x3,y2)
void | fl_yxline (int x, int y, int y1)
| Draws a vertical line from (x,y) to (x,y1)
void | fl_yxline (int x, int y, int y1, int x2)
| Draws a vertical line from (x,y) to (x,y1), then a horizontal from (x,y1) to (x2,y1)
void | fl_yxline (int x, int y, int y1, int x2, int y3)
| Draws a vertical line from (x,y) to (x,y1) then a horizontal from (x,y1) to (x2,y1), then another vertical from (x2,y1) to (x2,y3)
FL_EXPORT void | gl_start ()
| Creates an OpenGL context.

## Detailed Description

A virtual class subclassed for each graphics driver FLTK uses.

The virtual methods of this class are those that a graphics driver should implement to support all of FLTK drawing functions.
The public API for drawing operations is functionally presented in Drawing Things in FLTK and as function lists in the Drawing functions and Color & Font functions modules.

## Constructor & Destructor Documentation

Fl_Graphics_Driver::Fl_Graphics_Driver | ( |  | ) |

protected

The constructor.

## Member Function Documentation

void Fl_Graphics_Driver::arc | ( | double | x,
|  | double | y,
|  | double | r,
|  | double | start,
|  | double | end
| ) |  |

protectedvirtual

see fl_arc(double x, double y, double r, double start, double end).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::arc | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | double | a1,
|  | double | a2
| ) |  |

protectedvirtual

see fl_arc(int x, int y, int w, int h, double a1, double a2).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::begin_complex_polygon | ( |  | ) |

protectedvirtual

see fl_begin_complex_polygon().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::begin_line | ( |  | ) |

protectedvirtual

see fl_begin_line().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::begin_loop | ( |  | ) |

protectedvirtual

see fl_begin_loop().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::begin_points | ( |  | ) |

protectedvirtual

see fl_begin_points().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::begin_polygon | ( |  | ) |

protectedvirtual

see fl_begin_polygon().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::circle | ( | double | x,
|  | double | y,
|  | double | r
| ) |  |

protectedvirtual

see fl_circle(double x, double y, double r).

Reimplemented in Fl_PostScript_Graphics_Driver.

virtual const char* Fl_Graphics_Driver::class_name | ( |  | ) |

inlinevirtual

Returns the name of the class of this object.

Use of the class_name() function is discouraged because it will be removed from future FLTK versions.

The class of an instance of an Fl_Device subclass can be checked with code such as:

if ( instance->class_name() == Fl_Printer::class_id ) { ... }

Reimplemented from Fl_Device.

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Printer_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

int Fl_Graphics_Driver::clip_box | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | int & | X,
|  | int & | Y,
|  | int & | W,
|  | int & | H
| ) |  |

protectedvirtual

see fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H).

Reimplemented in Fl_PostScript_Graphics_Driver.

Fl_Region Fl_Graphics_Driver::clip_region | ( |  | ) |

protected

see fl_clip_region().

void Fl_Graphics_Driver::clip_region | ( | Fl_Region | r | ) |

protected

see fl_clip_region(Fl_Region r).

virtual void Fl_Graphics_Driver::color | ( | Fl_Color | c | ) |

inlineprotectedvirtual

see fl_color(Fl_Color c).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::color | ( | uchar | r,
|  | uchar | g,
|  | uchar | b
| ) |  |

inlineprotectedvirtual

see fl_color(uchar r, uchar g, uchar b).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

Fl_Color Fl_Graphics_Driver::color | ( |  | ) |

inline

see fl_color(void).

void Fl_Graphics_Driver::curve | ( | double | X0,
|  | double | Y0,
|  | double | X1,
|  | double | Y1,
|  | double | X2,
|  | double | Y2,
|  | double | X3,
|  | double | Y3
| ) |  |

protectedvirtual

see fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3).

Reimplemented in Fl_PostScript_Graphics_Driver.

virtual int Fl_Graphics_Driver::descent | ( |  | ) |

inlinevirtual

see fl_descent().

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::draw | ( | const char * | str,
|  | int | n,
|  | int | x,
|  | int | y
| ) |  |

inlineprotectedvirtual

see fl_draw(const char *str, int n, int x, int y).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::draw | ( | int | angle,
|  | const char * | str,
|  | int | n,
|  | int | x,
|  | int | y
| ) |  |

inlineprotectedvirtual

see fl_draw(int angle, const char *str, int n, int x, int y).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::draw | ( | Fl_RGB_Image * | rgb,
|  | int | XP,
|  | int | YP,
|  | int | WP,
|  | int | HP,
|  | int | cx,
|  | int | cy
| ) |  |

inlineprotectedvirtual

Draws an Fl_RGB_Image object to the device.

Specifies a bounding box for the image, with the origin (upper left-hand corner) of the image offset by the cx and cy arguments.

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::draw | ( | Fl_Pixmap * | pxm,
|  | int | XP,
|  | int | YP,
|  | int | WP,
|  | int | HP,
|  | int | cx,
|  | int | cy
| ) |  |

inlineprotectedvirtual

Draws an Fl_Pixmap object to the device.

Specifies a bounding box for the image, with the origin (upper left-hand corner) of the image offset by the cx and cy arguments.

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Printer_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::draw | ( | Fl_Bitmap * | bm,
|  | int | XP,
|  | int | YP,
|  | int | WP,
|  | int | HP,
|  | int | cx,
|  | int | cy
| ) |  |

inlineprotectedvirtual

Draws an Fl_Bitmap object to the device.

Specifies a bounding box for the image, with the origin (upper left-hand corner) of the image offset by the cx and cy arguments.

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::draw_image | ( | const uchar * | buf,
|  | int | X,
|  | int | Y,
|  | int | W,
|  | int | H,
|  | int | D = `3`,
|  | int | L = `0`
| ) |  |

inlineprotectedvirtual

see fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::draw_image | ( | Fl_Draw_Image_Cb | cb,
|  | void * | data,
|  | int | X,
|  | int | Y,
|  | int | W,
|  | int | H,
|  | int | D = `3`
| ) |  |

inlineprotectedvirtual

see fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::draw_image_mono | ( | const uchar * | buf,
|  | int | X,
|  | int | Y,
|  | int | W,
|  | int | H,
|  | int | D = `1`,
|  | int | L = `0`
| ) |  |

inlineprotectedvirtual

see fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D, int L).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::draw_image_mono | ( | Fl_Draw_Image_Cb | cb,
|  | void * | data,
|  | int | X,
|  | int | Y,
|  | int | W,
|  | int | H,
|  | int | D = `1`
| ) |  |

inlineprotectedvirtual

see fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::end_complex_polygon | ( |  | ) |

protectedvirtual

see fl_end_complex_polygon().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::end_line | ( |  | ) |

protectedvirtual

see fl_end_line().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::end_loop | ( |  | ) |

protectedvirtual

see fl_end_loop().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::end_points | ( |  | ) |

protectedvirtual

see fl_end_points().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::end_polygon | ( |  | ) |

protectedvirtual

see fl_end_polygon().

Reimplemented in Fl_PostScript_Graphics_Driver.

virtual void Fl_Graphics_Driver::font | ( | Fl_Font | face,
|  | Fl_Fontsize | fsize
| ) |  |

inlinevirtual

see fl_font(Fl_Font face, Fl_Fontsize size).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

Fl_Font Fl_Graphics_Driver::font | ( |  | ) |

inline

see fl_font(void).

void Fl_Graphics_Driver::gap | ( |  | ) |

protectedvirtual

see fl_gap().

Reimplemented in Fl_PostScript_Graphics_Driver.

virtual int Fl_Graphics_Driver::height | ( |  | ) |

inlinevirtual

see fl_height().

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::line | ( | int | x,
|  | int | y,
|  | int | x1,
|  | int | y1
| ) |  |

protectedvirtual

see fl_line(int x, int y, int x1, int y1).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::line | ( | int | x,
|  | int | y,
|  | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2
| ) |  |

protectedvirtual

see fl_line(int x, int y, int x1, int y1, int x2, int y2).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::line_style | ( | int | style,
|  | int | width = `0`,
|  | char * | dashes = `0`
| ) |  |

protectedvirtual

see fl_line_style(int style, int width, char* dashes).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::loop | ( | int | x0,
|  | int | y0,
|  | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2
| ) |  |

protectedvirtual

see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::loop | ( | int | x0,
|  | int | y0,
|  | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2,
|  | int | x3,
|  | int | y3
| ) |  |

protectedvirtual

see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::mult_matrix | ( | double | a,
|  | double | b,
|  | double | c,
|  | double | d,
|  | double | x,
|  | double | y
| ) |  |

protected

see fl_mult_matrix(double a, double b, double c, double d, double x, double y).

int Fl_Graphics_Driver::not_clipped | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

protectedvirtual

see fl_not_clipped(int x, int y, int w, int h).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::pie | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | double | a1,
|  | double | a2
| ) |  |

protectedvirtual

see fl_pie(int x, int y, int w, int h, double a1, double a2).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::point | ( | int | x,
|  | int | y
| ) |  |

protectedvirtual

see fl_point(int x, int y).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::polygon | ( | int | x0,
|  | int | y0,
|  | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2
| ) |  |

protectedvirtual

see fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::polygon | ( | int | x0,
|  | int | y0,
|  | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2,
|  | int | x3,
|  | int | y3
| ) |  |

protectedvirtual

see fl_polygon(int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::pop_clip | ( |  | ) |

protectedvirtual

see fl_pop_clip().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::pop_matrix | ( |  | ) |

protected

see fl_pop_matrix().

void Fl_Graphics_Driver::push_clip | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

protectedvirtual

see fl_push_clip(int x, int y, int w, int h).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::push_matrix | ( |  | ) |

protected

see fl_push_matrix().

void Fl_Graphics_Driver::push_no_clip | ( |  | ) |

protectedvirtual

see fl_push_no_clip().

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::rect | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

protectedvirtual

see fl_rect(int x, int y, int w, int h).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::rectf | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

protectedvirtual

see fl_rectf(int x, int y, int w, int h).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::restore_clip | ( |  | ) |

protected

see fl_restore_clip().

void Fl_Graphics_Driver::rotate | ( | double | d | ) |

protected

see fl_rotate(double d).

virtual void Fl_Graphics_Driver::rtl_draw | ( | const char * | str,
|  | int | n,
|  | int | x,
|  | int | y
| ) |  |

inlineprotectedvirtual

see fl_rtl_draw(const char *str, int n, int x, int y).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::scale | ( | double | x,
|  | double | y
| ) |  |

inlineprotected

see fl_scale(double x, double y).

void Fl_Graphics_Driver::scale | ( | double | x | ) |

inlineprotected

see fl_scale(double x).

Fl_Fontsize Fl_Graphics_Driver::size | ( |  | ) |

inline

see fl_size().

void Fl_Graphics_Driver::text_extents | ( | const char * | t,
|  | int | n,
|  | int & | dx,
|  | int & | dy,
|  | int & | w,
|  | int & | h
| ) |  |

virtual

see fl_text_extents(const char*, int n, int& dx, int& dy, int& w, int& h).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

double Fl_Graphics_Driver::transform_dx | ( | double | x,
|  | double | y
| ) |  |

protected

see fl_transform_dx(double x, double y).

double Fl_Graphics_Driver::transform_dy | ( | double | x,
|  | double | y
| ) |  |

protected

see fl_transform_dy(double x, double y).

double Fl_Graphics_Driver::transform_x | ( | double | x,
|  | double | y
| ) |  |

protected

see fl_transform_x(double x, double y).

double Fl_Graphics_Driver::transform_y | ( | double | x,
|  | double | y
| ) |  |

protected

see fl_transform_y(double x, double y).

void Fl_Graphics_Driver::transformed_vertex | ( | double | xf,
|  | double | yf
| ) |  |

protectedvirtual

see fl_transformed_vertex(double xf, double yf).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::translate | ( | double | x,
|  | double | y
| ) |  |

inlineprotected

see fl_translate(double x, double y).

void Fl_Graphics_Driver::vertex | ( | double | x,
|  | double | y
| ) |  |

protectedvirtual

see fl_vertex(double x, double y).

Reimplemented in Fl_PostScript_Graphics_Driver.

virtual double Fl_Graphics_Driver::width | ( | const char * | str,
|  | int | n
| ) |  |

inlinevirtual

see fl_width(const char *str, int n).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, Fl_Quartz_Graphics_Driver, and Fl_PostScript_Graphics_Driver.

virtual double Fl_Graphics_Driver::width | ( | unsigned int | c | ) |

inlinevirtual

see fl_width(unsigned int n).

Reimplemented in Fl_Xlib_Graphics_Driver, Fl_GDI_Graphics_Driver, and Fl_Quartz_Graphics_Driver.

void Fl_Graphics_Driver::xyline | ( | int | x,
|  | int | y,
|  | int | x1
| ) |  |

protectedvirtual

see fl_xyline(int x, int y, int x1).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::xyline | ( | int | x,
|  | int | y,
|  | int | x1,
|  | int | y2
| ) |  |

protectedvirtual

see fl_xyline(int x, int y, int x1, int y2).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::xyline | ( | int | x,
|  | int | y,
|  | int | x1,
|  | int | y2,
|  | int | x3
| ) |  |

protectedvirtual

see fl_xyline(int x, int y, int x1, int y2, int x3).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::yxline | ( | int | x,
|  | int | y,
|  | int | y1
| ) |  |

protectedvirtual

see fl_yxline(int x, int y, int y1).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::yxline | ( | int | x,
|  | int | y,
|  | int | y1,
|  | int | x2
| ) |  |

protectedvirtual

see fl_yxline(int x, int y, int y1, int x2).

Reimplemented in Fl_PostScript_Graphics_Driver.

void Fl_Graphics_Driver::yxline | ( | int | x,
|  | int | y,
|  | int | y1,
|  | int | x2,
|  | int | y3
| ) |  |

protectedvirtual

see fl_yxline(int x, int y, int y1, int x2, int y3).

Reimplemented in Fl_PostScript_Graphics_Driver.

## Friends And Related Function Documentation

void fl_arc | ( | double | x,
|  | double | y,
|  | double | r,
|  | double | start,
|  | double | end
| ) |  |

friend

Adds a series of points to the current path on the arc of a circle.

You can get elliptical paths by using scale and rotate before calling fl_arc().

Parameters

  [in] | x,y,r | center and radius of circular arc
  [in] | start,end | angles of start and end of arc measured in degrees counter-clockwise from 3 o'clock. If `end` is less than `start` then it draws the arc in a clockwise direction.

void fl_arc | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | double | a1,
|  | double | a2
| ) |  |

friend

Draw ellipse sections using integer coordinates.

These functions match the rather limited circle drawing code provided by X and WIN32. The advantage over using fl_arc with floating point coordinates is that they are faster because they often use the hardware, and they draw much nicer small circles, since the small sizes are often hard-coded bitmaps.

If a complete circle is drawn it will fit inside the passed bounding box. The two angles are measured in degrees counter-clockwise from 3 o'clock and are the starting and ending angle of the arc, `a2` must be greater or equal to `a1`.

fl_arc() draws a series of lines to approximate the arc. Notice that the integer version of fl_arc() has a different number of arguments than the double version fl_arc(double x, double y, double r, double start, double end)

Parameters

  [in] | x,y,w,h | bounding box of complete circle
  [in] | a1,a2 | start and end angles of arc measured in degrees counter-clockwise from 3 o'clock. `a2` must be greater than or equal to `a1`.

void fl_begin_complex_polygon | ( |  | ) |

friend

Starts drawing a complex filled polygon.

The polygon may be concave, may have holes in it, or may be several disconnected pieces. Call fl_gap() to separate loops of the path.

To outline the polygon, use fl_begin_loop() and replace each fl_gap() with fl_end_loop();fl_begin_loop() pairs.

Note
  For portability, you should only draw polygons that appear the same whether "even/odd" or "non-zero" winding rules are used to fill them. Holes should be drawn in the opposite direction to the outside loop.

void fl_begin_points | ( |  | ) |

friend

Starts drawing a list of points.

Points are added to the list with fl_vertex()

void fl_circle | ( | double | x,
|  | double | y,
|  | double | r
| ) |  |

friend

fl_circle() is equivalent to fl_arc(x,y,r,0,360), but may be faster.

It must be the only thing in the path: if you want a circle as part of a complex polygon you must use fl_arc()

Parameters

  [in] | x,y,r | center and radius of circle

int fl_clip_box | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | int & | X,
|  | int & | Y,
|  | int & | W,
|  | int & | H
| ) |  |

friend

Intersects the rectangle with the current clip region and returns the bounding box of the result.

Returns non-zero if the resulting rectangle is different to the original. This can be used to limit the necessary drawing to a rectangle. `W` and `H` are set to zero if the rectangle is completely outside the region.

Parameters

  [in] | x,y,w,h | position and size of rectangle
  [out] | X,Y,W,H | position and size of resulting bounding box.

Returns
  Non-zero if the resulting rectangle is different to the original.

void fl_clip_region | ( | Fl_Region | r | ) |

friend

Replaces the top of the clipping stack with a clipping region of any shape.

Fl_Region is an operating system specific type.

Parameters

  [in] | r | clipping region

void fl_color | ( | Fl_Color | c | ) |

friend

Sets the color for all subsequent drawing operations.

For colormapped displays, a color cell will be allocated out of `fl_colormap` the first time you use a color. If the colormap fills up then a least-squares algorithm is used to find the closest color. If no valid graphical context (fl_gc) is available, the foreground is not set for the current window.

Parameters

  [in] | c | color

void fl_color | ( | uchar | r,
|  | uchar | g,
|  | uchar | b
| ) |  |

friend

Sets the color for all subsequent drawing operations.

The closest possible match to the RGB color is used. The RGB color is used directly on TrueColor displays. For colormap visuals the nearest index in the gray ramp or color cube is used. If no valid graphical context (fl_gc) is available, the foreground is not set for the current window.

Parameters

  [in] | r,g,b | color components

void fl_copy_offscreen | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | Fl_Offscreen | pixmap,
|  | int | srcx,
|  | int | srcy
| ) |  |

friend

Copy a rectangular area of the given offscreen buffer into the current drawing destination.

Parameters

  x,y | position where to draw the copied rectangle
  w,h | size of the copied rectangle
  pixmap | offscreen buffer containing the rectangle to copy
  srcx,srcy | origin in offscreen buffer of rectangle to copy

void fl_curve | ( | double | X0,
|  | double | Y0,
|  | double | X1,
|  | double | Y1,
|  | double | X2,
|  | double | Y2,
|  | double | X3,
|  | double | Y3
| ) |  |

friend

Adds a series of points on a Bezier curve to the path.

The curve ends (and two of the points) are at X0,Y0 and X3,Y3.

Parameters

  [in] | X0,Y0 | curve start point
  [in] | X1,Y1 | curve control point
  [in] | X2,Y2 | curve control point
  [in] | X3,Y3 | curve end point

void fl_draw_image | ( | const uchar * | buf,
|  | int | X,
|  | int | Y,
|  | int | W,
|  | int | H,
|  | int | D = `3`,
|  | int | L = `0`
| ) |  |

friend

Draws an 8-bit per color RGB or luminance image.

Parameters

  [in] | buf | points at the "r" data of the top-left pixel. Color data must be in `r,g,b` order. Luminance data is only one `gray` byte.
  [in] | X,Y | position where to put top-left corner of image
  [in] | W,H | size of the image
  [in] | D | delta to add to the pointer between pixels. It may be any value greater than or equal to 1, or it can be negative to flip the image horizontally
  [in] | L | delta to add to the pointer between lines (if 0 is passed it uses `W` * `D`), and may be larger than `W` * `D` to crop data, or negative to flip the image vertically

It is highly recommended that you put the following code before the first `show()` of any window in your program to get rid of the dithering if possible:

Fl::visual(FL_RGB);

Gray scale (1-channel) images may be drawn. This is done if `abs(D)` is less than 3, or by calling fl_draw_image_mono(). Only one 8-bit sample is used for each pixel, and on screens with different numbers of bits for red, green, and blue only gray colors are used. Setting `D` greater than 1 will let you display one channel of a color image.

Note:
  The X version does not support all possible visuals. If FLTK cannot draw the image in the current visual it will abort. FLTK supports any visual of 8 bits or less, and all common TrueColor visuals up to 32 bits.

void fl_draw_image | ( | Fl_Draw_Image_Cb | cb,
|  | void * | data,
|  | int | X,
|  | int | Y,
|  | int | W,
|  | int | H,
|  | int | D = `3`
| ) |  |

friend

Draws an image using a callback function to generate image data.

You can generate the image as it is being drawn, or do arbitrary decompression of stored data, provided it can be decompressed to individual scan lines easily.

Parameters

  [in] | cb | callback function to generate scan line data
  [in] | data | user data passed to callback function
  [in] | X,Y | screen position of top left pixel
  [in] | W,H | image width and height
  [in] | D | data size in bytes (must be greater than 0)

See Also
  fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L)

The callback function `cb` is called with the `void*` `data` user data pointer to allow access to a structure of information about the image, and the `x`, `y`, and `w` of the scan line desired from the image. 0,0 is the upper-left corner of the image, not `x`, `y`. A pointer to a buffer to put the data into is passed. You must copy `w` pixels from scanline `y`, starting at pixel `x`, to this buffer.

Due to cropping, less than the whole image may be requested. So `x` may be greater than zero, the first `y` may be greater than zero, and `w` may be less than `W`. The buffer is long enough to store the entire `W` * `D` pixels, this is for convenience with some decompression schemes where you must decompress the entire line at once: decompress it into the buffer, and then if `x` is not zero, copy the data over so the `x'th` pixel is at the start of the buffer.

You can assume the `y's` will be consecutive, except the first one may be greater than zero.

If `D` is 4 or more, you must fill in the unused bytes with zero.

void fl_draw_image_mono | ( | const uchar * | buf,
|  | int | X,
|  | int | Y,
|  | int | W,
|  | int | H,
|  | int | D = `1`,
|  | int | L = `0`
| ) |  |

friend

Draws a gray-scale (1 channel) image.

See Also
  fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D, int L)

FL_EXPORT void fl_draw_image_mono | ( | Fl_Draw_Image_Cb | cb,
|  | void * | data,
|  | int | X,
|  | int | Y,
|  | int | W,
|  | int | H,
|  | int | D = `1`
| ) |  |

friend

Draws a gray-scale image using a callback function to generate image data.

See Also
  fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D)

void fl_font | ( | Fl_Font | face,
|  | Fl_Fontsize | size
| ) |  |

friend

Sets the current font, which is then used in various drawing routines.

You may call this outside a draw context if necessary to call fl_width(), but on X this will open the display.

The font is identified by a `face` and a `size`. The size of the font is measured in pixels and not "points". Lines should be spaced `size` pixels apart or more.

void fl_gap | ( |  | ) |

friend

Call fl_gap() to separate loops of the path.

It is unnecessary but harmless to call fl_gap() before the first vertex, after the last vertex, or several times in a row.

void fl_line_style | ( | int | style,
|  | int | width = `0`,
|  | char * | dashes = `0`
| ) |  |

friend

Sets how to draw lines (the "pen").

If you change this it is your responsibility to set it back to the default using `fl_line_style(0)`.

Parameters

  [in] | style | A bitmask which is a bitwise-OR of a line style, a cap style, and a join style. If you don't specify a dash type you will get a solid line. If you don't specify a cap or join type you will get a system-defined default of whatever value is fastest.
  [in] | width | The thickness of the lines in pixels. Zero results in the system defined default, which on both X and Windows is somewhat different and nicer than 1.
  [in] | dashes | A pointer to an array of dash lengths, measured in pixels. The first location is how long to draw a solid portion, the next is how long to draw the gap, then the solid, etc. It is terminated with a zero-length entry. A `NULL` pointer or a zero-length array results in a solid line. Odd array sizes are not supported and result in undefined behavior.

Note
  Because of how line styles are implemented on Win32 systems, you must set the line style after setting the drawing color. If you set the color after the line style you will lose the line style settings.
  The `dashes` array does not work under Windows 95, 98 or Me, since those operating systems do not support complex line styles.

void fl_mult_matrix | ( | double | a,
|  | double | b,
|  | double | c,
|  | double | d,
|  | double | x,
|  | double | y
| ) |  |

friend

Concatenates another transformation onto the current one.

Parameters

  [in] | a,b,c,d,x,y | transformation matrix elements such that `X' = aX + cY + x` and `Y' = bX +dY + y`

int fl_not_clipped | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

friend

Does the rectangle intersect the current clip region?

Parameters

  [in] | x,y,w,h | position and size of rectangle

Returns
  non-zero if any of the rectangle intersects the current clip region. If this returns 0 you don't have to draw the object.

Note
  Under X this returns 2 if the rectangle is partially clipped, and 1 if it is entirely inside the clip region.

void fl_pie | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h,
|  | double | a1,
|  | double | a2
| ) |  |

friend

Draw filled ellipse sections using integer coordinates.

Like fl_arc(), but fl_pie() draws a filled-in pie slice. This slice may extend outside the line drawn by fl_arc(); to avoid this use w - 1 and h - 1.

Parameters

  [in] | x,y,w,h | bounding box of complete circle
  [in] | a1,a2 | start and end angles of arc measured in degrees counter-clockwise from 3 o'clock. `a2` must be greater than or equal to `a1`.

void fl_polygon | ( | int | x0,
|  | int | y0,
|  | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2
| ) |  |

friend

Fills a 3-sided polygon.

The polygon must be convex.

void fl_polygon | ( | int | x0,
|  | int | y0,
|  | int | x1,
|  | int | y1,
|  | int | x2,
|  | int | y2,
|  | int | x3,
|  | int | y3
| ) |  |

friend

Fills a 4-sided polygon.

The polygon must be convex.

void fl_pop_clip | ( |  | ) |

friend

Restores the previous clip region.

You must call fl_pop_clip() once for every time you call fl_push_clip(). Unpredictable results may occur if the clip stack is not empty when you return to FLTK.

void fl_push_clip | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

friend

Intersects the current clip region with a rectangle and pushes this new region onto the stack.

Parameters

  [in] | x,y,w,h | position and size

void fl_push_matrix | ( |  | ) |

friend

Saves the current transformation matrix on the stack.

The maximum depth of the stack is 32.

void fl_rect | ( | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

friend

Draws a 1-pixel border inside the given bounding box.

This function is meant for quick drawing of simple boxes. The behavior is undefined for line widths that are not 1.

void fl_rotate | ( | double | d | ) |

friend

Concatenates rotation transformation onto the current one.

Parameters

  [in] | d | - rotation angle, counter-clockwise in degrees (not radians)

void fl_scale | ( | double | x,
|  | double | y
| ) |  |

friend

Concatenates scaling transformation onto the current one.

Parameters

  [in] | x,y | scale factors in x-direction and y-direction

void fl_scale | ( | double | x | ) |

friend

Concatenates scaling transformation onto the current one.

Parameters

  [in] | x | scale factor in both x-direction and y-direction

double fl_transform_dx | ( | double | x,
|  | double | y
| ) |  |

friend

Transforms distance using current transformation matrix.

Parameters

  [in] | x,y | coordinate

double fl_transform_dy | ( | double | x,
|  | double | y
| ) |  |

friend

Transforms distance using current transformation matrix.

Parameters

  [in] | x,y | coordinate

double fl_transform_x | ( | double | x,
|  | double | y
| ) |  |

friend

Transforms coordinate using the current transformation matrix.

Parameters

  [in] | x,y | coordinate

double fl_transform_y | ( | double | x,
|  | double | y
| ) |  |

friend

Transforms coordinate using the current transformation matrix.

Parameters

  [in] | x,y | coordinate

void fl_transformed_vertex | ( | double | xf,
|  | double | yf
| ) |  |

friend

Adds coordinate pair to the vertex list without further transformations.

Parameters

  [in] | xf,yf | transformed coordinate

void fl_translate | ( | double | x,
|  | double | y
| ) |  |

friend

Concatenates translation transformation onto the current one.

Parameters

  [in] | x,y | translation factor in x-direction and y-direction

void fl_vertex | ( | double | x,
|  | double | y
| ) |  |

friend

Adds a single vertex to the current path.

Parameters

  [in] | x,y | coordinate

The documentation for this class was generated from the following files:

- Fl_Device.H
- fl_arc.cxx
- fl_arci.cxx
- fl_curve.cxx
- Fl_Device.cxx
- Fl_Double_Window.cxx
- fl_line_style.cxx
- fl_rect.cxx
- fl_vertex.cxx

- © 1998-2012 by Bill Spitzak and others.