Struct gfx_graphics::GfxGraphics [−][src]
pub struct GfxGraphics<'a, R, C> where
R: Resources + 'a,
C: CommandBuffer<R> + 'a,
R::Buffer: 'a,
R::Shader: 'a,
R::Program: 'a,
R::Texture: 'a,
R::Sampler: 'a, { pub encoder: &'a mut Encoder<R, C>, // some fields omitted }
Used for rendering 2D graphics.
Fields
encoder: &'a mut Encoder<R, C>
Provide access to the gfx::Encoder
in case a user needs to update textures for caching,
etc.
Implementations
impl<'a, R, C> GfxGraphics<'a, R, C> where
R: Resources,
C: CommandBuffer<R>,
[src]
R: Resources,
C: CommandBuffer<R>,
pub fn new(
encoder: &'a mut Encoder<R, C>,
output_color: &'a RenderTargetView<R, Srgba8>,
output_stencil: &'a DepthStencilView<R, DepthStencil>,
g2d: &'a mut Gfx2d<R>
) -> Self
[src]
encoder: &'a mut Encoder<R, C>,
output_color: &'a RenderTargetView<R, Srgba8>,
output_stencil: &'a DepthStencilView<R, DepthStencil>,
g2d: &'a mut Gfx2d<R>
) -> Self
Creates a new object for rendering 2D graphics.
pub fn has_texture_alpha(&self, texture: &Texture<R>) -> bool where
R: Resources,
[src]
R: Resources,
Returns true if texture has alpha channel.
Trait Implementations
impl<'a, R, C> Graphics for GfxGraphics<'a, R, C> where
R: Resources,
C: CommandBuffer<R>,
R::Buffer: 'a,
R::Shader: 'a,
R::Program: 'a,
R::Texture: 'a,
R::Sampler: 'a,
[src]
R: Resources,
C: CommandBuffer<R>,
R::Buffer: 'a,
R::Shader: 'a,
R::Program: 'a,
R::Texture: 'a,
R::Sampler: 'a,
type Texture = Texture<R>
The texture type associated with the back-end. Read more
fn clear_color(&mut self, color: [f32; 4])
[src]
fn clear_stencil(&mut self, value: u8)
[src]
fn tri_list<F>(&mut self, draw_state: &DrawState, color: &[f32; 4], f: F) where
F: FnMut(&mut dyn FnMut(&[[f32; 2]])),
[src]
F: FnMut(&mut dyn FnMut(&[[f32; 2]])),
fn tri_list_c<F>(&mut self, draw_state: &DrawState, f: F) where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 4]])),
[src]
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 4]])),
fn tri_list_uv<F>(
&mut self,
draw_state: &DrawState,
color: &[f32; 4],
texture: &Self::Texture,
f: F
) where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]])),
[src]
&mut self,
draw_state: &DrawState,
color: &[f32; 4],
texture: &Self::Texture,
f: F
) where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]])),
fn tri_list_uv_c<F>(
&mut self,
draw_state: &DrawState,
texture: &Self::Texture,
f: F
) where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]], &[[f32; 4]])),
[src]
&mut self,
draw_state: &DrawState,
texture: &Self::Texture,
f: F
) where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]], &[[f32; 4]])),
pub fn rectangle<R>(
&mut self,
r: &Rectangle,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
) where
R: Into<[f64; 4]>,
[src]
&mut self,
r: &Rectangle,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
) where
R: Into<[f64; 4]>,
pub fn polygon(
&mut self,
p: &Polygon,
polygon: &[[f64; 2]],
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
[src]
&mut self,
p: &Polygon,
polygon: &[[f64; 2]],
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
pub fn polygon_tween_lerp(
&mut self,
p: &Polygon,
polygons: &[&[[f64; 2]]],
tween_factor: f64,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
[src]
&mut self,
p: &Polygon,
polygons: &[&[[f64; 2]]],
tween_factor: f64,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
pub fn image(
&mut self,
image: &Image,
texture: &Self::Texture,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
[src]
&mut self,
image: &Image,
texture: &Self::Texture,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
pub fn ellipse<R>(
&mut self,
e: &Ellipse,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
) where
R: Into<[f64; 4]>,
[src]
&mut self,
e: &Ellipse,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
) where
R: Into<[f64; 4]>,
pub fn line<L>(
&mut self,
l: &Line,
line: L,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
) where
L: Into<[f64; 4]>,
[src]
&mut self,
l: &Line,
line: L,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
) where
L: Into<[f64; 4]>,
pub fn circle_arc<R>(
&mut self,
c: &CircleArc,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
) where
R: Into<[f64; 4]>,
[src]
&mut self,
c: &CircleArc,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
) where
R: Into<[f64; 4]>,
Auto Trait Implementations
impl<'a, R, C> !RefUnwindSafe for GfxGraphics<'a, R, C>
impl<'a, R, C> Send for GfxGraphics<'a, R, C>
impl<'a, R, C> Sync for GfxGraphics<'a, R, C> where
C: Sync,
C: Sync,
impl<'a, R, C> Unpin for GfxGraphics<'a, R, C>
impl<'a, R, C> !UnwindSafe for GfxGraphics<'a, R, C>
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
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
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>,