[−][src]Struct graphics_buffer::RenderBuffer
A buffer that can be rendered to with Piston's graphics library.
Methods
impl RenderBuffer
[src]
impl RenderBuffer
pub fn new(width: u32, height: u32) -> RenderBuffer | [src] |
Create a new RenderBuffer
with the given witdth or height.
pub fn open<P: AsRef<Path>>(path: P) -> ImageResult<RenderBuffer> | [src] |
Creates a new RenderBuffer
by opening it from a file.
pub fn decode_from_bytes(bytes: &[u8]) -> ImageResult<RenderBuffer> | [src] |
Creates a new RenderBuffer
by decoding image data.
pub fn clear(&mut self, color: [f32; 4]) | [src] |
Clear the buffer with a color.
pub fn pixel(&self, x: u32, y: u32) -> [f32; 4] | [src] |
Returns the color of the pixel at the given coordinates.
pub fn set_pixel(&mut self, x: u32, y: u32, color: [f32; 4]) | [src] |
Sets the color of the pixel at the given coordinates.
Trait Implementations
impl From<ImageBuffer<Rgba<u8>, Vec<u8>>> for RenderBuffer
[src]
impl From<ImageBuffer<Rgba<u8>, Vec<u8>>> for RenderBuffer
impl From<DynamicImage> for RenderBuffer
[src]
impl From<DynamicImage> for RenderBuffer
fn from(image: DynamicImage) -> Self | [src] |
impl Clone for RenderBuffer
[src]
impl Clone for RenderBuffer
fn clone(&self) -> RenderBuffer | [src] |
fn clone_from(&mut self, source: &Self) | 1.0.0 [src] |
Performs copy-assignment from source
. Read more
impl Debug for RenderBuffer
[src]
impl Debug for RenderBuffer
impl Deref for RenderBuffer
[src]
impl Deref for RenderBuffer
type Target = RgbaImage
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target | [src] |
impl Graphics for RenderBuffer
[src]
impl Graphics for RenderBuffer
type Texture = RenderBuffer
The texture type associated with the back-end. Read more
fn clear_color(&mut self, color: Color) | [src] |
fn clear_stencil(&mut self, _value: u8) | [src] |
fn tri_list<F>(&mut self, _draw_state: &DrawState, color: &[f32; 4], f: F) where | [src] |
fn tri_list_uv<F>( | [src] |
fn rectangle<R>( |
Draws a rectangle. Read more
fn polygon( |
Draws a polygon. Read more
fn polygon_tween_lerp( |
Draws a tweened polygon using linear interpolation. Read more
fn image( |
Draws image. Read more
fn ellipse<R>( |
Draws ellipse. Read more
fn line<L>( |
Draws line. Read more
fn circle_arc<R>( |
Draws circle arc. Read more
fn deform_image( |
Draws deformed image. Read more
impl ImageSize for RenderBuffer
[src]
impl ImageSize for RenderBuffer
Auto Trait Implementations
impl Send for RenderBuffer
impl Send for RenderBuffer
impl Sync for RenderBuffer
impl Sync for RenderBuffer
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where |
Sets value
as a parameter of self
.