Struct printpdf::types::plugins::graphics::two_dimensional::image::Image
[−]
[src]
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 Image
[src]
fn try_from<T: ImageDecoder>(image: T) -> Result<Self, ImageError>
[src]
impl Image
[src]
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]
Performs the conversion.