Struct gelatin::DrawContext
source · [−]pub struct DrawContext<'a> {
pub display: &'a Display,
pub dpi_scale_factor: f32,
pub unit_quad_vertices: &'a VertexBuffer<Vertex>,
pub unit_quad_indices: &'a IndexBuffer<u16>,
pub textured_program: &'a Program,
pub colored_shadowed_program: &'a Program,
pub colored_program: &'a Program,
pub viewport: &'a Rect,
pub projection_transform: &'a Matrix4<f32>,
}
Fields
display: &'a Display
dpi_scale_factor: f32
unit_quad_vertices: &'a VertexBuffer<Vertex>
unit_quad_indices: &'a IndexBuffer<u16>
textured_program: &'a Program
colored_shadowed_program: &'a Program
colored_program: &'a Program
viewport: &'a Rect
projection_transform: &'a Matrix4<f32>
Implementations
sourceimpl<'a> DrawContext<'a>
impl<'a> DrawContext<'a>
pub fn logical_rect_to_viewport(&self, rect: &LogicalRect) -> Rect
pub fn clear_color(
&self,
target: &mut Frame,
color: [f32; 4],
rect: Option<LogicalRect>
)
Auto Trait Implementations
impl<'a> !RefUnwindSafe for DrawContext<'a>
impl<'a> !Send for DrawContext<'a>
impl<'a> !Sync for DrawContext<'a>
impl<'a> Unpin for DrawContext<'a>
impl<'a> !UnwindSafe for DrawContext<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more