FLTK 1.3.3

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

fl_draw.H
Go to the documentation of this file.
1 //
2 // "$Id: fl_draw.H 10320 2014-09-18 15:25:55Z greg.ercolano $"
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. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
18
24 #ifndef fl_draw_H
25 #define fl_draw_H
26
27 #include <FL/x.H> // for Fl_Region
28 #include <FL/Enumerations.H> // for the color names
29 #include <FL/Fl_Window.H> // for fl_set_spot()
30 #include <FL/Fl_Device.H> // for fl_graphics_driver
31
32 // Image class...
33 class Fl_Image;
34
35 // Label flags...
36 FL_EXPORT extern char fl_draw_shortcut;
37
42 // Colors:
52 inline void fl_color(Fl_Color c) {fl_graphics_driver->color(c); } // select indexed color
54 inline void fl_color(int c) {fl_color((Fl_Color)c);}
65 inline void fl_color(uchar r, uchar g, uchar b) {fl_graphics_driver->color(r,g,b); } // select actual color
70 inline Fl_Color fl_color() {return fl_graphics_driver->color();}
76 // clip:
82 inline void fl_push_clip(int x, int y, int w, int h) {fl_graphics_driver->push_clip(x,y,w,h); }
91 #define fl_clip fl_push_clip
92
95 inline void fl_push_no_clip() {fl_graphics_driver->push_no_clip(); }
103 inline void fl_pop_clip() {fl_graphics_driver->pop_clip(); }
114 inline int fl_not_clipped(int x, int y, int w, int h) {return fl_graphics_driver->not_clipped(x,y,w,h); }
126 inline int fl_clip_box(int x , int y, int w, int h, int& X, int& Y, int& W, int& H)
127 {return fl_graphics_driver->clip_box(x,y,w,h,X,Y,W,H); }
129 inline void fl_restore_clip() { fl_graphics_driver->restore_clip(); }
136 inline void fl_clip_region(Fl_Region r) { fl_graphics_driver->clip_region(r); }
140 inline Fl_Region fl_clip_region() { return fl_graphics_driver->clip_region(); }
141
142
143 // points:
147 inline void fl_point(int x, int y) { fl_graphics_driver->point(x,y); }
148
149 // line type:
177 inline void fl_line_style(int style, int width=0, char* dashes=0) {fl_graphics_driver->line_style(style,width,dashes); }
178 enum {
179 FL_SOLID = 0,
180 FL_DASH = 1,
181 FL_DOT = 2,
182 FL_DASHDOT = 3,
183 FL_DASHDOTDOT = 4,
184
185 FL_CAP_FLAT = 0x100,
186 FL_CAP_ROUND = 0x200,
187 FL_CAP_SQUARE = 0x300,
188
189 FL_JOIN_MITER = 0x1000,
190 FL_JOIN_ROUND = 0x2000,
191 FL_JOIN_BEVEL = 0x3000
192 };
193
194 // rectangles tweaked to exactly fill the pixel rectangle:
195
201 inline void fl_rect(int x, int y, int w, int h) { fl_graphics_driver->rect(x,y,w,h); }
202
204 inline void fl_rect(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rect(x,y,w,h);}
206 inline void fl_rectf(int x, int y, int w, int h) { fl_graphics_driver->rectf(x,y,w,h); }
208 inline void fl_rectf(int x, int y, int w, int h, Fl_Color c) {fl_color(c); fl_rectf(x,y,w,h);}
209
216 /* note: doxygen comment here to avoid triplication in os-speciic files */
217 FL_EXPORT void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b);
218
219 // line segments:
223 inline void fl_line(int x, int y, int x1, int y1) {fl_graphics_driver->line(x,y,x1,y1); }
227 inline 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); }
228
229 // closed line segments:
233 inline 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); }
237 inline void fl_loop(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3)
238 {fl_graphics_driver->loop(x,y,x1,y1,x2,y2,x3,y3); }
239
240 // filled polygons
244 inline 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); }
248 inline void fl_polygon(int x, int y, int x1, int y1, int x2, int y2, int x3, int y3)
249 { fl_graphics_driver->polygon(x,y,x1,y1,x2,y2,x3,y3); }
250
251 // draw rectilinear lines, horizontal segment first:
255 inline void fl_xyline(int x, int y, int x1) {fl_graphics_driver->xyline(x,y,x1);}
259 inline void fl_xyline(int x, int y, int x1, int y2) {fl_graphics_driver->xyline(x,y,x1,y2);}
264 inline void fl_xyline(int x, int y, int x1, int y2, int x3) {fl_graphics_driver->xyline(x,y,x1,y2,x3);}
265
266 // draw rectilinear lines, vertical segment first:
270 inline void fl_yxline(int x, int y, int y1) {fl_graphics_driver->yxline(x,y,y1);}
274 inline void fl_yxline(int x, int y, int y1, int x2) {fl_graphics_driver->yxline(x,y,y1,x2);}
279 inline void fl_yxline(int x, int y, int y1, int x2, int y3) {fl_graphics_driver->yxline(x,y,y1,x2,y3);}
280
281 // circular lines and pie slices (code in fl_arci.C):
304 inline 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); }
317 inline 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); }
319 FL_EXPORT void fl_chord(int x, int y, int w, int h, double a1, double a2); // nyi
320
321 // scalable drawing code (code in fl_vertex.C and fl_arc.C):
326 inline void fl_push_matrix() { fl_graphics_driver->push_matrix(); }
330 inline void fl_pop_matrix() { fl_graphics_driver->pop_matrix(); }
335 inline void fl_scale(double x, double y) { fl_graphics_driver->scale(x, y); }
340 inline void fl_scale(double x) { fl_graphics_driver->scale(x, x); }
345 inline void fl_translate(double x, double y) { fl_graphics_driver->translate(x, y); }
350 inline void fl_rotate(double d) { fl_graphics_driver->rotate(d); }
357 inline void fl_mult_matrix(double a, double b, double c, double d, double x,double y)
358 { fl_graphics_driver->mult_matrix(a, b, c, d, x, y); }
362 inline void fl_begin_points() {fl_graphics_driver->begin_points(); }
366 inline void fl_begin_line() {fl_graphics_driver->begin_line(); }
370 inline void fl_begin_loop() {fl_graphics_driver->begin_loop(); }
374 inline void fl_begin_polygon() {fl_graphics_driver->begin_polygon(); }
379 inline void fl_vertex(double x, double y) {fl_graphics_driver->vertex(x,y); }
388 inline void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3)
389 {fl_graphics_driver->curve(X0,Y0,X1,Y1,X2,Y2,X3,Y3); }
416 inline void fl_arc(double x, double y, double r, double start, double end) {fl_graphics_driver->arc(x,y,r,start,end); }
424 inline void fl_circle(double x, double y, double r) {fl_graphics_driver->circle(x,y,r); }
428 inline void fl_end_points() {fl_graphics_driver->end_points(); }
432 inline void fl_end_line() {fl_graphics_driver->end_line(); }
436 inline void fl_end_loop() {fl_graphics_driver->end_loop(); }
440 inline void fl_end_polygon() {fl_graphics_driver->end_polygon(); }
455 inline void fl_begin_complex_polygon() {fl_graphics_driver->begin_complex_polygon(); }
462 inline void fl_gap() {fl_graphics_driver->gap(); }
466 inline void fl_end_complex_polygon() {fl_graphics_driver->end_complex_polygon(); }
467 // get and use transformed positions:
472 inline double fl_transform_x(double x, double y) {return fl_graphics_driver->transform_x(x, y); }
477 inline double fl_transform_y(double x, double y) {return fl_graphics_driver->transform_y(x, y); }
482 inline double fl_transform_dx(double x, double y) {return fl_graphics_driver->transform_dx(x, y); }
487 inline double fl_transform_dy(double x, double y) {return fl_graphics_driver->transform_dy(x, y); }
492 inline void fl_transformed_vertex(double xf, double yf) {fl_graphics_driver->transformed_vertex(xf,yf); }
497 /* NOTE: doxygen comments here to avoid triplication in os-specific sources */
498
499 // Fonts:
509 inline void fl_font(Fl_Font face, Fl_Fontsize fsize) { fl_graphics_driver->font(face,fsize); }
510
515 inline Fl_Font fl_font() {return fl_graphics_driver->font();}
520 inline Fl_Fontsize fl_size() {return fl_graphics_driver->size();}
521
522 // information you can get about the current font:
527 inline int fl_height() {return fl_graphics_driver->height();}
528 FL_EXPORT int fl_height(int font, int size);
533 inline int fl_descent() {return fl_graphics_driver->descent();}
536 FL_EXPORT double fl_width(const char* txt);
539 inline double fl_width(const char* txt, int n) {return fl_graphics_driver->width(txt, n);}
544 inline double fl_width(unsigned int c) {return fl_graphics_driver->width(c);}
555 FL_EXPORT void fl_text_extents(const char*, int& dx, int& dy, int& w, int& h); // NO fltk symbol expansion will be performed
559 inline void fl_text_extents(const char *t, int n, int& dx, int& dy, int& w, int& h)
560 {fl_graphics_driver->text_extents(t, n, dx, dy, w, h);}
561
562 // font encoding:
563 // Note: doxygen comments here to avoid duplication for os-sepecific cases
570 FL_EXPORT const char *fl_latin1_to_local(const char *t, int n=-1);
577 FL_EXPORT const char *fl_local_to_latin1(const char *t, int n=-1);
584 FL_EXPORT const char *fl_mac_roman_to_local(const char *t, int n=-1);
591 FL_EXPORT const char *fl_local_to_mac_roman(const char *t, int n=-1);
606 FL_EXPORT void fl_draw(const char* str, int x, int y);
614 FL_EXPORT void fl_draw(int angle, const char* str, int x, int y);
618 inline void fl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->draw(str,n,x,y); }
623 inline void fl_draw(int angle, const char* str, int n, int x, int y) {fl_graphics_driver->draw(angle,str,n,x,y); }
627 inline void fl_rtl_draw(const char* str, int n, int x, int y) {fl_graphics_driver->rtl_draw(str,n,x,y); }
628 FL_EXPORT void fl_measure(const char* str, int& x, int& y,
629 int draw_symbols = 1);
630 FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h,
631 Fl_Align align,
632 Fl_Image* img=0, int draw_symbols = 1);
633 FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h,
634 Fl_Align align,
635 void (*callthis)(const char *,int,int,int),
636 Fl_Image* img=0, int draw_symbols = 1);
637
638 // boxtypes:
639 FL_EXPORT void fl_frame(const char* s, int x, int y, int w, int h);
640 FL_EXPORT void fl_frame2(const char* s, int x, int y, int w, int h);
641 FL_EXPORT void fl_draw_box(Fl_Boxtype, int x, int y, int w, int h, Fl_Color);
642
643 // images:
644
680 inline void fl_draw_image(const uchar* buf, int X,int Y,int W,int H, int D=3, int L=0)
681 { fl_graphics_driver->draw_image(buf, X, Y, W, H, D, L); }
682
687 inline void fl_draw_image_mono(const uchar* buf, int X,int Y,int W,int H, int D=1, int L=0)
688 { fl_graphics_driver->draw_image_mono(buf, X, Y, W, H, D, L); }
689
723 inline void fl_draw_image(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=3)
724 { fl_graphics_driver->draw_image(cb, data, X, Y, W, H, D); }
725
730 inline void fl_draw_image_mono(Fl_Draw_Image_Cb cb, void* data, int X,int Y,int W,int H, int D=1)
731 { fl_graphics_driver->draw_image_mono(cb, data, X, Y, W, H, D); }
732
738 /* note: doxygen comment here to avoid triplication in os-speciic files */
739 FL_EXPORT char fl_can_do_alpha_blending();
740
758 /* note: doxygen comment here to avoid triplication in os-speciic files */
759 FL_EXPORT uchar *fl_read_image(uchar *p,int X,int Y,int W,int H,int alpha=0);
760
761 // pixmaps:
762 FL_EXPORT int fl_draw_pixmap(/*const*/ char* const* data, int x,int y,Fl_Color=FL_GRAY);
763 FL_EXPORT int fl_draw_pixmap(const char* const* cdata, int x,int y,Fl_Color=FL_GRAY);
764 FL_EXPORT int fl_measure_pixmap(/*const*/ char* const* data, int &w, int &h);
765 FL_EXPORT int fl_measure_pixmap(const char* const* cdata, int &w, int &h);
766
767 // other:
768 FL_EXPORT void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
769 void (*draw_area)(void*, int,int,int,int), void* data);
770 FL_EXPORT const char* fl_shortcut_label(unsigned int shortcut);
771 FL_EXPORT const char* fl_shortcut_label(unsigned int shortcut, const char **eom);
772 FL_EXPORT unsigned int fl_old_shortcut(const char* s);
773 FL_EXPORT void fl_overlay_rect(int x,int y,int w,int h);
774 FL_EXPORT void fl_overlay_clear();
775 FL_EXPORT void fl_cursor(Fl_Cursor);
776 FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color fg, Fl_Color bg=FL_WHITE);
777 FL_EXPORT const char* fl_expand_text(const char* from, char* buf, int maxbuf,
778 double maxw, int& n, double &width,
779 int wrap, int draw_symbols = 0);
780
781 // XIM:
783 FL_EXPORT void fl_set_status(int X, int Y, int W, int H);
785 FL_EXPORT void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win=0);
787 FL_EXPORT void fl_reset_spot(void);
788
789
790
791 // XForms symbols:
792 FL_EXPORT int fl_draw_symbol(const char* label,int x,int y,int w,int h, Fl_Color);
793 FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scalable);
796 #endif
797
798 //
799 // End of "$Id: fl_draw.H 10320 2014-09-18 15:25:55Z greg.ercolano $".
800 //
fl_latin1_to_local
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:114
fl_end_complex_polygon
void fl_end_complex_polygon()
Ends complex filled polygon, and draws.
Definition: fl_draw.H:466
Fl_Graphics_Driver::begin_points
virtual void begin_points()
see fl_begin_points().
Definition: fl_vertex.cxx:75
FL_SOLID
line style: ___________
Definition: fl_draw.H:179
fl_reset_spot
FL_EXPORT void fl_reset_spot(void)
fl_scroll
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:40
FL_JOIN_MITER
join style: line join extends to a point
Definition: fl_draw.H:189
fl_loop
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:233
Fl_Graphics_Driver::begin_loop
virtual void begin_loop()
see fl_begin_loop().
Definition: fl_vertex.cxx:79
fl_transform_dx
double fl_transform_dx(double x, double y)
Transforms distance using current transformation matrix.
Definition: fl_draw.H:482
fl_overlay_rect
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:107
Fl_Window
This widget produces an actual window.
Definition: Fl_Window.H:57
Fl_Device.H
declaration of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device, Fl_Device_Plugin.
Fl_Cursor
Fl_Cursor
The following constants define the mouse cursors that are available in FLTK.
Definition: Enumerations.H:910
FL_CAP_FLAT
cap style: end is flat
Definition: fl_draw.H:185
fl_clip_box
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:126
fl_point
void fl_point(int x, int y)
Draws a single pixel at the given coordinates.
Definition: fl_draw.H:147
fl_descent
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:533
fl_clip_region
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:136
Fl_Graphics_Driver::text_extents
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).
Definition: Fl_Device.cxx:64
fl_push_matrix
void fl_push_matrix()
Saves the current transformation matrix on the stack.
Definition: fl_draw.H:326
fl_transformed_vertex
void fl_transformed_vertex(double xf, double yf)
Adds coordinate pair to the vertex list without further transformations.
Definition: fl_draw.H:492
fl_local_to_latin1
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:119
Fl_Image::label
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:111
fl_gap
void fl_gap()
Call fl_gap() to separate loops of the path.
Definition: fl_draw.H:462
fl_set_status
FL_EXPORT void fl_set_status(int X, int Y, int W, int H)
Fl_Graphics_Driver::pop_clip
virtual void pop_clip()
see fl_pop_clip().
Definition: fl_rect.cxx:597
fl_not_clipped
int fl_not_clipped(int x, int y, int w, int h)
Does the rectangle intersect the current clip region?
Definition: fl_draw.H:114
Fl_Graphics_Driver::rect
virtual void rect(int x, int y, int w, int h)
see fl_rect(int x, int y, int w, int h).
Definition: fl_rect.cxx:158
fl_old_shortcut
FL_EXPORT unsigned int fl_old_shortcut(const char *s)
Emulation of XForms named shortcuts.
Definition: fl_shortcut.cxx:331
fl_set_spot
FL_EXPORT void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win=0)
fl_rotate
void fl_rotate(double d)
Concatenates rotation transformation onto the current one.
Definition: fl_draw.H:350
fl_height
int fl_height()
Returns the recommended minimum line spacing for the current font.
Definition: fl_draw.H:527
fl_draw_image
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:680
fl_color
void fl_color(Fl_Color c)
Sets the color for all subsequent drawing operations.
Definition: fl_draw.H:52
Fl_Graphics_Driver::draw_image_mono
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).
Definition: Fl_Device.H:346
Fl_Graphics_Driver::loop
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).
Definition: fl_rect.cxx:380
fl_overlay_clear
FL_EXPORT void fl_overlay_clear()
Erase a selection rectangle without drawing a new one.
Definition: fl_overlay.cxx:100
Fl_Graphics_Driver::not_clipped
virtual int not_clipped(int x, int y, int w, int h)
see fl_not_clipped(int x, int y, int w, int h).
Definition: fl_rect.cxx:605
Fl_Graphics_Driver::size
Fl_Fontsize size()
see fl_size().
Definition: Fl_Device.H:383
Fl_Graphics_Driver::xyline
virtual void xyline(int x, int y, int x1)
see fl_xyline(int x, int y, int x1).
Definition: fl_rect.cxx:198
fl_begin_polygon
void fl_begin_polygon()
Starts drawing a convex filled polygon.
Definition: fl_draw.H:374
fl_begin_complex_polygon
void fl_begin_complex_polygon()
Starts drawing a complex filled polygon.
Definition: fl_draw.H:455
fl_pop_clip
void fl_pop_clip()
Restores the previous clip region.
Definition: fl_draw.H:103
fl_local_to_mac_roman
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:79
fl_begin_line
void fl_begin_line()
Starts drawing a list of lines.
Definition: fl_draw.H:366
Fl_Graphics_Driver::pop_matrix
void pop_matrix()
see fl_pop_matrix().
Definition: fl_vertex.cxx:45
Fl_Image
Fl_Image is the base class used for caching and drawing all kinds of images in FLTK.
Definition: Fl_Image.H:52
fl_text_extents
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:72
fl_can_do_alpha_blending
FL_EXPORT char fl_can_do_alpha_blending()
Checks whether platform supports true alpha blending for RGBA images.
Definition: Fl_Double_Window.cxx:233
Fl_Graphics_Driver::point
virtual void point(int x, int y)
see fl_point(int x, int y).
Definition: fl_rect.cxx:487
Fl_Graphics_Driver::rotate
void rotate(double d)
see fl_rotate(double d).
Definition: fl_vertex.cxx:63
FL_DASHDOT
line style: _ . _ . _ .
Definition: fl_draw.H:182
Fl_Graphics_Driver::clip_region
Fl_Region clip_region()
see fl_clip_region().
Definition: fl_rect.cxx:549
fl_draw_symbol
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:103
Fl_Graphics_Driver::end_loop
virtual void end_loop()
see fl_end_loop().
Definition: fl_vertex.cxx:159
Fl_Graphics_Driver::rtl_draw
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).
Definition: Fl_Device.H:251
Fl_Graphics_Driver::transformed_vertex
virtual void transformed_vertex(double xf, double yf)
see fl_transformed_vertex(double xf, double yf).
Definition: fl_vertex.cxx:103
fl_end_line
void fl_end_line()
Ends list of lines, and draws.
Definition: fl_draw.H:432
Fl_Boxtype
Fl_Boxtype
Definition: Enumerations.H:473
Fl_Graphics_Driver::height
virtual int height()
see fl_height().
Definition: Fl_Device.H:391
fl_size
Fl_Fontsize fl_size()
Returns the size set by the most recent call to fl_font().
Definition: fl_draw.H:520
fl_measure_pixmap
FL_EXPORT int fl_measure_pixmap(char *const *data, int &w, int &h)
Get the dimensions of a pixmap.
Definition: fl_draw_pixmap.cxx:52
fl_chord
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
fl_end_loop
void fl_end_loop()
Ends closed sequence of lines, and draws.
Definition: fl_draw.H:436
fl_add_symbol
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:78
Enumerations.H
This file contains type definitions and general enumerations.
fl_curve
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:388
fl_graphics_driver
FL_EXPORT Fl_Graphics_Driver * fl_graphics_driver
Points to the driver that currently receives all graphics requests.
Definition: Fl_Device.cxx:46
Fl_Graphics_Driver::begin_polygon
virtual void begin_polygon()
see fl_begin_polygon().
Definition: fl_vertex.cxx:81
Fl_Graphics_Driver::end_line
virtual void end_line()
see fl_end_line().
Definition: fl_vertex.cxx:133
Fl_Graphics_Driver::end_complex_polygon
virtual void end_complex_polygon()
see fl_end_complex_polygon().
Definition: fl_vertex.cxx:213
Fl_Graphics_Driver::begin_complex_polygon
virtual void begin_complex_polygon()
see fl_begin_complex_polygon().
Definition: fl_vertex.cxx:192
Fl_Graphics_Driver::polygon
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).
Definition: fl_rect.cxx:435
Fl_Graphics_Driver::descent
virtual int descent()
see fl_descent().
Definition: Fl_Device.H:393
fl_transform_dy
double fl_transform_dy(double x, double y)
Transforms distance using current transformation matrix.
Definition: fl_draw.H:487
fl_end_polygon
void fl_end_polygon()
Ends convex filled polygon, and draws.
Definition: fl_draw.H:440
Fl_Window.H
Fl_Window widget .
FL_CAP_SQUARE
cap style: end wraps end point
Definition: fl_draw.H:187
FL_DASH
line style: _ _ _ _ _ _
Definition: fl_draw.H:180
Fl_Graphics_Driver::line_style
virtual void line_style(int style, int width=0, char *dashes=0)
see fl_line_style(int style, int width, char* dashes).
Definition: fl_line_style.cxx:50
fl_mult_matrix
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:357
fl_begin_points
void fl_begin_points()
Starts drawing a list of points.
Definition: fl_draw.H:362
fl_line_style
void fl_line_style(int style, int width=0, char *dashes=0)
Sets how to draw lines (the "pen").
Definition: fl_draw.H:177
fl_frame2
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:105
fl_transform_x
double fl_transform_x(double x, double y)
Transforms coordinate using the current transformation matrix.
Definition: fl_draw.H:472
fl_draw_box
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:386
fl_scale
void fl_scale(double x, double y)
Concatenates scaling transformation onto the current one.
Definition: fl_draw.H:335
fl_expand_text
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 control characters with ^X.
Definition: fl_draw.cxx:135
Fl_Graphics_Driver::begin_line
virtual void begin_line()
see fl_begin_line().
Definition: fl_vertex.cxx:77
fl_end_points
void fl_end_points()
Ends list of points, and draws.
Definition: fl_draw.H:428
Fl_Graphics_Driver::gap
virtual void gap()
see fl_gap().
Definition: fl_vertex.cxx:200
Fl_Image::data
const char *const * data() const
Returns a pointer to the current image data array.
Definition: Fl_Image.H:120
Fl_Graphics_Driver::curve
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...
Definition: fl_curve.cxx:32
Fl_Fontsize
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:768
FL_DASHDOTDOT
line style: _ . . _ . .
Definition: fl_draw.H:183
fl_draw_pixmap
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:78
fl_rectf
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:206
FL_CAP_ROUND
cap style: end is round
Definition: fl_draw.H:186
Fl_Graphics_Driver::font
virtual void font(Fl_Font face, Fl_Fontsize fsize)
see fl_font(Fl_Font face, Fl_Fontsize size).
Definition: Fl_Device.H:379
fl_draw
FL_EXPORT void fl_draw(const char *str, int x, int y)
Draws a nul-terminated UTF-8 string starting at the given x, y location.
Definition: fl_font.cxx:64
Fl_Graphics_Driver::translate
void translate(double x, double y)
see fl_translate(double x, double y).
Definition: Fl_Device.H:324
Fl_Graphics_Driver::vertex
virtual void vertex(double x, double y)
see fl_vertex(double x, double y).
Definition: fl_vertex.cxx:111
fl_begin_loop
void fl_begin_loop()
Starts drawing a closed sequence of lines.
Definition: fl_draw.H:370
Fl_Graphics_Driver::restore_clip
void restore_clip()
see fl_restore_clip().
Definition: fl_rect.cxx:514
fl_draw_image_mono
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:687
Fl_Image::d
int d() const
Returns the current image depth.
Definition: Fl_Image.H:102
Fl_Graphics_Driver::transform_dx
double transform_dx(double x, double y)
see fl_transform_dx(double x, double y).
Definition: fl_vertex.cxx:87
fl_yxline
void fl_yxline(int x, int y, int y1)
Draws a vertical line from (x,y) to (x,y1)
Definition: fl_draw.H:270
Fl_Color
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition: Enumerations.H:796
Fl_Graphics_Driver::yxline
virtual void yxline(int x, int y, int y1)
see fl_yxline(int x, int y, int y1).
Definition: fl_rect.cxx:265
fl_push_no_clip
void fl_push_no_clip()
Pushes an empty clip region onto the stack so nothing will be clipped.
Definition: fl_draw.H:95
fl_transform_y
double fl_transform_y(double x, double y)
Transforms coordinate using the current transformation matrix.
Definition: fl_draw.H:477
Fl_Draw_Image_Cb
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:49
Fl_Font
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:739
Fl_Graphics_Driver::draw_image
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).
Definition: Fl_Device.H:344
Fl_Graphics_Driver::push_no_clip
virtual void push_no_clip()
see fl_push_no_clip().
Definition: fl_rect.cxx:590
Fl_Graphics_Driver::circle
virtual void circle(double x, double y, double r)
see fl_circle(double x, double y, double r).
Definition: fl_vertex.cxx:244
Fl_Graphics_Driver::push_matrix
void push_matrix()
see fl_push_matrix().
Definition: fl_vertex.cxx:38
Fl_Graphics_Driver::arc
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).
Definition: fl_arc.cxx:37
FL_DOT
line style: . . . . . .
Definition: fl_draw.H:181
Fl_Graphics_Driver::pie
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).
Definition: fl_arci.cxx:76
Fl_Align
unsigned Fl_Align
FLTK type for alignment control.
Definition: Enumerations.H:690
fl_translate
void fl_translate(double x, double y)
Concatenates translation transformation onto the current one.
Definition: fl_draw.H:345
fl_shortcut_label
FL_EXPORT const char * fl_shortcut_label(unsigned int shortcut)
Get a human-readable string from a shortcut value.
Definition: fl_shortcut.cxx:169
Fl_Image::w
int w() const
Returns the current image width in pixels.
Definition: Fl_Image.H:93
Fl_Graphics_Driver::scale
void scale(double x, double y)
see fl_scale(double x, double y).
Definition: Fl_Device.H:320
fl_vertex
void fl_vertex(double x, double y)
Adds a single vertex to the current path.
Definition: fl_draw.H:379
fl_mac_roman_to_local
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:100
fl_frame
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:71
fl_pop_matrix
void fl_pop_matrix()
Restores the current transformation matrix from the stack.
Definition: fl_draw.H:330
Fl_Graphics_Driver::line
virtual void line(int x, int y, int x1, int y1)
see fl_line(int x, int y, int x1, int y1).
Definition: fl_rect.cxx:334
fl_polygon
void fl_polygon(int x, int y, int x1, int y1, int x2, int y2)
Fills a 3-sided polygon.
Definition: fl_draw.H:244
Fl_Graphics_Driver::color
virtual void color(Fl_Color c)
see fl_color(Fl_Color c).
Definition: Fl_Device.H:253
fl_xyline
void fl_xyline(int x, int y, int x1)
Draws a horizontal line from (x,y) to (x1,y)
Definition: fl_draw.H:255
Fl_Graphics_Driver::transform_y
double transform_y(double x, double y)
see fl_transform_y(double x, double y).
Definition: fl_vertex.cxx:85
FL_JOIN_BEVEL
join style: line join is tidied
Definition: fl_draw.H:191
Fl_Image::h
int h() const
Returns the current image height in pixels.
Definition: Fl_Image.H:96
fl_restore_clip
void fl_restore_clip()
Undoes any clobbering of clip done by your program.
Definition: fl_draw.H:129
Fl_Graphics_Driver::rectf
virtual void rectf(int x, int y, int w, int h)
see fl_rectf(int x, int y, int w, int h).
Definition: fl_rect.cxx:180
Fl_Graphics_Driver::clip_box
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).
Definition: fl_rect.cxx:636
fl_read_image
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:84
Fl_Graphics_Driver::end_polygon
virtual void end_polygon()
see fl_end_polygon().
Definition: fl_vertex.cxx:165
Fl_Graphics_Driver::transform_dy
double transform_dy(double x, double y)
see fl_transform_dy(double x, double y).
Definition: fl_vertex.cxx:89
Fl_Graphics_Driver::push_clip
virtual void push_clip(int x, int y, int w, int h)
see fl_push_clip(int x, int y, int w, int h).
Definition: fl_rect.cxx:553
fl_rtl_draw
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.
Definition: fl_draw.H:627
fl_cursor
FL_EXPORT void fl_cursor(Fl_Cursor)
Sets the cursor for the current window to the specified shape and colors.
Definition: fl_cursor.cxx:42
fl_line
void fl_line(int x, int y, int x1, int y1)
Draws a line from (x,y) to (x1,y1)
Definition: fl_draw.H:223
Fl_Graphics_Driver::transform_x
double transform_x(double x, double y)
see fl_transform_x(double x, double y).
Definition: fl_vertex.cxx:83
fl_arc
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:304
fl_measure
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:376
Fl_Graphics_Driver::width
virtual double width(const char *str, int n)
see fl_width(const char *str, int n).
Definition: Fl_Device.H:385
Fl_Graphics_Driver::end_points
virtual void end_points()
see fl_end_points().
Definition: fl_vertex.cxx:115
Fl_Graphics_Driver::mult_matrix
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_vertex.cxx:52
FL_JOIN_ROUND
join style: line join is rounded
Definition: fl_draw.H:190
Fl_Graphics_Driver::draw
virtual void draw(const char *str, int n, int x, int y)
see fl_draw(const char *str, int n, int x, int y).
Definition: Fl_Device.H:244
uchar
unsigned char uchar
unsigned char
Definition: fl_types.h:30
fl_font
void fl_font(Fl_Font face, Fl_Fontsize fsize)
Sets the current font, which is then used in various drawing routines.
Definition: fl_draw.H:509
fl_rect
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:201
fl_push_clip
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:82
fl_pie
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:317
fl_width
FL_EXPORT double fl_width(const char *txt)
Returns the typographical width of a nul-terminated string using the current font face and size...
Definition: fl_font.cxx:59
fl_circle
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:424
- © 1998-2014 by Bill Spitzak and others.