Expand description
This library provides a buffer which can be used as a render target for Piston’s graphics library. This buffer can be loaded from and/or saved to a file on disk. This allows for things like screenshots in games.
There is also an optional feature for RenderBuffer
that allows it to be
converted into a G2dTexture
so that it can be rendered with
piston_window
. To
enable this, add features = ["piston_window_texture"]
to the graphics_buffer
dependency in your cargo.toml
. More about this feature can be found in
the RenderBuffer
documentation.
Structs§
- Render
Buffer - A buffer that can be rendered to with Piston’s graphics library.
Enums§
- Error
- An Error type for
RenderBuffer
.
Constants§
- IDENTITY
- The identity matrix:
[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]
.
Functions§
- buffer_
glyphs_ from_ bytes - Create a
BufferGlyphs
from some font data - buffer_
glyphs_ from_ path - Create a
BufferGlyphs
from a path to some font
Type Aliases§
- Buffer
Glyphs - A character cache for drawing text to a
RenderBuffer
.