26#include <FL/Fl_Graphics_Driver.H>
27#include <FL/Fl_Rect.H>
34FL_EXPORT
extern char fl_draw_shortcut;
403inline void fl_line(
int x,
int y,
int x1,
int y1,
int x2,
int y2) {
411inline void fl_loop(
int x,
int y,
int x1,
int y1,
int x2,
int y2) {
417inline void fl_loop(
int x,
int y,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3) {
431inline void fl_polygon(
int x,
int y,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3) {
503inline void fl_arc(
int x,
int y,
int w,
int h,
double a1,
double a2) {
521inline void fl_pie(
int x,
int y,
int w,
int h,
double a1,
double a2) {
525FL_EXPORT
void fl_chord(
int x,
int y,
int w,
int h,
double a1,
double a2);
630inline void fl_curve(
double X0,
double Y0,
double X1,
double Y1,
double X2,
double Y2,
double X3,
double Y3) {
668inline void fl_arc(
double x,
double y,
double r,
double start,
double end) {
841FL_EXPORT
double fl_width(
const char *txt);
944FL_EXPORT
void fl_draw(
const char *str,
int x,
int y);
952FL_EXPORT
void fl_draw(
int angle,
const char *str,
int x,
int y);
956inline void fl_draw(
const char *str,
int n,
int x,
int y) {
968inline void fl_draw(
int angle,
const char *str,
int n,
int x,
int y) {
977FL_EXPORT
void fl_measure(
const char *str,
int &
x,
int &
y,
int draw_symbols = 1);
1000FL_EXPORT
void fl_draw(
const char *str,
int x,
int y,
int w,
int h,
1002 int draw_symbols = 1,
int spacing = 0);
1019 void (*callthis)(
const char *,
int,
int,
int),
1020 Fl_Image *img = 0,
int draw_symbols = 1,
int spacing = 0);
1024FL_EXPORT
void fl_frame(
const char *s,
int x,
int y,
int w,
int h);
1025FL_EXPORT
void fl_frame2(
const char *s,
int x,
int y,
int w,
int h);
1128inline void fl_draw_image(Fl_Draw_Image_Cb cb,
void *data,
int X,
int Y,
int W,
int H,
int D = 3) {
1146 return Fl_Graphics_Driver::default_driver().can_do_alpha_blending();
1176FL_EXPORT
void fl_scroll(
int X,
int Y,
int W,
int H,
int dx,
int dy,
1177 void (*draw_area)(
void *,
int,
int,
int,
int),
void *data);
1179FL_EXPORT
const char *
fl_shortcut_label(
unsigned int shortcut,
const char **eom);
1185FL_EXPORT
const char *
fl_expand_text(
const char *from,
char *buf,
int maxbuf,
double maxw,
1186 int &n,
double &width,
int wrap,
int draw_symbols = 0);
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:1054
Fl_Arrow_Type
Arrow types define the type of arrow drawing function.
Definition: Enumerations.H:1355
unsigned Fl_Align
FLTK type for alignment control.
Definition: Enumerations.H:977
Fl_Cursor
The following constants define the mouse cursors that are available in FLTK.
Definition: Enumerations.H:1274
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition: Enumerations.H:1111
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:1083
Fl_Boxtype
FLTK standard box types.
Definition: Enumerations.H:635
Fl_Orientation
Fl_Orientation describes the orientation of a GUI element.
Definition: Enumerations.H:1384
Fl_Graphics_Driver * fl_graphics_driver
Points to the driver that currently receives all graphics requests.
Definition: Fl_Graphics_Driver.cxx:23
void end()
Exactly the same as current(this->parent()).
Definition: Fl_Group.cxx:73
Base class for image caching, scaling and drawing.
Definition: Fl_Image.H:60
The Fl_RGB_Image class supports caching and drawing of full-color images with 1 to 4 channels of colo...
Definition: Fl_Image.H:339
Rectangle with standard FLTK coordinates (X, Y, W, H).
Definition: Fl_Rect.H:30
int y() const
gets the y coordinate (top edge)
Definition: Fl_Rect.H:73
int w() const
gets the width
Definition: Fl_Rect.H:74
int h() const
gets the height
Definition: Fl_Rect.H:75
int x() const
gets the x coordinate (left edge)
Definition: Fl_Rect.H:72
This widget produces an actual window.
Definition: Fl_Window.H:55
const char * label() const
See void Fl_Window::label(const char*)
Definition: Fl_Window.H:357
unsigned char uchar
unsigned char
Definition: fl_types.h:30
int fl_descent()
Return the recommended distance above the bottom of a fl_height() tall box to draw the text at so it ...
Definition: fl_draw.H:835
const char * fl_local_to_mac_roman(const char *t, int n=-1)
Convert text from local encoding to Mac Roman character set.
Definition: fl_encoding_mac_roman.cxx:111
Fl_Fontsize fl_size()
Return the size set by the most recent call to fl_font().
Definition: fl_draw.H:818
void fl_text_extents(const char *, int &dx, int &dy, int &w, int &h)
Determine the minimum pixel dimensions of a nul-terminated string using the current fl_font().
Definition: fl_font.cxx:40
double fl_width(const char *txt)
Return the typographical width of a nul-terminated string using the current font face and size.
Definition: fl_font.cxx:27
void fl_font(Fl_Font face, Fl_Fontsize fsize)
Sets the current font, which is then used in various drawing routines.
Definition: fl_draw.cxx:550
const char * fl_latin1_to_local(const char *t, int n=-1)
Convert text from Windows/X11 latin1 character set to local encoding.
Definition: fl_encoding_latin1.cxx:64
void fl_color(Fl_Color c)
Set the color for all subsequent drawing operations.
Definition: fl_draw.H:50
const char * fl_local_to_latin1(const char *t, int n=-1)
Convert text from local encoding to Windows/X11 latin1 character set.
Definition: fl_encoding_latin1.cxx:69
int fl_height()
Return the recommended minimum line spacing for the current font.
Definition: fl_draw.H:827
const char * fl_mac_roman_to_local(const char *t, int n=-1)
Convert text from Mac Roman character set to local encoding.
Definition: fl_encoding_mac_roman.cxx:115
void fl_draw_radio(int x, int y, int d, Fl_Color color)
Draw a round check mark (circle) of a radio button.
Definition: fl_draw.cxx:761
void fl_set_status(int X, int Y, int W, int H)
Related to text input methods under X11.
Definition: fl_font.cxx:68
void fl_push_no_clip()
Push an empty clip region onto the stack so nothing will be clipped.
Definition: fl_draw.H:105
void fl_begin_complex_polygon()
Start drawing a complex filled polygon.
Definition: fl_draw.H:723
void fl_vertex(double x, double y)
Add a single vertex to the current path.
Definition: fl_draw.H:619
void fl_begin_offscreen(Fl_Offscreen b)
Send all subsequent drawing commands to this offscreen buffer.
Definition: Fl_Image_Surface.cxx:331
Fl_RGB_Image * fl_capture_window(Fl_Window *win, int x, int y, int w, int h)
Captures the content of a rectangular zone of a mapped window.
Definition: fl_read_image.cxx:104
int fl_measure_pixmap(char *const *data, int &w, int &h)
Get the dimensions of a pixmap.
Definition: fl_draw_pixmap.cxx:57
void fl_clip(int x, int y, int w, int h)
Intersect the current clip region with a rectangle and push this new region onto the stack (deprecate...
Definition: fl_draw.H:99
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:187
void fl_point(int x, int y)
Draw a single pixel at the given coordinates.
Definition: fl_draw.H:215
Fl_Offscreen fl_create_offscreen(int w, int h)
Creation of an offscreen graphics buffer.
Definition: Fl_Image_Surface.cxx:306
void fl_gap()
Separate loops of the path.
Definition: fl_draw.H:732
void fl_rectf(int x, int y, int w, int h)
Color with current color a rectangle that exactly fills the given bounding box.
Definition: fl_draw.H:339
int fl_not_clipped(int x, int y, int w, int h)
Does the rectangle intersect the current clip region?
Definition: fl_draw.H:132
void fl_translate(double x, double y)
Concatenate translation transformation onto the current one.
Definition: fl_draw.H:559
void fl_overlay_clear()
Erase a selection rectangle without drawing a new one.
Definition: fl_overlay.cxx:82
void fl_begin_points()
Start drawing a list of points.
Definition: fl_draw.H:594
double fl_transform_dy(double x, double y)
Transform distance using current transformation matrix.
Definition: fl_draw.H:767
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:503
void fl_begin_loop()
Start drawing a closed sequence of lines.
Definition: fl_draw.H:606
void fl_rescale_offscreen(Fl_Offscreen &ctx)
Adapts an offscreen buffer to a changed value of the scale factor.
Definition: Fl_Image_Surface.cxx:353
void fl_transformed_vertex(double xf, double yf)
Add coordinate pair to the vertex list without further transformations.
Definition: fl_draw.H:774
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:36
void fl_draw(const char *str, int x, int y)
Draw a nul-terminated UTF-8 string starting at the given x, y location.
Definition: fl_font.cxx:32
void fl_antialias(int state)
Turn antialiased line drawings ON or OFF, if supported by platform.
Definition: fl_draw.H:282
const char * fl_shortcut_label(unsigned int shortcut)
Get a human-readable string from a shortcut value.
Definition: fl_shortcut.cxx:131
void fl_curve(double X0, double Y0, double X1, double Y1, double X2, double Y2, double X3, double Y3)
Add a series of points on a Bézier curve to the path.
Definition: fl_draw.H:630
void fl_focus_rect(int x, int y, int w, int h)
Draw a dotted rectangle, used to indicate keyboard focus on a widget.
Definition: fl_draw.H:326
void fl_rtl_draw(const char *str, int n, int x, int y)
Draw a UTF-8 string of length n bytes right to left starting at the given x, y location.
Definition: fl_draw.H:974
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:40
double fl_transform_dx(double x, double y)
Transform distance using current transformation matrix.
Definition: fl_draw.H:760
void fl_end_loop()
End closed sequence of lines, and draw.
Definition: fl_draw.H:701
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:144
void fl_scale(double x, double y)
Concatenate scaling transformation onto the current one.
Definition: fl_draw.H:545
void fl_rounded_rectf(int x, int y, int w, int h, int r)
Color with current color a rounded rectangle that exactly fills the given bounding box.
Definition: fl_draw.H:347
void fl_begin_polygon()
Start drawing a convex filled polygon.
Definition: fl_draw.H:612
void fl_draw_circle(int x, int y, int d, Fl_Color color)
Draw a potentially small, filled circle using a given color.
Definition: fl_draw.cxx:726
void fl_rect(int x, int y, int w, int h)
Draw a border inside the given bounding box.
Definition: fl_draw.H:298
void fl_cursor(Fl_Cursor)
Sets the cursor for the current window to the specified shape and colors.
Definition: fl_cursor.cxx:41
int fl_clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H)
Intersect a rectangle with the current clip region and return the bounding box of the result.
Definition: fl_draw.H:178
void fl_line_style(int style, int width=0, char *dashes=0)
Set how to draw lines (the "pen").
Definition: fl_draw.H:252
void fl_delete_offscreen(Fl_Offscreen bitmap)
Deletion of an offscreen graphics buffer.
Definition: Fl_Image_Surface.cxx:316
void fl_pop_clip()
Restore the previous clip region.
Definition: fl_draw.H:115
int fl_add_symbol(const char *name, void(*drawit)(Fl_Color), int scalable)
Adds a symbol to the system.
Definition: fl_symbols.cxx:76
void fl_loop(int x, int y, int x1, int y1, int x2, int y2)
Outline a 3-sided polygon with lines.
Definition: fl_draw.H:411
void fl_yxline(int x, int y, int y1)
Draw a vertical line from (x,y) to (x,y1)
Definition: fl_draw.H:460
void fl_polygon(int x, int y, int x1, int y1, int x2, int y2)
Fill a 3-sided polygon.
Definition: fl_draw.H:425
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.
Definition: fl_draw.H:784
char fl_can_do_alpha_blending()
Check whether platform supports true alpha blending for RGBA images.
Definition: fl_draw.H:1145
void fl_set_spot(int font, int size, int X, int Y, int W, int H, Fl_Window *win=0)
Inform text input methods about the current text insertion cursor.
Definition: fl_font.cxx:53
void fl_end_line()
End list of lines, and draw.
Definition: fl_draw.H:695
unsigned int fl_old_shortcut(const char *s)
Emulation of XForms named shortcuts.
Definition: fl_shortcut.cxx:275
void fl_draw_check(Fl_Rect bb, Fl_Color col)
Draw a check mark inside the given bounding box.
Definition: fl_draw.cxx:620
void fl_draw_box_focus(Fl_Boxtype, int x, int y, int w, int h, Fl_Color, Fl_Color)
Draws the focus rectangle inside a box using given type, position, size and color.
Definition: fl_boxtype.cxx:480
void fl_pop_matrix()
Restore the current transformation matrix from the stack.
Definition: fl_draw.H:538
int fl_draw_pixmap(const char *const *data, int x, int y, Fl_Color bg=FL_GRAY)
Draw XPM image data, with the top-left corner at the given position.
Definition: fl_draw_pixmap.cxx:184
void fl_clip_region(Fl_Region r)
Replace the top of the clipping stack with a clipping region of any shape.
Definition: fl_draw.H:196
void fl_rotate(double d)
Concatenate rotation transformation onto the current one.
Definition: fl_draw.H:566
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:521
void fl_mult_matrix(double a, double b, double c, double d, double x, double y)
Concatenate another transformation onto the current one.
Definition: fl_draw.H:588
void fl_restore_scale(float s)
Restores the GUI scaling factor and the clipping region in subsequent drawing operations.
Definition: fl_draw.cxx:594
double fl_transform_x(double x, double y)
Transform coordinate using the current transformation matrix.
Definition: fl_draw.H:746
void fl_push_clip(int x, int y, int w, int h)
Intersect the current clip region with a rectangle and push this new region onto the stack.
Definition: fl_draw.H:88
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:487
void fl_end_offscreen(void)
Quit sending drawing commands to the current offscreen buffer.
Definition: Fl_Image_Surface.cxx:342
void fl_circle(double x, double y, double r)
fl_circle(x,y,r) is equivalent to fl_arc(x,y,r,0,360), but may be faster.
Definition: fl_draw.H:683
void fl_push_matrix()
Save the current transformation matrix on the stack.
Definition: fl_draw.H:532
void fl_reset_spot(void)
Resets marked text.
Definition: fl_font.cxx:58
void fl_end_complex_polygon()
End complex filled polygon, and draw.
Definition: fl_draw.H:738
void fl_xyline(int x, int y, int x1)
Draw a horizontal line from (x,y) to (x1,y).
Definition: fl_draw.H:439
void fl_end_polygon()
End convex filled polygon, and draw.
Definition: fl_draw.H:707
void fl_rounded_rect(int x, int y, int w, int h, int r)
Draw a rounded border inside the given bounding box.
Definition: fl_draw.H:307
void fl_draw_arrow(Fl_Rect bb, Fl_Arrow_Type t, Fl_Orientation o, Fl_Color color)
Draw an "arrow like" GUI element for the selected scheme.
Definition: fl_draw_arrow.cxx:227
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
float fl_override_scale()
Removes any GUI scaling factor in subsequent drawing operations.
Definition: fl_draw.cxx:588
void fl_overlay_rect(int x, int y, int w, int h)
Draw a transient dotted selection rectangle.
Definition: fl_overlay.cxx:135
void fl_begin_line()
Start drawing a list of lines.
Definition: fl_draw.H:600
void fl_load_matrix(double a, double b, double c, double d, double x, double y)
Set the current transformation matrix.
Definition: fl_draw.H:579
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:110
void fl_line(int x, int y, int x1, int y1)
Draw a line from (x,y) to (x1,y1)
Definition: fl_draw.H:397
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:101
double fl_transform_y(double x, double y)
Transform coordinate using the current transformation matrix.
Definition: fl_draw.H:753
void fl_end_points()
End list of points, and draw.
Definition: fl_draw.H:689
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:468
void fl_restore_clip()
Undo any clobbering of the clip region done by your program.
Definition: fl_draw.H:183
void fl_draw_image(const uchar *buf, int X, int Y, int W, int H, int D=3, int L=0)
Draw an 8-bit per color RGB or luminance image.
Definition: fl_draw.H:1081
void fl_load_identity()
Set the transformation matrix to identity.
Definition: fl_draw.H:572
void fl_draw_image_mono(const uchar *buf, int X, int Y, int W, int H, int D=1, int L=0)
Draw a gray-scale (1 channel) image.
Definition: fl_draw.H:1089
@ FL_DASH
line style: 75% dashed line
Definition: fl_draw.H:263
@ FL_CAP_FLAT
cap style: end is flat
Definition: fl_draw.H:268
@ FL_JOIN_ROUND
join style: line join is rounded
Definition: fl_draw.H:273
@ FL_JOIN_BEVEL
join style: line join is tidied
Definition: fl_draw.H:274
@ FL_JOIN_MITER
join style: line join extends to a point
Definition: fl_draw.H:272
@ FL_CAP_SQUARE
cap style: end wraps end point
Definition: fl_draw.H:270
@ FL_DOT
line style: 50% pixel dotted
Definition: fl_draw.H:264
@ FL_DASHDOTDOT
line style: dash / two dot pattern
Definition: fl_draw.H:266
@ FL_SOLID
line style: solid line
Definition: fl_draw.H:262
@ FL_DASHDOT
line style: dash / dot pattern
Definition: fl_draw.H:265
@ FL_CAP_ROUND
cap style: end is round
Definition: fl_draw.H:269