[−][src]Struct very_simple_2d_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_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 texture(
&mut self,
file: &str,
grid_dim: Vec2<u32>
) -> ImageResult<Texture>
[src]
&mut self,
file: &str,
grid_dim: Vec2<u32>
) -> ImageResult<Texture>
Creates a new texture from the specified file. The fact that we need a mutable reference to this object Ensures that we make the texture in the same thread. The grid dimensions passed are the tile dimensions is the texture is a tile set.
pub fn texturep(
&mut self,
file: &str,
grid_dim_x: u32,
grid_dim_y: u32
) -> ImageResult<Texture>
[src]
&mut self,
file: &str,
grid_dim_x: u32,
grid_dim_y: u32
) -> ImageResult<Texture>
Primitive version of texture
pub fn clear_color(&mut self, back_color: [f32; 3])
[src]
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> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
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>,