Struct iui::draw::DrawContext
[−]
[src]
pub struct DrawContext { /* fields omitted */ }
Drawing context, used to draw custom content on the screen.
Methods
impl DrawContext
[src]
pub unsafe fn from_ui_draw_context(
ui_draw_context: *mut uiDrawContext
) -> DrawContext
[src]
ui_draw_context: *mut uiDrawContext
) -> DrawContext
Create a Context from a ui_draw_context pointer.
Unsafety
If the pointer is invalid, this is memory-unsafe. If libui is not initialized, behavior will be inconsistent.
pub fn stroke(
&self,
ctx: &UI,
path: &Path,
brush: &Brush,
stroke_params: &StrokeParams
)
[src]
&self,
ctx: &UI,
path: &Path,
brush: &Brush,
stroke_params: &StrokeParams
)
Draw a stroke on this DrawContext which runs along the given Path, with the given Brush and StrokeParams.
pub fn fill(&self, ctx: &UI, path: &Path, brush: &Brush)
[src]
Draw a fill on this DrawContext using the given Path using the given Brush.
pub fn transform(&self, _ctx: &UI, txform: &Transform)
[src]
Transform this DrawContext by the given Transform.
pub fn save(&self, _ctx: &UI)
[src]
Open a modal allowing the user to save the contents of this DrawContext.
pub fn restore(&self, _ctx: &UI)
[src]
Open a modal allowing the user to load the contents of a DrawContext onto this one.