26#include <FL/Fl_Graphics_Driver.H>
27#include <FL/Fl_Rect.H>
34FL_EXPORT
extern char fl_draw_shortcut;
394inline void fl_line(
int x,
int y,
int x1,
int y1,
int x2,
int y2) {
402inline void fl_loop(
int x,
int y,
int x1,
int y1,
int x2,
int y2) {
408inline void fl_loop(
int x,
int y,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3) {
422inline void fl_polygon(
int x,
int y,
int x1,
int y1,
int x2,
int y2,
int x3,
int y3) {
494inline void fl_arc(
int x,
int y,
int w,
int h,
double a1,
double a2) {
512inline void fl_pie(
int x,
int y,
int w,
int h,
double a1,
double a2) {
516FL_EXPORT
void fl_chord(
int x,
int y,
int w,
int h,
double a1,
double a2);
621inline void fl_curve(
double X0,
double Y0,
double X1,
double Y1,
double X2,
double Y2,
double X3,
double Y3) {
653inline void fl_arc(
double x,
double y,
double r,
double start,
double end) {
826FL_EXPORT
double fl_width(
const char *txt);
929FL_EXPORT
void fl_draw(
const char *str,
int x,
int y);
937FL_EXPORT
void fl_draw(
int angle,
const char *str,
int x,
int y);
941inline void fl_draw(
const char *str,
int n,
int x,
int y) {
953inline void fl_draw(
int angle,
const char *str,
int n,
int x,
int y) {
962FL_EXPORT
void fl_measure(
const char *str,
int &
x,
int &
y,
int draw_symbols = 1);
964 int draw_symbols = 1);
966 void (*callthis)(
const char *,
int,
int,
int),
Fl_Image *img = 0,
int draw_symbols = 1);
970FL_EXPORT
void fl_frame(
const char *s,
int x,
int y,
int w,
int h);
971FL_EXPORT
void fl_frame2(
const char *s,
int x,
int y,
int w,
int h);
1073inline void fl_draw_image(Fl_Draw_Image_Cb cb,
void *data,
int X,
int Y,
int W,
int H,
int D = 3) {
1091 return Fl_Graphics_Driver::default_driver().can_do_alpha_blending();
1121FL_EXPORT
void fl_scroll(
int X,
int Y,
int W,
int H,
int dx,
int dy,
1122 void (*draw_area)(
void *,
int,
int,
int,
int),
void *data);
1124FL_EXPORT
const char *
fl_shortcut_label(
unsigned int shortcut,
const char **eom);
1130FL_EXPORT
const char *
fl_expand_text(
const char *from,
char *buf,
int maxbuf,
double maxw,
1131 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:1044
Fl_Arrow_Type
Arrow types define the type of arrow drawing function.
Definition Enumerations.H:1342
unsigned Fl_Align
FLTK type for alignment control.
Definition Enumerations.H:967
Fl_Cursor
The following constants define the mouse cursors that are available in FLTK.
Definition Enumerations.H:1261
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition Enumerations.H:1101
int Fl_Fontsize
Size of a font in pixels.
Definition Enumerations.H:1073
Fl_Boxtype
FLTK standard box types.
Definition Enumerations.H:626
Fl_Orientation
Fl_Orientation describes the orientation of a GUI element.
Definition Enumerations.H:1371
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:351
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:820
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:803
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
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
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:812
Fl_Font fl_font()
Return the face set by the most recent call to fl_font().
Definition fl_draw.H:796
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
Fl_Color fl_color()
Return the last fl_color() that was set.
Definition fl_draw.H:74
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:649
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:708
void fl_vertex(double x, double y)
Add a single vertex to the current path.
Definition fl_draw.H:610
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:56
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:129
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
Fl_Region fl_clip_region()
Return the current clipping region.
Definition fl_draw.H:206
void fl_gap()
Separate loops of the path.
Definition fl_draw.H:717
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:330
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:550
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:585
double fl_transform_dy(double x, double y)
Transform distance using current transformation matrix.
Definition fl_draw.H:752
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:494
void fl_begin_loop()
Start drawing a closed sequence of lines.
Definition fl_draw.H:597
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:759
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
const char * fl_shortcut_label(unsigned int shortcut)
Get a human-readable string from a shortcut value.
Definition fl_shortcut.cxx:130
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:621
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:317
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:959
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:745
void fl_end_loop()
End closed sequence of lines, and draw.
Definition fl_draw.H:686
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:536
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:338
void fl_begin_polygon()
Start drawing a convex filled polygon.
Definition fl_draw.H:603
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:614
void fl_rect(int x, int y, int w, int h)
Draw a border inside the given bounding box.
Definition fl_draw.H:289
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:249
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:402
void fl_yxline(int x, int y, int y1)
Draw a vertical line from (x,y) to (x,y1)
Definition fl_draw.H:451
void fl_polygon(int x, int y, int x1, int y1, int x2, int y2)
Fill a 3-sided polygon.
Definition fl_draw.H:416
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:769
char fl_can_do_alpha_blending()
Check whether platform supports true alpha blending for RGBA images.
Definition fl_draw.H:1090
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:680
unsigned int fl_old_shortcut(const char *s)
Emulation of XForms named shortcuts.
Definition fl_shortcut.cxx:274
void fl_draw_check(Fl_Rect bb, Fl_Color col)
Draw a check mark inside the given bounding box.
Definition fl_draw.cxx:508
void fl_pop_matrix()
Restore the current transformation matrix from the stack.
Definition fl_draw.H:529
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:183
void fl_rotate(double d)
Concatenate rotation transformation onto the current one.
Definition fl_draw.H:557
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:512
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:579
void fl_restore_scale(float s)
Restores the GUI scaling factor and the clipping region in subsequent drawing operations.
Definition fl_draw.cxx:482
double fl_transform_x(double x, double y)
Transform coordinate using the current transformation matrix.
Definition fl_draw.H:731
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:375
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:668
void fl_push_matrix()
Save the current transformation matrix on the stack.
Definition fl_draw.H:523
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:723
void fl_xyline(int x, int y, int x1)
Draw a horizontal line from (x,y) to (x1,y).
Definition fl_draw.H:430
void fl_end_polygon()
End convex filled polygon, and draw.
Definition fl_draw.H:692
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:298
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:476
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:591
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:570
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
int fl_antialias()
Return whether line drawings are currently antialiased.
Definition fl_draw.H:278
void fl_line(int x, int y, int x1, int y1)
Draw a line from (x,y) to (x1,y1)
Definition fl_draw.H:388
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:738
void fl_end_points()
End list of points, and draw.
Definition fl_draw.H:674
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:451
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:1026
void fl_load_identity()
Set the transformation matrix to identity.
Definition fl_draw.H:563
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:1034
@ FL_DASH
line style: _ _ _ _ _ _
Definition fl_draw.H:254
@ FL_CAP_FLAT
cap style: end is flat
Definition fl_draw.H:259
@ FL_JOIN_ROUND
join style: line join is rounded
Definition fl_draw.H:264
@ FL_JOIN_BEVEL
join style: line join is tidied
Definition fl_draw.H:265
@ FL_JOIN_MITER
join style: line join extends to a point
Definition fl_draw.H:263
@ FL_CAP_SQUARE
cap style: end wraps end point
Definition fl_draw.H:261
@ FL_DOT
line style: . . . . . .
Definition fl_draw.H:255
@ FL_DASHDOTDOT
line style: _ . . _ . .
Definition fl_draw.H:257
@ FL_SOLID
line style: ___________
Definition fl_draw.H:253
@ FL_DASHDOT
line style: _ . _ . _ .
Definition fl_draw.H:256
@ FL_CAP_ROUND
cap style: end is round
Definition fl_draw.H:260