Module draw_list

Source
Expand description

The draw list lets you create custom graphics within a window.

Each dear imgui window contains its own draw list. You can use Ui::get_window_draw_list to access the current window draw list and draw custom primitives. You can interleave normal widget calls and adding primitives to the current draw list.

Interaction is mostly through the mtehods DrawListMut struct, such as DrawListMut::add_line, however you can also construct structs like Line directly, then call Line::build with a reference to your draw list

There are examples such as draw_list.rs and custom_textures.rs within the imgui-examples directory

Structs§

BezierCurve
Represents a Bezier curve about to be drawn
ChannelsSplit
Represent the drawing interface within a call to channels_split.
Circle
Represents a circle about to be drawn
DrawListFlags
Draw list flags
DrawListMut
Object implementing the custom draw API.
ImDrawCornerFlags
Flags for indicating which corner of a rectangle should be rounded
Image
Image draw list primitive, not to be confused with the widget imgui::Image.
ImageQuad
Represents a image about to be drawn
ImageRounded
Represents a image about to be drawn. Similar to Image but with corners rounded with a given radius
Line
Represents a line about to be drawn
Rect
Represents a rectangle about to be drawn
Triangle
Represents a triangle about to be drawn on the window