[−][src]Struct egaku2d_core::SimpleCanvas
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]
&mut self,
bots: &[T],
func: F
) -> BatchCircle<T, F>
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
impl RefUnwindSafe for SimpleCanvas
impl !Send for SimpleCanvas
impl !Sync for SimpleCanvas
impl Unpin for SimpleCanvas
impl UnwindSafe for SimpleCanvas
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,