Struct graphics_buffer::RenderBuffer [−][src]
pub struct RenderBuffer { /* fields omitted */ }
Expand description
A buffer that can be rendered to with Piston’s graphics library.
Implementations
Create a new RenderBuffer
with the given witdth or height.
Creates a new RenderBuffer
by opening it from a file.
Creates a new RenderBuffer
by decoding image data.
Returns the color of the pixel at the given coordinates.
Sets the color of the pixel at the given coordinates.
pub fn to_g2d_texture(
&self,
context: &mut G2dTextureContext,
settings: &TextureSettings
) -> Result<G2dTexture, Box<dyn Error>>
pub fn to_g2d_texture(
&self,
context: &mut G2dTextureContext,
settings: &TextureSettings
) -> Result<G2dTexture, Box<dyn Error>>
Creates a G2dTexture
from the RenderBuffer
for drawing to a PistonWindow
.
Trait Implementations
Performs the conversion.
type Texture = RenderBuffer
type Texture = RenderBuffer
The texture type associated with the back-end. Read more
Clears background with a color. Read more
Clears stencil buffer with a value, usually 0. Read more
Renders list of 2d triangles using a solid color. Read more
Renders list of 2d triangles using a color and a texture. Read more
Same as tri_list
, but with individual vertex colors. Read more
Same as tri_list_uv
, but with individual vertex colors. Read more
Draws a rectangle. Read more
Draws a polygon. Read more
Draws a tweened polygon using linear interpolation. Read more
Draws image. Read more
Draws ellipse. Read more
Draws line. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for RenderBuffer
impl Send for RenderBuffer
impl Sync for RenderBuffer
impl Unpin for RenderBuffer
impl UnwindSafe for RenderBuffer
Blanket Implementations
Mutably borrows from an owned value. Read more