[−][src]Struct screen_13::gpu::Render
A powerful structure which allows you to combine various operations and other render instances to create just about any creative effect.
Implementations
impl Render
[src]
pub fn clear(&mut self) -> &mut ClearOp
[src]
Clears the screen of all text and graphics.
pub fn copy(&mut self, src: &Texture2d) -> &mut CopyOp
[src]
Copies the given texture onto this Render. The implementation uses a copy operation
and is more efficient than write
when there is no blending or fractional pixels.
pub fn dims(&self) -> Extent
[src]
Gets the dimensions, in pixels, of this Render
.
pub fn draw(&mut self) -> &mut DrawOp
[src]
Draws a batch of 3D elements. There is no need to give any particular order to the individual commands and the implementation may sort and re-order them, so do not count on indices remaining the same after this call completes.
pub fn encode(&mut self) -> &mut EncodeOp
[src]
Saves this Render as a JPEG file at the given path.
pub fn gradient<C>(&mut self, path: [(Coord, C); 2]) -> &mut EncodeOp where
C: Copy + Into<AlphaColor>,
[src]
C: Copy + Into<AlphaColor>,
Draws a linear gradient on this Render using the given path. TODO: Specialize for radial too?
pub fn text<C, P>(&mut self, pos: P, color: C) -> &mut FontOp where
C: Into<AlphaColor>,
P: Into<CoordF>,
[src]
C: Into<AlphaColor>,
P: Into<CoordF>,
Draws bitmapped text on this Render using the given details. TODO: Accept a list of font/color/text/pos combos so we can batch many at once?
pub fn write(&mut self) -> &mut WriteOp
[src]
Draws the given texture writes onto this Render. Note that the given texture writes will all be applied at once and there is no 'layering' of the individual writes going on - so if you need blending between writes you must submit a new batch.
Auto Trait Implementations
impl !RefUnwindSafe for Render
[src]
impl !Send for Render
[src]
impl !Sync for Render
[src]
impl Unpin for Render
[src]
impl !UnwindSafe for Render
[src]
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,
pub 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
[src]
type Output = T
Should always be 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.
pub 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>,