Struct kansas::context::Context [−][src]
pub struct Context { /* fields omitted */ }
Methods
impl Context
[src]
impl Context
pub fn new(width: u32, height: u32, ev_loop: &EventsLoop) -> Self
[src]
pub fn new(width: u32, height: u32, ev_loop: &EventsLoop) -> Self
pub fn dimensions(&self) -> (u32, u32)
[src]
pub fn dimensions(&self) -> (u32, u32)
dimensions
pub fn fill_color<C>(&mut self, color: C) where
C: CanvasColor,
[src]
pub fn fill_color<C>(&mut self, color: C) where
C: CanvasColor,
set fill color
pub fn fill_rect(&mut self, x: u32, y: u32, width: u32, height: u32)
[src]
pub fn fill_rect(&mut self, x: u32, y: u32, width: u32, height: u32)
fill rectangle with preset fill color
pub fn fill_by<C, F>(&mut self, x: u32, y: u32, width: u32, height: u32, f: F) where
F: Fn(u32, u32) -> C,
C: CanvasColor,
[src]
pub fn fill_by<C, F>(&mut self, x: u32, y: u32, width: u32, height: u32, f: F) where
F: Fn(u32, u32) -> C,
C: CanvasColor,
fill rectangle using a fill function
pub fn set_pixel<C: CanvasColor>(&mut self, x: u32, y: u32, c: C)
[src]
pub fn set_pixel<C: CanvasColor>(&mut self, x: u32, y: u32, c: C)
set a pixel to a specific color
this is a low level texture operation and is not effected by preset colors or alpha blending