[][src]Struct skia_safe::Document

pub struct Document<State = Open> { /* fields omitted */ }

Methods

impl<S> Document<S>[src]

pub fn abort(self)[src]

impl Document[src]

pub fn pages(&self) -> usize[src]

The number of pages in this document.

pub fn begin_page(
    self,
    size: impl Into<Size>,
    content: Option<&Rect>
) -> Document<OnPage>
[src]

pub fn close(self) -> Data[src]

Close the document and return the encoded representation. This function consumes and drops the document.

impl Document<OnPage>[src]

pub fn page(&self) -> usize[src]

The current page we are currently drawing on.

pub fn canvas(&mut self) -> &mut Canvas[src]

Borrows the canvas for the current page on the document.

pub fn end_page(self) -> Document[src]

Ends the page. This function consumes the document and returns a new open document that contains the pages drawn so far.

Auto Trait Implementations

impl<State = Open> !Send for Document<State>

impl<State> Unpin for Document<State> where
    State: Unpin

impl<State = Open> !Sync for Document<State>

impl<State> RefUnwindSafe for Document<State> where
    State: RefUnwindSafe

impl<State> UnwindSafe for Document<State> where
    State: UnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]