Struct Device

Source
pub struct Device { /* private fields */ }

Implementations§

Source§

impl Device

Source

pub fn from_native<D: NativeDevice>(device: D) -> Result<Self, Error>

Source

pub fn from_pixmap_with_clip( pixmap: &Pixmap, clip: IRect, ) -> Result<Self, Error>

Source

pub fn from_pixmap(pixmap: &Pixmap) -> Result<Self, Error>

Source

pub fn from_display_list(list: &DisplayList) -> Result<Self, Error>

Source

pub fn from_text_page( page: &TextPage, opts: TextPageOptions, ) -> Result<Self, Error>

Source

pub fn fill_path( &self, path: &Path, even_odd: bool, ctm: &Matrix, cs: &Colorspace, color: &[f32], alpha: f32, cp: ColorParams, ) -> Result<(), Error>

Source

pub fn stroke_path( &self, path: &Path, stroke: &StrokeState, ctm: &Matrix, cs: &Colorspace, color: &[f32], alpha: f32, cp: ColorParams, ) -> Result<(), Error>

Source

pub fn clip_path( &self, path: &Path, even_odd: bool, ctm: &Matrix, ) -> Result<(), Error>

Source

pub fn clip_stroke_path( &self, path: &Path, stroke: &StrokeState, ctm: &Matrix, ) -> Result<(), Error>

Source

pub fn fill_text( &self, text: &Text, ctm: &Matrix, cs: &Colorspace, color: &[f32], alpha: f32, cp: ColorParams, ) -> Result<(), Error>

Source

pub fn stroke_text( &self, text: &Text, stroke: &StrokeState, ctm: &Matrix, cs: &Colorspace, color: &[f32], alpha: f32, cp: ColorParams, ) -> Result<(), Error>

Source

pub fn clip_text(&self, text: &Text, ctm: &Matrix) -> Result<(), Error>

Source

pub fn clip_stroke_text( &self, text: &Text, stroke: &StrokeState, ctm: &Matrix, ) -> Result<(), Error>

Source

pub fn ignore_text(&self, text: &Text, ctm: &Matrix) -> Result<(), Error>

Source

pub fn fill_shade( &self, shd: &Shade, ctm: &Matrix, alpha: f32, cp: ColorParams, ) -> Result<(), Error>

Source

pub fn fill_image( &self, image: &Image, ctm: &Matrix, alpha: f32, cp: ColorParams, ) -> Result<(), Error>

Source

pub fn fill_image_mask( &self, image: &Image, ctm: &Matrix, cs: &Colorspace, color: &[f32], alpha: f32, cp: ColorParams, ) -> Result<(), Error>

Source

pub fn clip_image_mask(&self, image: &Image, ctm: &Matrix) -> Result<(), Error>

Source

pub fn pop_clip(&self) -> Result<(), Error>

Source

pub fn begin_mask( &self, area: Rect, luminosity: bool, cs: &Colorspace, bc: &[f32], cp: ColorParams, ) -> Result<(), Error>

Source

pub fn end_mask(&self, f: Option<&Function>) -> Result<(), Error>

Source

pub fn begin_group( &self, area: Rect, cs: &Colorspace, isolated: bool, knockout: bool, blend_mode: BlendMode, alpha: f32, ) -> Result<(), Error>

Source

pub fn end_group(&self) -> Result<(), Error>

Source

pub fn begin_tile( &self, area: Rect, view: Rect, xstep: f32, ystep: f32, ctm: &Matrix, id: Option<NonZero<i32>>, ) -> Result<Option<NonZero<i32>>, Error>

Source

pub fn end_tile(&self) -> Result<(), Error>

Source

pub fn begin_layer(&self, name: &str) -> Result<(), Error>

Source

pub fn end_layer(&self) -> Result<(), Error>

Source

pub fn begin_structure( &self, standard: Structure, raw: &str, idx: i32, ) -> Result<(), Error>

Source

pub fn end_structure(&self) -> Result<(), Error>

Source

pub fn begin_metatext(&self, meta: Metatext, text: &str) -> Result<(), Error>

Source

pub fn end_metatext(&self) -> Result<(), Error>

Trait Implementations§

Source§

impl Debug for Device

Source§

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

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

impl Drop for Device

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Device

§

impl RefUnwindSafe for Device

§

impl !Send for Device

§

impl !Sync for Device

§

impl Unpin for Device

§

impl UnwindSafe for Device

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.