Struct Pixmap

Source
pub struct Pixmap { /* private fields */ }
Expand description

A pixmap that can be drawn upon.

Trait Implementations§

Source§

impl Debug for Pixmap

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drawable for Pixmap

Source§

fn gc_ref(&self) -> GraphicsContextReference

Get a reference to the graphics context that this item has stored.
Source§

fn dpy(&self) -> DisplayReference

Get the display reference stored by the object. By default, this uses the one stored in the graphics context.
Source§

fn colormap(&self) -> Result<ColorMap, FlutterbugError>

Get a reference to the colormap. By default, this gets the colormap used by the loaded display.
Source§

fn gc_properties( &self, mask: GraphicsContextValues, ) -> Result<XGCValues, FlutterbugError>

Get the properties of the graphics context for this drawable.
Source§

fn set_gc_properties( &self, mask: GraphicsContextValues, vals: XGCValues, ) -> Result<(), FlutterbugError>

Set the properties of the graphics context for this drawable.
Source§

fn set_foreground(&self, color: Color) -> Result<(), FlutterbugError>

Set the foreground color for this drawable.
Source§

fn set_background(&self, color: Color) -> Result<(), FlutterbugError>

Set the background color for this drawable.
Source§

fn set_line_width(&self, width: u32) -> Result<(), FlutterbugError>

Set the line width for this drawable.
Source§

fn pixmap( &self, size: Size2D<u32>, depth: u32, ) -> Result<Pixmap, FlutterbugError>

Create a pixmap object bound to this drawable.
Source§

fn draw_string( &self, origin: Point2D<i32>, text: &str, ) -> Result<(), FlutterbugError>

Draw a string on this object.
Source§

fn copy_area( &self, origin: &dyn Drawable, origin_pt: Point2D<i32>, dest_pt: Point2D<i32>, size: Size2D<u32>, ) -> Result<(), FlutterbugError>

Copy an area to this drawable from another drawable.
Source§

fn draw_line( &self, point1: Point2D<i32>, point2: Point2D<i32>, ) -> Result<(), FlutterbugError>

Draw a line.
Source§

fn draw_point(&self, point: Point2D<i32>) -> Result<(), FlutterbugError>

Draw a point.
Source§

fn draw_lines( &self, lines: &[(Point2D<i32>, Point2D<i32>)], ) -> Result<(), FlutterbugError>

Draw several lines.
Source§

fn draw_points(&self, points: &[Point2D<i32>]) -> Result<(), FlutterbugError>

Draw several points.
Source§

fn image( &self, origin: Point2D<i32>, size: Size2D<u32>, ) -> Result<Image, FlutterbugError>

Get an image from a rectangle on this drawable.
Source§

fn put_image( &self, image: &dyn GenericImage, src_origin: Point2D<i32>, dest_origin: Point2D<i32>, size: Size2D<u32>, ) -> Result<(), FlutterbugError>

Draw an image onto this drawable.
Source§

fn draw_rectangle( &self, origin: Point2D<i32>, size: Size2D<u32>, ) -> Result<(), FlutterbugError>

Draw a rectangle onto this drawable.
Source§

fn draw_arc( &self, origin: Point2D<i32>, size: Size2D<u32>, angles: (i32, i32), ) -> Result<(), FlutterbugError>

Draw an arc onto this drawable.
Source§

fn draw_rectangles( &self, rects: &[(Point2D<i32>, Size2D<u32>)], ) -> Result<(), FlutterbugError>

Draw a series of rectangles onto this drawable.
Source§

fn draw_arcs( &self, arcs: &[(Point2D<i32>, Size2D<u32>, (i32, i32))], ) -> Result<(), FlutterbugError>

Draw a series of arcs onto this drawable.
Source§

fn fill_rectangle( &self, origin: Point2D<i32>, size: Size2D<u32>, ) -> Result<(), FlutterbugError>

Fill a rectangle in this drawable.
Source§

fn fill_polygon( &self, points: &[Point2D<i32>], shape: PolygonShape, ) -> Result<(), FlutterbugError>

Fill a polygon in this drawable.
Source§

fn fill_arc( &self, origin: Point2D<i32>, size: Size2D<u32>, angles: (i32, i32), ) -> Result<(), FlutterbugError>

Fill an arc in this drawable.
Source§

fn fill_rectangles( &self, rects: &[(Point2D<i32>, Size2D<u32>)], ) -> Result<(), FlutterbugError>

Fill several rectangles in this drawable.
Source§

fn fill_arcs( &self, arcs: &[(Point2D<i32>, Size2D<u32>, (i32, i32))], ) -> Result<(), FlutterbugError>

Fill several arcs in this drawable.
Source§

impl Drop for Pixmap

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl HasXID for Pixmap

Source§

fn xid(&self) -> XID

Get the XID for this instance.

Auto Trait Implementations§

§

impl Freeze for Pixmap

§

impl RefUnwindSafe for Pixmap

§

impl !Send for Pixmap

§

impl !Sync for Pixmap

§

impl Unpin for Pixmap

§

impl UnwindSafe for Pixmap

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.