[][src]Struct printpdf::types::plugins::graphics::two_dimensional::image::Image

pub struct Image {
    pub image: ImageXObject,
}

Image - wrapper around an ImageXObject to allow for more control within the library

Fields

image: ImageXObject

The actual image

Methods

impl<'a> Image[src]

pub fn try_from<T: ImageDecoder<'a>>(image: T) -> Result<Self, ImageError>[src]

pub fn from_dynamic_image(image: &DynamicImage) -> Self[src]

impl Image[src]

pub fn add_to_layer(
    self,
    layer: PdfLayerReference,
    translate_x: Option<Mm>,
    translate_y: Option<Mm>,
    rotate_cw: Option<f64>,
    scale_x: Option<f64>,
    scale_y: Option<f64>,
    dpi: Option<f64>
)
[src]

Adds the image to a specific layer and consumes it This is due to a PDF weirdness - images are basically just "names" and you have to make sure that they are added to the same page as they are used on.

You can use the "dpi" parameter to specify a scaling - the default is 300dpi

Trait Implementations

impl Debug for Image[src]

impl From<ImageXObject> for Image[src]

Auto Trait Implementations

impl RefUnwindSafe for Image

impl Send for Image

impl Sync for Image

impl Unpin for Image

impl UnwindSafe for Image

Blanket Implementations

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

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

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

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

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

impl<T> SetParameter for T

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.