[−][src]Struct printpdf::types::plugins::graphics::two_dimensional::image::Image
Image - wrapper around an ImageXObject
to allow for more control
within the library
Fields
image: ImageXObject
The actual image
Implementations
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]
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>
)
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]
pub fn from(image: ImageXObject) -> Self
[src]
Auto Trait Implementations
impl RefUnwindSafe for Image
[src]
impl Send for Image
[src]
impl Sync for Image
[src]
impl Unpin for Image
[src]
impl UnwindSafe for Image
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,