pub fn draw<FnAction>(&self, action: FnAction)
    where FnAction: Send+FnOnce(&mut DrawGraphicsContext) -> () {
        // Fill a buffer with the drawing actions
        let mut draw_actions = vec![];
        action(&mut draw_actions);

        draw_actions.insert(0, Draw::StartFrame);
        draw_actions.push(Draw::ShowFrame);

        // Send the actions to the core
        self.write(draw_actions);
    }
///
/// Provides a way to draw on this target via a graphics context
///
Provides a way to draw on this target via a graphics context
Provides a way to draw on this target via a graphics context
pub fn draw<FnAction>(&self, action: FnAction)
    where FnAction: Send+FnOnce(&mut DrawGraphicsContext) -> () {
        // Fill a buffer with the drawing actions
        let mut draw_actions = vec![];
        action(&mut draw_actions);
        draw_actions.insert(0, Draw::StartFrame);
        draw_actions.push(Draw::ShowFrame);
        // Send the actions to the core
        self.write(draw_actions);
    }
pub fn draw < FnAction > ( & self , action : FnAction ) where FnAction : Send + FnOnce ( & mut DrawGraphicsContext ) -> ( ) { // Fill a buffer with the drawing actions let mut draw_actions = vec ! [ ] ; action ( & mut draw_actions ) ; draw_actions . insert ( 0 , Draw :: StartFrame ) ; draw_actions . push ( Draw :: ShowFrame ) ; // Send the actions to the core self . write ( draw_actions ) ; }
Provides a way to draw on this target via a graphics context
Provides a way to draw on this target via a graphics context
&self
action
FnAction