Module fltk::draw[][src]

Expand description

Drawing primitives

Structs

Defines a coordinate of x and y

Defines the line styles supported by fltk

Opaque type around Fl_Offscreen

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 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

Draws a 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. The string must contain groups of 4 letters which specify one of 24 standard grayscale values, where ‘A’ is black and ‘X’ is white. The order of each set of 4 characters is: top, left, bottom, right.

Draws a series of line segments around the given box Differs from frame() by the order of the line segments which is bottom, right, top, left.

Draw an image into a widget. Requires a call to app::set_visual(Mode::Rgb8).unwrap()

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 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 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

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

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 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

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

Type Definitions

Opaque type around Fl_Region