Struct fui_app::DrawingContext
source · [−]pub struct DrawingContext { /* private fields */ }
Implementations
sourceimpl DrawingContext
impl DrawingContext
pub fn new() -> Result<Self>
pub fn get_font(&mut self, font_name: &'static str) -> Result<&mut DrawingFont>
pub fn get_font_dimensions(
&mut self,
font_name: &'static str,
size: u8,
text: &str
) -> Result<(u16, u16)>
pub fn get_font_dimensions_each_char(
&mut self,
font_name: &'static str,
size: u8,
text: &str
) -> Result<(Vec<i16>, u16)>
pub fn get_resources(&self) -> &Resources<DrawingDevice, DrawingFont>
pub fn get_resources_mut(
&mut self
) -> &mut Resources<DrawingDevice, DrawingFont>
pub fn create_texture(
&mut self,
memory: &[u8],
width: u16,
height: u16,
format: ColorFormat,
updatable: bool
) -> Result<i32>
pub fn update_texture(
&mut self,
texture_id: i32,
memory: &[u8],
offset_x: u16,
offset_y: u16,
width: u16,
height: u16
) -> Result<()>
pub fn begin(&mut self, gl_context_data: &GlContextData) -> Result<()>
pub fn clear(
&mut self,
render_target: &<DrawingDevice as Device>::RenderTarget,
color: &Color
)
pub fn draw(
&mut self,
render_target: &<DrawingDevice as Device>::RenderTarget,
primitives: &Vec<Primitive>
) -> Result<()>
pub fn end(&mut self, _gl_context_data: &GlContextData)
pub fn get_background_texture(&mut self) -> i32
Trait Implementations
sourceimpl Resources for DrawingContext
impl Resources for DrawingContext
fn get_font_dimensions(
&mut self,
font_name: &'static str,
size: u8,
text: &str
) -> Result<(u16, u16)>
fn get_font_dimensions_each_char(
&mut self,
font_name: &'static str,
size: u8,
text: &str
) -> Result<(Vec<i16>, u16)>
fn create_texture(
&mut self,
memory: &[u8],
width: u16,
height: u16,
format: ColorFormat,
updatable: bool
) -> Result<i32>
fn update_texture(
&mut self,
texture_id: i32,
memory: &[u8],
offset_x: u16,
offset_y: u16,
width: u16,
height: u16
) -> Result<()>
fn get_texture_size(&mut self, texture_id: i32) -> Result<(u16, u16)>
Auto Trait Implementations
impl RefUnwindSafe for DrawingContext
impl Send for DrawingContext
impl Sync for DrawingContext
impl Unpin for DrawingContext
impl UnwindSafe for DrawingContext
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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