pub struct GraphicsContext { /* private fields */ }Implementations§
Source§impl GraphicsContext
impl GraphicsContext
pub fn new( conn: &'static XCBConnection, window: Window, visual: &Visualtype, width: i32, height: i32, ) -> Result<Self>
pub fn resize(&mut self, width: i32, height: i32) -> Result<()>
pub fn clear(&mut self) -> Result<()>
pub fn clear_with_color(&mut self, color: Color) -> Result<()>
pub fn fill_rectangle(&mut self, rect: Rect, color: Color) -> Result<()>
pub fn text_renderer(&self) -> &TextRenderer
pub fn text_renderer_mut(&mut self) -> &mut TextRenderer
pub fn get_cairo_context(&self) -> Result<Option<Context>>
pub fn copy_text_to_window(&mut self) -> Result<()>
pub fn flush(&self) -> Result<()>
pub fn width(&self) -> i32
pub fn height(&self) -> i32
pub fn stroke_rectangle( &mut self, rect: Rect, color: Color, width: u32, ) -> Result<()>
pub fn fill_circle( &mut self, center_x: i32, center_y: i32, radius: u32, color: Color, ) -> Result<()>
pub fn stroke_circle( &mut self, center_x: i32, center_y: i32, radius: u32, color: Color, width: u32, ) -> Result<()>
pub fn draw_line( &mut self, start_x: i32, start_y: i32, end_x: i32, end_y: i32, color: Color, width: u32, ) -> Result<()>
pub fn renderer(&mut self) -> &mut Renderer<'static>
pub fn has_cairo_surface(&self) -> bool
Auto Trait Implementations§
impl !Send for GraphicsContext
impl !Sync for GraphicsContext
impl Freeze for GraphicsContext
impl RefUnwindSafe for GraphicsContext
impl Unpin for GraphicsContext
impl UnsafeUnpin for GraphicsContext
impl UnwindSafe for GraphicsContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more