[][src]Struct egaku2d_core::SimpleCanvas

pub struct SimpleCanvas { /* fields omitted */ }

Allows the user to start drawing shapes. The top left corner is the origin. y grows as you go down. x grows as you go right.

Methods

impl SimpleCanvas[src]

pub fn set_default_color(&mut self, color: [f32; 4])[src]

pub fn set_viewport(&mut self, window_dim: FixedAspectVec2, game_width: f32)[src]

pub unsafe fn new(window_dim: FixedAspectVec2) -> SimpleCanvas[src]

pub fn sprites(&mut self) -> SpriteSession[src]

pub fn circles(&mut self) -> CircleSession[src]

pub fn squares(&mut self) -> SquareSession[src]

pub fn rects(&mut self) -> RectSession[src]

pub fn arrows(&mut self, radius: f32) -> ArrowSession[src]

pub fn lines(&mut self, radius: f32) -> LineSession[src]

pub fn clear_color(&mut self, back_color: [f32; 3])[src]

pub unsafe fn batch_circles<T, F: Fn(&T) -> &[f32; 2]>(
    &mut self,
    bots: &[T],
    func: F
) -> BatchCircle<T, F>
[src]

The closure is a function to extract a reference to the vertex data for a given object T

This function is unsafe because the reference returned by the closure must be a reference into a member of T.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.