Struct iui::draw::DrawContext [−][src]
pub struct DrawContext { /* fields omitted */ }Drawing context, used to draw custom content on the screen.
Methods
impl DrawContext[src]
impl DrawContextpub unsafe fn from_ui_draw_context(
ui_draw_context: *mut uiDrawContext
) -> DrawContext[src]
pub unsafe fn from_ui_draw_context(
ui_draw_context: *mut uiDrawContext
) -> DrawContextCreate 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]
pub fn stroke(
&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]
pub fn fill(&self, ctx: &UI, path: &Path, brush: &Brush)Draw a fill on this DrawContext using the given Path using the given Brush.
pub fn transform(&self, _ctx: &UI, txform: &Transform)[src]
pub fn transform(&self, _ctx: &UI, txform: &Transform)Transform this DrawContext by the given Transform.
pub fn save(&self, _ctx: &UI)[src]
pub fn save(&self, _ctx: &UI)Open a modal allowing the user to save the contents of this DrawContext.
pub fn restore(&self, _ctx: &UI)[src]
pub fn restore(&self, _ctx: &UI)Open a modal allowing the user to load the contents of a DrawContext onto this one.
Auto Trait Implementations
impl !Send for DrawContext
impl !Send for DrawContextimpl !Sync for DrawContext
impl !Sync for DrawContext