Expand description
Drawing primitives
Structs
i32
Coordinates- Defines a pair of
x, y
coordinates - Defines the line styles supported by fltk
- Opaque type around
Fl_Offscreen
- Opaque type around
Fl_Region
Functions
- Starts drawing a complex filled polygon
- Starts drawing a list of lines
- Starts drawing a closed sequence of lines
- Starts drawing a list of points. Points are added to the list with
fl_vertex()
- Starts drawing a convex filled polygon
- Checks whether platform supports true alpha blending for RGBA images
- Captures the offscreen and returns raw data. Example usage:
- Captures the image surface object and returns raw data. Example usage:
- Captures part of the window and returns raw data. Example usage:
- Returns the typographical width of a single character
- Gets the clip region
- Returns the recommended distance above the bottom of a height() tall box to draw the text at so it looks centered vertically in that box
- Draws an arc
- Draws an arc
- Draws a box given the box type, size, position and color
- Draw a check mark
- Draws a circle
- Draws a filled circle
- Adds a series of points on a Bezier curve to the path
- Draws a focus rectangle
- Draws a series of line segments around the given box.
- Draws a series of line segments around the given box
- Draw an image into a widget. Requires a call to
app::set_visual(Mode::Rgb8).unwrap()
. Doesn’t support transparency, for that you would have to use RgbImage. - Draw an image into a widget. Requires a call to
app::set_visual(Mode::Rgb8).unwrap()
. A negative depth flips the image horizontally, while a negative line data flips it vertically. Allows passing a line-data parameter - Draws a line
- Draws a line from (x,y) to (x1,y1) and another from (x1,y1) to (x2,y2)
- Draws a non-filled 3-sided polygon
- Draws a non-filled 3-sided polygon
- Draws a non-filled 4-sided polygon
- Draws a filled pie
- Draws a point
- Draws a point
- Fills a 3-sided polygon. The polygon must be convex
- Fills a 3-sided polygon. The polygon must be convex
- Fills a 4-sided polygon. The polygon must be convex
- Draws a rounded box
- Draws a rectangle
- Draws a filled rectangle
- Draws a rectangle with border color
- Draws a filled rectangle
- Draws a filled rectangle with specified RGB color
- Draw a framebuffer (rgba) into a widget
- Draw a framebuffer (rgba) into a widget
- Draw a framebuffer (rgba) into a widget
- Draw a framebuffer (rgba) into a widget
- Draws a rounded rectangle
- Draws a filled rounded rectangle
- Draws a string starting at the given x, y location
- Draws a string starting at the given x, y location with width and height and alignment
- Draws a string starting at the given x, y location, rotated to an angle
- Like draw_text, however uses FLTK’s
fl_draw
which takes the length of the string, so it doesn’t need to allocate - Draws a horizontal line from (x,y) to (x1,y)
- Draws a horizontal line from (x,y) to (x1,y), then vertical from (x1,y) to (x1,y2)
- Draws a horizontal line from (x,y) to (x1,y), then a vertical from (x1,y) to (x1,y2) and then another horizontal from (x1,y2) to (x3,y2)
- Draws a vertical line from (x,y) to (x,y1)
- Draws a vertical line from (x,y) to (x,y1), then a horizontal from (x,y1) to (x2,y1)
- Draws a vertical line from (x,y) to (x,y1) then a horizontal from (x,y1) to (x2,y1), then another vertical from (x2,y1) to (x2,y3)
- Ends complex filled polygon, and draws
- Ends list of lines, and draws
- Ends closed sequence of lines, and draws
- Ends list of points, and draws
- Ends closed sequence of lines, and draws
- Gets the current font, which is used in various drawing routines
- Call gap() to separate loops of the path
- Gets the last used color
- gl_finish⚠
enable-glwindow
Finish drawing using OpenGL functions inside a widget’s draw routine - gl_start⚠
enable-glwindow
Start drawing using OpenGL functions inside a widget’s draw routine - Returns the recommended minimum line spacing for the current font
- Converts text from Windows/X11 latin1 character set to local encoding
- Converts text from local encoding to Windowx/X11 latin1 character set
- Measure the width and height of a text
- Concatenates another transformation onto the current one
- Returns whether the rectangle intersect with the current clip region
- Erase a selection rectangle without drawing a new one
- Draws a selection rectangle, erasing a previous one by XOR’ing it first.
- Puts the drawing back
- Pops the current transformation matrix from the stack
- Limits drawing to a region
- Saves the current transformation matrix on the stack
- Pushes an empty clip region onto the stack so nothing will be clipped
- Resets the spot within the window
- Restores the clip region
- Concatenates rotation transformation onto the current one
- Draws a UTF-8 string right to left starting at the given x, y location
- Concatenates scaling transformation onto the current one for both x & y
- Concatenates scaling transformation onto the current one
- Sets the clip region
- Sets the color using rgb values
- Sets the cursor style
- Sets the cursor style
- Sets the drawing color
- Sets the drawing color
- Sets the drawing color
- Sets the current font, which is then used in various drawing routines
- Sets the line spacing for the current font
- Sets the line style
- Sets spot within the window
- Sets the status
- Get a human-readable string from a shortcut value
- Shows a color map
- Gets the current font size, which is used in various drawing routines
- Measure the coordinates and size of the text where a bounding box using the returned data would fit the text
- Transforms distance using current transformation matrix
- Transforms distance using current transformation matrix
- Transforms coordinate using the current transformation matrix
- Transforms coordinate using the current transformation matrix
- Adds coordinate pair to the vertex list without further transformations
- Concatenates translation transformation onto the current one
- Adds a single vertex to the current path
- Returns the typographical width of a string
- Returns the typographical width of a sequence of n characters
- Measure the width and height of a text
Type Aliases
f64
Coordinatesi32
Coordinates