NTK 1.3.0
fl_draw.H
Go to the documentation of this file.
1//
2// "$Id: fl_draw.H 8772 2011-06-02 08:06:09Z manolo $"
3//
4// Portable drawing function header file for the Fast Light Tool Kit (FLTK).
5//
6// Copyright 1998-2011 by Bill Spitzak and others.
7//
8// This library is free software; you can redistribute it and/or
9// modify it under the terms of the GNU Library General Public
10// License as published by the Free Software Foundation; either
11// version 2 of the License, or (at your option) any later version.
12//
13// This library is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// Library General Public License for more details.
17//
18// You should have received a copy of the GNU Library General Public
19// License along with this library; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21// USA.
22//
23// Please report all bugs and problems on the following page:
24//
25// http://www.fltk.org/str.php
26//
27
32
33#ifndef fl_draw_H
34#define fl_draw_H
35
36#include <FL/x.H> // for Fl_Region
37#include <FL/Enumerations.H> // for the color names
38#include <FL/Fl_Window.H> // for fl_set_spot()
39#include <FL/Fl_Device.H> // for fl_graphics_driver
40
41// Image class...
42class Fl_Image;
43
44// Label flags...
45FL_EXPORT extern char fl_draw_shortcut;
46
50
51// Colors:
61inline void fl_color(Fl_Color c) {fl_graphics_driver->color(c); } // select indexed color
63inline void fl_color(int c) {fl_color((Fl_Color)c);}
74inline void fl_color(uchar r, uchar g, uchar b) {fl_graphics_driver->color(r,g,b); } // select actual color
79inline Fl_Color fl_color() {return fl_graphics_driver->color();}
81
85// clip:
91inline void fl_push_clip(int x, int y, int w, int h) {fl_graphics_driver->push_clip(x,y,w,h); }
100#define fl_clip fl_push_clip
104inline void fl_push_no_clip() {fl_graphics_driver->push_no_clip(); }
112inline void fl_pop_clip() {fl_graphics_driver->pop_clip(); }
123inline int fl_not_clipped(int x, int y, int w, int h) {return fl_graphics_driver->not_clipped(x,y,w,h); }
135inline int fl_clip_box(int x , int y, int w, int h, int& X, int& Y, int& W, int& H)
136 {return fl_graphics_driver->clip_box(x,y,w,h,X,Y,W,H); }
137
138inline void fl_restore_clip() { fl_graphics_driver->restore_clip(); }
145inline void fl_clip_region(Fl_Region r) { fl_graphics_driver->clip_region(r); }
149inline Fl_Region fl_clip_region() { return fl_graphics_driver->clip_region(); }
150
151
152// points:
156inline void fl_point(int x, int y) { fl_graphics_driver->point(x,y); }
157
158// line type:
186inline void fl_line_style(int style, int width=0, char* dashes=0) {fl_graphics_driver->line_style(style,width,dashes); }
187enum {
190 FL_DOT = 2,
193
194 FL_CAP_FLAT = 0x100,
195 FL_CAP_ROUND = 0x200,
197
198 FL_JOIN_MITER = 0x1000,
199 FL_JOIN_ROUND = 0x2000,
201};
202
203FL_EXPORT Fl_Color fl_color_add_alpha ( Fl_Color c, uchar alpha );
204
205// rectangles tweaked to exactly fill the pixel rectangle:
206
212inline void fl_rect(int x, int y, int w, int h) { fl_graphics_driver->rect(x,y,w,h); }
213
215inline void fl_rect(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rect(x,y,w,h);}
217inline void fl_rectf(int x, int y, int w, int h) { fl_graphics_driver->rectf(x,y,w,h); }
219inline void fl_rectf(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rectf(x,y,w,h);}
227/* note: doxygen comment here to avoid triplication in os-speciic files */
228FL_EXPORT void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b);
229
230// line segments:
234inline void fl_line(int x, int y, int x1, int y1) {fl_graphics_driver->line(x,y,x1,y1); }
238inline void fl_line(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->line(x,y,x1,y1,x2,y2); }
239
240// closed line segments:
244inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->loop(x,y,x1,y1,x2,y2); }
248inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3)
249 {fl_graphics_driver->loop(x,y,x1,y1,x2,y2,x3,y3); }
250
251// filled polygons
255inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2) {fl_graphics_driver->polygon(x,y,x1,y1,x2,y2); }
259inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3)
260 { fl_graphics_driver->polygon(x,y,x1,y1,x2,y2,x3,y3); }
261
262// draw rectilinear lines, horizontal segment first:
266inline void fl_xyline(int x, int y, int x1) {fl_graphics_driver->xyline(x,y,x1);}
270inline void fl_xyline(int x, int y, int x1, int y2) {fl_graphics_driver->xyline(x,y,x1,y2);}
275inline void fl_xyline(int x, int y, int x1, int y2, int x3) {fl_graphics_driver->xyline(x,y,x1,y2,x3);}
276
277// draw rectilinear lines, vertical segment first:
281inline void fl_yxline(int x, int y, int y1) {fl_graphics_driver->yxline(x,y,y1);}
285inline void fl_yxline(int x, int y, int y1, int x2) {fl_graphics_driver->yxline(x,y,y1,x2);}
290inline void fl_yxline(int x, int y, int y1, int x2, int y3) {fl_graphics_driver->yxline(x,y,y1,x2,y3);}
291
292// circular lines and pie slices (code in fl_arci.C):
315inline void fl_arc(int x, int y, int w, int h, double a1, double a2) {fl_graphics_driver->arc(x,y,w,h,a1,a2); }
328inline void fl_pie(int x, int y, int w, int h, double a1, double a2) {fl_graphics_driver->pie(x,y,w,h,a1,a2); }
330FL_EXPORT void fl_chord(int x, int y, int w, int h, double a1, double a2); // nyi
331
332// scalable drawing code (code in fl_vertex.C and fl_arc.C):
337inline void fl_push_matrix() { fl_graphics_driver->push_matrix(); }
341inline void fl_pop_matrix() { fl_graphics_driver->pop_matrix(); }
346inline void fl_scale(double x, double y) { fl_graphics_driver->scale(x, y); }
351inline void fl_scale(double x) { fl_graphics_driver->scale(x, x); }
356inline void fl_translate(double x, double y) { fl_graphics_driver->translate(x, y); }
361inline void fl_rotate(double d) { fl_graphics_driver->rotate(d); }
368inline void fl_mult_matrix(double a, double b, double c, double d, double x,double y)
369 { fl_graphics_driver->mult_matrix(a, b, c, d, x, y); }
370
373inline void fl_begin_points() {fl_graphics_driver->begin_points(); }
377inline void fl_begin_line() {fl_graphics_driver->begin_line(); }
381inline void fl_begin_loop() {fl_graphics_driver->begin_loop(); }
385inline void fl_begin_polygon() {fl_graphics_driver->begin_polygon(); }
390inline void fl_vertex(double x, double y) {fl_graphics_driver->vertex(x,y); }
399inline void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3)
400 {fl_graphics_driver->curve(X0,Y0,X1,Y1,X2,Y2,X3,Y3); }
401
409inline void fl_arc(double x, double y, double r, double start, double end) {fl_graphics_driver->arc(x,y,r,start,end); }
417inline void fl_circle(double x, double y, double r) {fl_graphics_driver->circle(x,y,r); }
421inline void fl_end_points() {fl_graphics_driver->end_points(); }
425inline void fl_end_line() {fl_graphics_driver->end_line(); }
429inline void fl_end_loop() {fl_graphics_driver->end_loop(); }
433inline void fl_end_polygon() {fl_graphics_driver->end_polygon(); }
448inline void fl_begin_complex_polygon() {fl_graphics_driver->begin_complex_polygon(); }
455inline void fl_gap() {fl_graphics_driver->gap(); }
459inline void fl_end_complex_polygon() {fl_graphics_driver->end_complex_polygon(); }
460// get and use transformed positions:
465inline double fl_transform_x(double x, double y) {return fl_graphics_driver->transform_x(x, y); }
470inline double fl_transform_y(double x, double y) {return fl_graphics_driver->transform_y(x, y); }
475inline double fl_transform_dx(double x, double y) {return fl_graphics_driver->transform_dx(x, y); }
480inline double fl_transform_dy(double x, double y) {return fl_graphics_driver->transform_dy(x, y); }
485inline void fl_transformed_vertex(double xf, double yf) {fl_graphics_driver->transformed_vertex(xf,yf); }
487
490/* NOTE: doxygen comments here to avoid triplication in os-specific sources */
491
492// Fonts:
502inline void fl_font(Fl_Font face, Fl_Fontsize size) { fl_graphics_driver->font(face,size); }
503
508inline Fl_Font fl_font() {return fl_graphics_driver->font();}
513inline Fl_Fontsize fl_size() {return fl_graphics_driver->size();}
514
515// information you can get about the current font:
520inline int fl_height() {return fl_graphics_driver->height();}
521FL_EXPORT int fl_height(int font, int size);
526inline int fl_descent() {return fl_graphics_driver->descent();}
528FL_EXPORT double fl_width(const char* txt);
530inline double fl_width(const char* txt, int n) {return fl_graphics_driver->width(txt, n);}
534inline double fl_width(unsigned int c) {return fl_graphics_driver->width(c);}
543FL_EXPORT void fl_text_extents(const char*, int& dx, int& dy, int& w, int& h); // NO fltk symbol expansion will be performed
547inline void fl_text_extents(const char *t, int n, int& dx, int& dy, int& w, int& h)
548 {fl_graphics_driver->text_extents(t, n, dx, dy, w, h);}
549
550// font encoding:
551// Note: doxygen comments here to avoid duplication for os-sepecific cases
558FL_EXPORT const char *fl_latin1_to_local(const char *t, int n=-1);
565FL_EXPORT const char *fl_local_to_latin1(const char *t, int n=-1);
572FL_EXPORT const char *fl_mac_roman_to_local(const char *t, int n=-1);
579FL_EXPORT const char *fl_local_to_mac_roman(const char *t, int n=-1);
581
594FL_EXPORT void fl_draw(const char* str, int x, int y);
602FL_EXPORT void fl_draw(int angle, const char* str, int x, int y);
606inline void fl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->draw(str,n,x,y); }
611inline void fl_draw(int angle,const char* str, int n, int x, int y) {fl_graphics_driver->draw(angle,str,n,x,y); }
615inline void fl_rtl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->rtl_draw(str,n,x,y); }
616FL_EXPORT void fl_measure(const char* str, int& x, int& y,
617 int draw_symbols = 1);
618FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h,
619 Fl_Align align,
620 Fl_Image* img=0, int draw_symbols = 1);
621FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h,
622 Fl_Align align,
623 void (*callthis)(const char *,int,int,int),
624 Fl_Image* img=0, int draw_symbols = 1);
625
626// boxtypes:
627FL_EXPORT void fl_frame(const char* s, int x, int y, int w, int h);
628FL_EXPORT void fl_frame2(const char* s, int x, int y, int w, int h);
629FL_EXPORT void fl_draw_box(Fl_Boxtype, int x, int y, int w, int h, Fl_Color);
630
631// images:
632
668inline void fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0)
669 { fl_graphics_driver->draw_image(buf, X, Y, W, H, D, L); }
670
675inline void fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0)
676 { fl_graphics_driver->draw_image_mono(buf, X, Y, W, H, D, L); }
677
711inline void fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3)
712 { fl_graphics_driver->draw_image(cb, data, X, Y, W, H, D); }
713
718FL_EXPORT void fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1);
719
725/* note: doxygen comment here to avoid triplication in os-speciic files */
726FL_EXPORT char fl_can_do_alpha_blending();
727
745/* note: doxygen comment here to avoid triplication in os-speciic files */
746FL_EXPORT uchar *fl_read_image(uchar *p,int X,int Y,int W,int H,int alpha=0);
747
748// pixmaps:
749FL_EXPORT int fl_draw_pixmap(/*const*/ char* const* data, int x,int y,Fl_Color=FL_GRAY);
750FL_EXPORT int fl_draw_pixmap(const char* const* cdata, int x,int y,Fl_Color=FL_GRAY);
751FL_EXPORT int fl_measure_pixmap(/*const*/ char* const* data, int &w, int &h);
752FL_EXPORT int fl_measure_pixmap(const char* const* cdata, int &w, int &h);
753
754// other:
755FL_EXPORT void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
756 void (*draw_area)(void*, int,int,int,int), void* data);
757FL_EXPORT const char* fl_shortcut_label(unsigned int shortcut);
758FL_EXPORT const char* fl_shortcut_label(unsigned int shortcut, const char **eom);
759FL_EXPORT unsigned int fl_old_shortcut(const char* s);
760FL_EXPORT void fl_overlay_rect(int x,int y,int w,int h);
761FL_EXPORT void fl_overlay_clear();
762FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color fg=FL_BLACK, Fl_Color bg=FL_WHITE);
763FL_EXPORT const char* fl_expand_text(const char* from, char* buf, int maxbuf,
764 double maxw, int& n, double &width,
765 int wrap, int draw_symbols = 0);
766
767// XIM:
769FL_EXPORT void fl_set_status(int X, int Y, int W, int H);
771FL_EXPORT void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win=0);
773FL_EXPORT void fl_reset_spot(void);
774
775
776
777// XForms symbols:
778FL_EXPORT int fl_draw_symbol(const char* label,int x,int y,int w,int h, Fl_Color);
779FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scalable);
781
782#endif
783
784//
785// End of "$Id: fl_draw.H 8772 2011-06-02 08:06:09Z manolo $".
786//
This file contains type definitions and general enumerations.
int Fl_Font
A font number is an index into the internal font table.
Definition Enumerations.H:707
unsigned Fl_Align
FLTK type for alignment control.
Definition Enumerations.H:658
Fl_Cursor
The following constants define the mouse cursors that are available in FLTK.
Definition Enumerations.H:879
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
Fl_Boxtype
Definition Enumerations.H:472
declaration of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device,...
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.
virtual double width(const char *str, int n)=0
see fl_width(const char *str, int n).
Fl_Fontsize size()
see fl_size().
Definition Fl_Device.H:388
Fl_Image is the base class used for caching and drawing all kinds of images in FLTK.
Definition Fl_Image.H:51
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
virtual void label(Fl_Widget *w)
The label() methods are an obsolete way to set the image attribute of a widget or menu item.
Definition Fl_Image.cxx:120
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
This widget produces an actual window.
Definition Fl_Window.H:58
unsigned char uchar
unsigned char
Definition fl_types.h:39
int fl_descent()
Returns the recommended distance above the bottom of a fl_height() tall box to draw the text at so it...
Definition fl_draw.H:526
FL_EXPORT void fl_text_extents(const char *, int &dx, int &dy, int &w, int &h)
Determines the minimum pixel dimensions of a nul-terminated string.
Definition fl_font.cxx:81
Fl_Fontsize fl_size()
Returns the size set by the most recent call to fl_font().
Definition fl_draw.H:513
FL_EXPORT const char * fl_mac_roman_to_local(const char *t, int n=-1)
Converts text from Mac Roman character set to local encoding.
Definition fl_encoding_mac_roman.cxx:109
FL_EXPORT const char * fl_local_to_mac_roman(const char *t, int n=-1)
Converts text from local encoding to Mac Roman character set.
Definition fl_encoding_mac_roman.cxx:88
FL_EXPORT const char * fl_latin1_to_local(const char *t, int n=-1)
Converts text from Windows/X11 latin1 character set to local encoding.
Definition fl_encoding_latin1.cxx:123
FL_EXPORT const char * fl_local_to_latin1(const char *t, int n=-1)
Converts text from local encoding to Windowx/X11 latin1 character set.
Definition fl_encoding_latin1.cxx:128
FL_EXPORT double fl_width(const char *txt)
Returns the typographical width of a nul-terminated string.
Definition fl_font.cxx:68
int fl_height()
Returns the recommended minimum line spacing for the current font.
Definition fl_draw.H:520
Fl_Font fl_font()
Returns the face set by the most recent call to fl_font().
Definition fl_draw.H:508
Fl_Color fl_color()
Returns the last fl_color() that was set.
Definition fl_draw.H:79
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
FL_EXPORT int fl_measure_pixmap(char *const *data, int &w, int &h)
Get the dimensions of a pixmap.
Definition fl_draw_pixmap.cxx:55
void fl_point(int x, int y)
Draws a single pixel at the given coordinates.
Definition fl_draw.H:156
Fl_Region fl_clip_region()
Returns the current clipping region.
Definition fl_draw.H:149
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
FL_EXPORT void fl_frame(const char *s, int x, int y, int w, int h)
Draws a series of line segments around the given box.
Definition fl_boxtype.cxx:79
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
FL_EXPORT int fl_draw_symbol(const char *label, int x, int y, int w, int h, Fl_Color)
Draw the named symbol in the given rectangle using the given color.
Definition fl_symbols.cxx:112
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
FL_EXPORT void fl_draw_box(Fl_Boxtype, int x, int y, int w, int h, Fl_Color)
Draws a box using given type, position, size and color.
Definition fl_boxtype.cxx:410
FL_EXPORT void fl_set_status(int X, int Y, int W, int H)
FL_EXPORT int fl_add_symbol(const char *name, void(*drawit)(Fl_Color), int scalable)
Adds a symbol to the system.
Definition fl_symbols.cxx:87
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
FL_EXPORT void fl_chord(int x, int y, int w, int h, double a1, double a2)
fl_chord declaration is a place holder - the function does not yet exist
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
FL_EXPORT unsigned int fl_old_shortcut(const char *s)
Emulation of XForms named shortcuts.
Definition fl_shortcut.cxx:284
FL_EXPORT void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win=0)
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
FL_EXPORT const char * fl_shortcut_label(unsigned int shortcut)
Get a human-readable string from a shortcut value.
Definition fl_shortcut.cxx:178
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
FL_EXPORT void fl_overlay_clear()
Erase a selection rectangle without drawing a new one.
Definition fl_overlay.cxx:109
void fl_end_line()
Ends list of lines, and draws.
Definition fl_draw.H:425
FL_EXPORT void fl_reset_spot(void)
FL_EXPORT void fl_frame2(const char *s, int x, int y, int w, int h)
Draws a series of line segments around the given box.
Definition fl_boxtype.cxx:113
void fl_pop_matrix()
Restores the current transformation matrix from the stack.
Definition fl_draw.H:341
FL_EXPORT void fl_overlay_rect(int x, int y, int w, int h)
Draws a selection rectangle, erasing a previous one by XOR'ing it first.
Definition fl_overlay.cxx:116
void fl_rotate(double d)
Concatenates rotation transformation onto the current one.
Definition fl_draw.H:361
FL_EXPORT const char * fl_expand_text(const char *from, char *buf, int maxbuf, double maxw, int &n, double &width, int wrap, int draw_symbols=0)
Copy from to buf, replacing unprintable characters with ^X and \nnn.
Definition fl_draw.cxx:113
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
FL_EXPORT char fl_can_do_alpha_blending()
Checks whether platform supports true alpha blending for RGBA images.
Definition Fl_Double_Window.cxx:178
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
FL_EXPORT uchar * fl_read_image(uchar *p, int X, int Y, int W, int H, int alpha=0)
Reads an RGB(A) image from the current window or off-screen buffer.
Definition fl_read_image.cxx:91
FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color fg=FL_BLACK, Fl_Color bg=FL_WHITE)
Sets the cursor for the current window to the specified shape and colors.
Definition fl_cursor.cxx:46
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_measure(const char *str, int &x, int &y, int draw_symbols=1)
Measure how wide and tall the string will be when printed by the fl_draw() function with align parame...
Definition fl_draw.cxx:399
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
FL_EXPORT int fl_draw_pixmap(char *const *data, int x, int y, Fl_Color=FL_GRAY)
Draw XPM image data, with the top-left corner at the given position.
Definition fl_draw_pixmap.cxx:174
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
FL_EXPORT void fl_scroll(int X, int Y, int W, int H, int dx, int dy, void(*draw_area)(void *, int, int, int, int), void *data)
Scroll a rectangle and draw the newly exposed portions.
Definition fl_scroll_area.cxx:49
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
@ FL_DASH
line style: _ _ _ _ _ _
Definition fl_draw.H:189
@ FL_CAP_FLAT
cap style: end is flat
Definition fl_draw.H:194
@ FL_JOIN_ROUND
join style: line join is rounded
Definition fl_draw.H:199
@ FL_JOIN_BEVEL
join style: line join is tidied
Definition fl_draw.H:200
@ FL_JOIN_MITER
join style: line join extends to a point
Definition fl_draw.H:198
@ FL_CAP_SQUARE
cap style: end wraps end point
Definition fl_draw.H:196
@ FL_DOT
line style: . . . . . .
Definition fl_draw.H:190
@ FL_DASHDOTDOT
line style: _ . . _ . .
Definition fl_draw.H:192
@ FL_SOLID
line style: ___________
Definition fl_draw.H:188
@ FL_DASHDOT
line style: _ . _ . _ .
Definition fl_draw.H:191
@ FL_CAP_ROUND
cap style: end is round
Definition fl_draw.H:195