[−][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
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]
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]
fn from(image: ImageXObject) -> Self
[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]
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,
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> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
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.
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>,