pub struct PdfPageImageObject<'a> { /* private fields */ }Expand description
A single PdfPageObject of type PdfPageObjectType::Image. The page object defines a single image, where the image data is sourced from a PdfBitmap buffer.
Page objects can be created either attached to a PdfPage (in which case the page object’s memory is owned by the containing page) or detached from any page (in which case the page object’s memory is owned by the object). Page objects are not rendered until they are attached to a page; page objects that are never attached to a page will be lost when they fall out of scope.
The simplest way to create a page image object that is immediately attached to a page is to call the PdfPageObjectsCommon::create_image_object() function.
Creating a detached page image object offers more scope for customization, but you must add the object to a containing PdfPage manually. To create a detached page image object, use the PdfPageImageObject::new() or PdfPageImageObject::new_from_jpeg_file() functions. The detached page image object can later be attached to a page by using the PdfPageObjectsCommon::add_image_object() function.
Implementations§
Source§impl<'a> PdfPageImageObject<'a>
impl<'a> PdfPageImageObject<'a>
Sourcepub fn new(
document: &PdfDocument<'a>,
image: &DynamicImage,
) -> Result<Self, PdfiumError>
pub fn new( document: &PdfDocument<'a>, image: &DynamicImage, ) -> Result<Self, PdfiumError>
Creates a new PdfPageImageObject from the given DynamicImage. The returned page object will not be rendered until it is added to a PdfPage using the PdfPageObjectsCommon::add_image_object() function.
The returned page object will have its width and height both set to 1.0 points. Use the PdfPageImageObject::scale() function to apply a horizontal and vertical scale to the object after it is created, or use one of the PdfPageImageObject::new_with_width(), PdfPageImageObject::new_with_height(), or PdfPageImageObject::new_with_size() functions to scale the page object to a specific width and/or height at the time the object is created.
This function is only available when this crate’s image feature is enabled.
Sourcepub fn new_from_jpeg_file(
document: &PdfDocument<'a>,
path: &(impl AsRef<Path> + ?Sized),
) -> Result<Self, PdfiumError>
pub fn new_from_jpeg_file( document: &PdfDocument<'a>, path: &(impl AsRef<Path> + ?Sized), ) -> Result<Self, PdfiumError>
Creates a new PdfPageImageObject containing JPEG image data loaded from the given file path. The returned page object will not be rendered until it is added to a PdfPage using the PdfPageObjectsCommon::add_image_object() function.
The returned page object will have its width and height both set to 1.0 points. Use the PdfPageImageObject::scale function to apply a horizontal and vertical scale to the object after it is created, or use one of the PdfPageImageObject::new_with_width(), PdfPageImageObject::new_with_height(), or PdfPageImageObject::new_with_size() functions to scale the page object to a specific width and/or height at the time the object is created.
This function is not available when compiling to WASM.
Sourcepub fn new_from_jpeg_reader<R: Read + Seek>(
document: &PdfDocument<'a>,
reader: R,
) -> Result<Self, PdfiumError>
pub fn new_from_jpeg_reader<R: Read + Seek>( document: &PdfDocument<'a>, reader: R, ) -> Result<Self, PdfiumError>
Creates a new PdfPageImageObject containing JPEG image data loaded from the given reader. Because Pdfium must know the total content length in advance prior to loading any portion of it, the given reader must implement the Seek trait as well as the Read trait.
The returned page object will not be rendered until it is added to a PdfPage using the PdfPageObjectsCommon::add_image_object() function.
The returned page object will have its width and height both set to 1.0 points. Use the PdfPageImageObject::scale function to apply a horizontal and vertical scale to the object after it is created, or use one of the PdfPageImageObject::new_with_width(), PdfPageImageObject::new_with_height(), or PdfPageImageObject::new_with_size() functions to scale the page object to a specific width and/or height at the time the object is created.
This function is not available when compiling to WASM.
Sourcepub fn new_with_width(
document: &PdfDocument<'a>,
image: &DynamicImage,
width: PdfPoints,
) -> Result<Self, PdfiumError>
pub fn new_with_width( document: &PdfDocument<'a>, image: &DynamicImage, width: PdfPoints, ) -> Result<Self, PdfiumError>
Creates a new PdfPageImageObject from the given arguments. The page object will be scaled horizontally to match the given width; its height will be adjusted to maintain the aspect ratio of the given image. The returned page object will not be rendered until it is added to a PdfPage using the PdfPageObjectsCommon::add_image_object() function.
This function is only available when this crate’s image feature is enabled.
Sourcepub fn new_with_height(
document: &PdfDocument<'a>,
image: &DynamicImage,
height: PdfPoints,
) -> Result<Self, PdfiumError>
pub fn new_with_height( document: &PdfDocument<'a>, image: &DynamicImage, height: PdfPoints, ) -> Result<Self, PdfiumError>
Creates a new PdfPageImageObject from the given arguments. The page object will be scaled vertically to match the given height; its width will be adjusted to maintain the aspect ratio of the given image. The returned page object will not be rendered until it is added to a PdfPage using the PdfPageObjectsCommon::add_image_object() function.
This function is only available when this crate’s image feature is enabled.
Sourcepub fn new_with_size(
document: &PdfDocument<'a>,
image: &DynamicImage,
width: PdfPoints,
height: PdfPoints,
) -> Result<Self, PdfiumError>
pub fn new_with_size( document: &PdfDocument<'a>, image: &DynamicImage, width: PdfPoints, height: PdfPoints, ) -> Result<Self, PdfiumError>
Creates a new PdfPageImageObject from the given arguments. The page object will be scaled to match the given width and height. The returned page object will not be rendered until it is added to a PdfPage using the PdfPageObjectsCommon::add_image_object() function.
This function is only available when this crate’s image feature is enabled.
Sourcepub fn get_raw_bitmap(&self) -> Result<PdfBitmap<'_>, PdfiumError>
pub fn get_raw_bitmap(&self) -> Result<PdfBitmap<'_>, PdfiumError>
Returns a new PdfBitmap created from the bitmap buffer backing this PdfPageImageObject, ignoring any image filters, image mask, or object transforms applied to this page object.
Sourcepub fn get_raw_image(&self) -> Result<DynamicImage, PdfiumError>
pub fn get_raw_image(&self) -> Result<DynamicImage, PdfiumError>
Returns a new DynamicImage created from the bitmap buffer backing this PdfPageImageObject, ignoring any image filters, image mask, or object transforms applied to this page object.
This function is only available when this crate’s image feature is enabled.
Sourcepub fn get_processed_bitmap(
&self,
document: &PdfDocument<'_>,
) -> Result<PdfBitmap<'_>, PdfiumError>
pub fn get_processed_bitmap( &self, document: &PdfDocument<'_>, ) -> Result<PdfBitmap<'_>, PdfiumError>
Returns a new PdfBitmap created from the bitmap buffer backing this PdfPageImageObject, taking into account any image filters, image mask, and object transforms applied to this page object.
Sourcepub fn get_processed_image(
&self,
document: &PdfDocument<'_>,
) -> Result<DynamicImage, PdfiumError>
pub fn get_processed_image( &self, document: &PdfDocument<'_>, ) -> Result<DynamicImage, PdfiumError>
Returns a new DynamicImage created from the bitmap buffer backing this PdfPageImageObject, taking into account any image filters, image mask, and object transforms applied to this page object.
This function is only available when this crate’s image feature is enabled.
Sourcepub fn get_processed_bitmap_with_width(
&self,
document: &PdfDocument<'_>,
width: Pixels,
) -> Result<PdfBitmap<'_>, PdfiumError>
pub fn get_processed_bitmap_with_width( &self, document: &PdfDocument<'_>, width: Pixels, ) -> Result<PdfBitmap<'_>, PdfiumError>
Returns a new PdfBitmap created from the bitmap buffer backing this PdfPageImageObject, taking into account any image filters, image mask, and object transforms applied to this page object.
The returned bitmap will be scaled during rendering so its width matches the given target width.
Sourcepub fn get_processed_image_with_width(
&self,
document: &PdfDocument<'_>,
width: Pixels,
) -> Result<DynamicImage, PdfiumError>
pub fn get_processed_image_with_width( &self, document: &PdfDocument<'_>, width: Pixels, ) -> Result<DynamicImage, PdfiumError>
Returns a new DynamicImage created from the bitmap buffer backing this PdfPageImageObject, taking into account any image filters, image mask, and object transforms applied to this page object.
The returned image will be scaled during rendering so its width matches the given target width.
This function is only available when this crate’s image feature is enabled.
Sourcepub fn get_processed_bitmap_with_height(
&self,
document: &PdfDocument<'_>,
height: Pixels,
) -> Result<PdfBitmap<'_>, PdfiumError>
pub fn get_processed_bitmap_with_height( &self, document: &PdfDocument<'_>, height: Pixels, ) -> Result<PdfBitmap<'_>, PdfiumError>
Returns a new PdfBitmap created from the bitmap buffer backing this PdfPageImageObject, taking into account any image filters, image mask, and object transforms applied to this page object.
The returned bitmap will be scaled during rendering so its height matches the given target height.
Sourcepub fn get_processed_image_with_height(
&self,
document: &PdfDocument<'_>,
height: Pixels,
) -> Result<DynamicImage, PdfiumError>
pub fn get_processed_image_with_height( &self, document: &PdfDocument<'_>, height: Pixels, ) -> Result<DynamicImage, PdfiumError>
Returns a new DynamicImage created from the bitmap buffer backing this PdfPageImageObject, taking into account any image filters, image mask, and object transforms applied to this page object.
The returned image will be scaled during rendering so its height matches the given target height.
This function is only available when this crate’s image feature is enabled.
Sourcepub fn get_processed_bitmap_with_size(
&self,
document: &PdfDocument<'_>,
width: Pixels,
height: Pixels,
) -> Result<PdfBitmap<'_>, PdfiumError>
pub fn get_processed_bitmap_with_size( &self, document: &PdfDocument<'_>, width: Pixels, height: Pixels, ) -> Result<PdfBitmap<'_>, PdfiumError>
Returns a new PdfBitmap created from the bitmap buffer backing this PdfPageImageObject, taking into account any image filters, image mask, and object transforms applied to this page object.
The returned bitmap will be scaled during rendering so its width and height match the given target dimensions.
Sourcepub fn get_processed_image_with_size(
&self,
document: &PdfDocument<'_>,
width: Pixels,
height: Pixels,
) -> Result<DynamicImage, PdfiumError>
pub fn get_processed_image_with_size( &self, document: &PdfDocument<'_>, width: Pixels, height: Pixels, ) -> Result<DynamicImage, PdfiumError>
Returns a new DynamicImage created from the bitmap buffer backing this PdfPageImageObject, taking into account any image filters, image mask, and object transforms applied to this page object.
The returned image will be scaled during rendering so its width and height match the given target dimensions.
This function is only available when this crate’s image feature is enabled.
Sourcepub fn width(&self) -> Result<Pixels, PdfiumError>
pub fn width(&self) -> Result<Pixels, PdfiumError>
Returns the expected pixel width of the processed image for this PdfPageImageObject, taking into account any image filters, image mask, and object transforms applied to this page object.
Sourcepub fn height(&self) -> Result<Pixels, PdfiumError>
pub fn height(&self) -> Result<Pixels, PdfiumError>
Returns the expected pixel height of the processed image for this PdfPageImageObject, taking into account any image filters, image mask, and object transforms applied to this page object.
Sourcepub fn set_image(&mut self, image: &DynamicImage) -> Result<(), PdfiumError>
pub fn set_image(&mut self, image: &DynamicImage) -> Result<(), PdfiumError>
Applies the byte data in the given DynamicImage to this PdfPageImageObject.
This function is only available when this crate’s image feature is enabled.
Sourcepub fn set_bitmap(&mut self, bitmap: &PdfBitmap<'_>) -> Result<(), PdfiumError>
pub fn set_bitmap(&mut self, bitmap: &PdfBitmap<'_>) -> Result<(), PdfiumError>
Applies the byte data in the given PdfBitmap to this PdfPageImageObject.
Sourcepub fn horizontal_dpi(&self) -> Result<f32, PdfiumError>
pub fn horizontal_dpi(&self) -> Result<f32, PdfiumError>
Returns the horizontal dots per inch resolution of the image assigned to this PdfPageImageObject, based on the intrinsic resolution of the assigned image and the dimensions of this object.
Sourcepub fn vertical_dpi(&self) -> Result<f32, PdfiumError>
pub fn vertical_dpi(&self) -> Result<f32, PdfiumError>
Returns the vertical dots per inch resolution of the image assigned to this PdfPageImageObject, based on the intrinsic resolution of the assigned image and the dimensions of this object.
Sourcepub fn bits_per_pixel(&self) -> Result<u8, PdfiumError>
pub fn bits_per_pixel(&self) -> Result<u8, PdfiumError>
Returns the bits per pixel for the image assigned to this PdfPageImageObject.
This value is not available if this object has not been attached to a PdfPage.
Sourcepub fn color_space(&self) -> Result<PdfColorSpace, PdfiumError>
pub fn color_space(&self) -> Result<PdfColorSpace, PdfiumError>
Returns the color space for the image assigned to this PdfPageImageObject.
This value is not available if this object has not been attached to a PdfPage.
Sourcepub fn filters(&self) -> PdfPageImageObjectFilters<'_>
pub fn filters(&self) -> PdfPageImageObjectFilters<'_>
Returns the collection of image filters currently applied to this PdfPageImageObject.
Sourcepub fn transform(
&mut self,
a: PdfMatrixValue,
b: PdfMatrixValue,
c: PdfMatrixValue,
d: PdfMatrixValue,
e: PdfMatrixValue,
f: PdfMatrixValue,
) -> Result<(), PdfiumError>
pub fn transform( &mut self, a: PdfMatrixValue, b: PdfMatrixValue, c: PdfMatrixValue, d: PdfMatrixValue, e: PdfMatrixValue, f: PdfMatrixValue, ) -> Result<(), PdfiumError>
Applies the given transformation, expressed as six values representing the six configurable elements of a nine-element 3x3 PDF transformation matrix, to this PdfPageImageObject.
To move, scale, rotate, or skew this PdfPageImageObject, consider using one or more of the following functions. Internally they all use Self::transform(), but are probably easier to use (and certainly clearer in their intent) in most situations.
- Self::translate(): changes the position of this PdfPageImageObject.
- Self::scale(): changes the size of this PdfPageImageObject.
- this PdfPageImageObject horizontally around its origin.
- this PdfPageImageObject vertically around its origin.
- Self::rotate_clockwise_degrees(), Self::rotate_counter_clockwise_degrees(), Self::rotate_clockwise_radians(), Self::rotate_counter_clockwise_radians(): rotates this PdfPageImageObject around its origin.
- Self::skew_degrees(), Self::skew_radians(): skews this PdfPageImageObject relative to its axes.
The order in which transformations are applied is significant. For example, the result of rotating then translating an object may be vastly different from translating then rotating the same object.
An overview of PDF transformation matrices can be found in the PDF Reference Manual version 1.7 on page 204; a detailed description can be found in section 4.2.3 on page 207.
Sourcepub fn apply_matrix(&mut self, matrix: PdfMatrix) -> Result<(), PdfiumError>
pub fn apply_matrix(&mut self, matrix: PdfMatrix) -> Result<(), PdfiumError>
Applies the given transformation, expressed as a PdfMatrix, to this PdfPageImageObject.
Sourcepub fn reset_matrix(&mut self, matrix: PdfMatrix) -> Result<(), PdfiumError>
pub fn reset_matrix(&mut self, matrix: PdfMatrix) -> Result<(), PdfiumError>
Resets the transform matrix for this PdfPageImageObject to the the given PdfMatrix, overriding any previously applied transformations.
Sourcepub fn reset_matrix_to_identity(&mut self) -> Result<(), PdfiumError>
pub fn reset_matrix_to_identity(&mut self) -> Result<(), PdfiumError>
Resets the transformation matrix for this PdfPageImageObject to the identity matrix, undoing any previously applied transformations.
Sourcepub fn translate(
&mut self,
delta_x: PdfPoints,
delta_y: PdfPoints,
) -> Result<(), PdfiumError>
pub fn translate( &mut self, delta_x: PdfPoints, delta_y: PdfPoints, ) -> Result<(), PdfiumError>
Moves the origin of this PdfPageImageObject by the given horizontal and vertical delta distances.
Sourcepub fn scale(
&mut self,
horizontal_scale_factor: PdfMatrixValue,
vertical_scale_factor: PdfMatrixValue,
) -> Result<(), PdfiumError>
pub fn scale( &mut self, horizontal_scale_factor: PdfMatrixValue, vertical_scale_factor: PdfMatrixValue, ) -> Result<(), PdfiumError>
Changes the size of this PdfPageImageObject, scaling it by the given horizontal and vertical scale factors.
Sourcepub fn flip_horizontally(&mut self) -> Result<(), PdfiumError>
pub fn flip_horizontally(&mut self) -> Result<(), PdfiumError>
Flips this PdfPageImageObject horizontally around its origin by applying a horizontal scale factor of -1.
Sourcepub fn flip_vertically(&mut self) -> Result<(), PdfiumError>
pub fn flip_vertically(&mut self) -> Result<(), PdfiumError>
Flips this PdfPageImageObject vertically around its origin by applying a vertical scale factor of -1.
Sourcepub fn reflect(&mut self) -> Result<(), PdfiumError>
pub fn reflect(&mut self) -> Result<(), PdfiumError>
Reflects this PdfPageImageObject by flipping it both horizontally and vertically around its origin.
Sourcepub fn rotate_counter_clockwise_degrees(
&mut self,
degrees: PdfMatrixValue,
) -> Result<(), PdfiumError>
pub fn rotate_counter_clockwise_degrees( &mut self, degrees: PdfMatrixValue, ) -> Result<(), PdfiumError>
Rotates this PdfPageImageObject counter-clockwise by the given number of degrees.
Sourcepub fn rotate_clockwise_degrees(
&mut self,
degrees: PdfMatrixValue,
) -> Result<(), PdfiumError>
pub fn rotate_clockwise_degrees( &mut self, degrees: PdfMatrixValue, ) -> Result<(), PdfiumError>
Rotates this PdfPageImageObject clockwise by the given number of degrees.
Sourcepub fn rotate_counter_clockwise_radians(
&mut self,
radians: PdfMatrixValue,
) -> Result<(), PdfiumError>
pub fn rotate_counter_clockwise_radians( &mut self, radians: PdfMatrixValue, ) -> Result<(), PdfiumError>
Rotates this PdfPageImageObject counter-clockwise by the given number of radians.
Sourcepub fn rotate_clockwise_radians(
&mut self,
radians: PdfMatrixValue,
) -> Result<(), PdfiumError>
pub fn rotate_clockwise_radians( &mut self, radians: PdfMatrixValue, ) -> Result<(), PdfiumError>
Rotates this PdfPageImageObject clockwise by the given number of radians.
Sourcepub fn skew_degrees(
&mut self,
x_axis_skew: PdfMatrixValue,
y_axis_skew: PdfMatrixValue,
) -> Result<(), PdfiumError>
pub fn skew_degrees( &mut self, x_axis_skew: PdfMatrixValue, y_axis_skew: PdfMatrixValue, ) -> Result<(), PdfiumError>
Skews the axes of this PdfPageImageObject by the given angles in degrees.
Sourcepub fn skew_radians(
&mut self,
x_axis_skew: PdfMatrixValue,
y_axis_skew: PdfMatrixValue,
) -> Result<(), PdfiumError>
pub fn skew_radians( &mut self, x_axis_skew: PdfMatrixValue, y_axis_skew: PdfMatrixValue, ) -> Result<(), PdfiumError>
Skews the axes of this PdfPageImageObject by the given angles in radians.
Sourcepub fn matrix(&self) -> Result<PdfMatrix, PdfiumError>
pub fn matrix(&self) -> Result<PdfMatrix, PdfiumError>
Returns the transformation matrix currently applied to this PdfPageImageObject.
Sourcepub fn get_translation(&self) -> (PdfPoints, PdfPoints)
pub fn get_translation(&self) -> (PdfPoints, PdfPoints)
Returns the current horizontal and vertical translation of the origin of this PdfPageImageObject.
Sourcepub fn get_horizontal_translation(&self) -> PdfPoints
pub fn get_horizontal_translation(&self) -> PdfPoints
Returns the current horizontal translation of the origin of this PdfPageImageObject.
Sourcepub fn get_vertical_translation(&self) -> PdfPoints
pub fn get_vertical_translation(&self) -> PdfPoints
Returns the current vertical translation of the origin of this PdfPageImageObject.
Sourcepub fn get_scale(&self) -> (PdfMatrixValue, PdfMatrixValue)
pub fn get_scale(&self) -> (PdfMatrixValue, PdfMatrixValue)
Returns the current horizontal and vertical scale factors applied to this PdfPageImageObject.
Sourcepub fn get_horizontal_scale(&self) -> PdfMatrixValue
pub fn get_horizontal_scale(&self) -> PdfMatrixValue
Returns the current horizontal scale factor applied to this PdfPageImageObject.
Sourcepub fn get_vertical_scale(&self) -> PdfMatrixValue
pub fn get_vertical_scale(&self) -> PdfMatrixValue
Returns the current vertical scale factor applied to this PdfPageImageObject.
Sourcepub fn get_rotation_counter_clockwise_degrees(&self) -> PdfMatrixValue
pub fn get_rotation_counter_clockwise_degrees(&self) -> PdfMatrixValue
Returns the counter-clockwise rotation applied to this PdfPageImageObject, in degrees.
If the object is both rotated and skewed, the return value of this function will reflect the combined operation.
Sourcepub fn get_rotation_clockwise_degrees(&self) -> PdfMatrixValue
pub fn get_rotation_clockwise_degrees(&self) -> PdfMatrixValue
Returns the clockwise rotation applied to this PdfPageImageObject, in degrees.
If the object is both rotated and skewed, the return value of this function will reflect the combined operation.
Sourcepub fn get_rotation_counter_clockwise_radians(&self) -> PdfMatrixValue
pub fn get_rotation_counter_clockwise_radians(&self) -> PdfMatrixValue
Returns the counter-clockwise rotation applied to this PdfPageImageObject, in radians.
If the object is both rotated and skewed, the return value of this function will reflect the combined operation.
Sourcepub fn get_rotation_clockwise_radians(&self) -> PdfMatrixValue
pub fn get_rotation_clockwise_radians(&self) -> PdfMatrixValue
Returns the clockwise rotation applied to this PdfPageImageObject, in radians.
If the object is both rotated and skewed, the return value of this function will reflect the combined operation.
Sourcepub fn get_skew_degrees(&self) -> (PdfMatrixValue, PdfMatrixValue)
pub fn get_skew_degrees(&self) -> (PdfMatrixValue, PdfMatrixValue)
Returns the current x axis and y axis skew angles applied to this PdfPageImageObject, in degrees.
If the object is both rotated and skewed, the return value of this function will reflect the combined operation.
Sourcepub fn get_x_axis_skew_degrees(&self) -> PdfMatrixValue
pub fn get_x_axis_skew_degrees(&self) -> PdfMatrixValue
Returns the current x axis skew angle applied to this PdfPageImageObject, in degrees.
If the object is both rotated and skewed, the return value of this function will reflect the combined operation.
Sourcepub fn get_y_axis_skew_degrees(&self) -> PdfMatrixValue
pub fn get_y_axis_skew_degrees(&self) -> PdfMatrixValue
Returns the current y axis skew applied to this PdfPageImageObject, in degrees.
If the object is both rotated and skewed, the return value of this function will reflect the combined operation.
Sourcepub fn get_skew_radians(&self) -> (PdfMatrixValue, PdfMatrixValue)
pub fn get_skew_radians(&self) -> (PdfMatrixValue, PdfMatrixValue)
Returns the current x axis and y axis skew angles applied to this PdfPageImageObject, in radians.
If the object is both rotated and skewed, the return value of this function will reflect the combined operation.
Sourcepub fn get_x_axis_skew_radians(&self) -> PdfMatrixValue
pub fn get_x_axis_skew_radians(&self) -> PdfMatrixValue
Returns the current x axis skew applied to this PdfPageImageObject, in radians.
If the object is both rotated and skewed, the return value of this function will reflect the combined operation.
Sourcepub fn get_y_axis_skew_radians(&self) -> PdfMatrixValue
pub fn get_y_axis_skew_radians(&self) -> PdfMatrixValue
Returns the current y axis skew applied to this PdfPageImageObject, in radians.
If the object is both rotated and skewed, the return value of this function will reflect the combined operation.
Trait Implementations§
Source§impl<'a> From<PdfPageImageObject<'a>> for PdfPageObject<'a>
impl<'a> From<PdfPageImageObject<'a>> for PdfPageObject<'a>
Source§fn from(object: PdfPageImageObject<'a>) -> Self
fn from(object: PdfPageImageObject<'a>) -> Self
Auto Trait Implementations§
impl<'a> Freeze for PdfPageImageObject<'a>
impl<'a> !RefUnwindSafe for PdfPageImageObject<'a>
impl<'a> !Send for PdfPageImageObject<'a>
impl<'a> !Sync for PdfPageImageObject<'a>
impl<'a> Unpin for PdfPageImageObject<'a>
impl<'a> !UnwindSafe for PdfPageImageObject<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'a, T> PdfPageObjectCommon<'a> for Twhere
T: PdfPageObjectPrivate<'a>,
impl<'a, T> PdfPageObjectCommon<'a> for Twhere
T: PdfPageObjectPrivate<'a>,
Source§fn has_transparency(&self) -> bool
fn has_transparency(&self) -> bool
true if this PdfPageObject contains transparency.Source§fn bounds(&self) -> Result<PdfQuadPoints, PdfiumError>
fn bounds(&self) -> Result<PdfQuadPoints, PdfiumError>
Source§fn transform_from(
&mut self,
other: &PdfPageObject<'_>,
) -> Result<(), PdfiumError>
fn transform_from( &mut self, other: &PdfPageObject<'_>, ) -> Result<(), PdfiumError>
Source§fn set_blend_mode(
&mut self,
blend_mode: PdfPageObjectBlendMode,
) -> Result<(), PdfiumError>
fn set_blend_mode( &mut self, blend_mode: PdfPageObjectBlendMode, ) -> Result<(), PdfiumError>
Source§fn fill_color(&self) -> Result<PdfColor, PdfiumError>
fn fill_color(&self) -> Result<PdfColor, PdfiumError>
Source§fn set_fill_color(&mut self, fill_color: PdfColor) -> Result<(), PdfiumError>
fn set_fill_color(&mut self, fill_color: PdfColor) -> Result<(), PdfiumError>
Source§fn stroke_color(&self) -> Result<PdfColor, PdfiumError>
fn stroke_color(&self) -> Result<PdfColor, PdfiumError>
Source§fn set_stroke_color(
&mut self,
stroke_color: PdfColor,
) -> Result<(), PdfiumError>
fn set_stroke_color( &mut self, stroke_color: PdfColor, ) -> Result<(), PdfiumError>
Source§fn stroke_width(&self) -> Result<PdfPoints, PdfiumError>
fn stroke_width(&self) -> Result<PdfPoints, PdfiumError>
Source§fn set_stroke_width(
&mut self,
stroke_width: PdfPoints,
) -> Result<(), PdfiumError>
fn set_stroke_width( &mut self, stroke_width: PdfPoints, ) -> Result<(), PdfiumError>
Source§fn line_join(&self) -> Result<PdfPageObjectLineJoin, PdfiumError>
fn line_join(&self) -> Result<PdfPageObjectLineJoin, PdfiumError>
Source§fn set_line_join(
&mut self,
line_join: PdfPageObjectLineJoin,
) -> Result<(), PdfiumError>
fn set_line_join( &mut self, line_join: PdfPageObjectLineJoin, ) -> Result<(), PdfiumError>
Source§fn line_cap(&self) -> Result<PdfPageObjectLineCap, PdfiumError>
fn line_cap(&self) -> Result<PdfPageObjectLineCap, PdfiumError>
Source§fn set_line_cap(
&mut self,
line_cap: PdfPageObjectLineCap,
) -> Result<(), PdfiumError>
fn set_line_cap( &mut self, line_cap: PdfPageObjectLineCap, ) -> Result<(), PdfiumError>
Source§fn dash_phase(&self) -> Result<PdfPoints, PdfiumError>
fn dash_phase(&self) -> Result<PdfPoints, PdfiumError>
Source§fn set_dash_phase(&mut self, dash_phase: PdfPoints) -> Result<(), PdfiumError>
fn set_dash_phase(&mut self, dash_phase: PdfPoints) -> Result<(), PdfiumError>
Source§fn dash_array(&self) -> Result<Vec<PdfPoints>, PdfiumError>
fn dash_array(&self) -> Result<Vec<PdfPoints>, PdfiumError>
Source§fn set_dash_array(
&mut self,
array: &[PdfPoints],
phase: PdfPoints,
) -> Result<(), PdfiumError>
fn set_dash_array( &mut self, array: &[PdfPoints], phase: PdfPoints, ) -> Result<(), PdfiumError>
Source§fn is_copyable(&self) -> bool
fn is_copyable(&self) -> bool
true if this PdfPageObject can be successfully copied by calling its
try_copy() function. Read moreSource§fn try_copy<'b>(
&self,
document: &'b PdfDocument<'b>,
) -> Result<PdfPageObject<'b>, PdfiumError>
fn try_copy<'b>( &self, document: &'b PdfDocument<'b>, ) -> Result<PdfPageObject<'b>, PdfiumError>
Source§fn copy_to_page<'b>(
&mut self,
page: &mut PdfPage<'b>,
) -> Result<PdfPageObject<'b>, PdfiumError>
fn copy_to_page<'b>( &mut self, page: &mut PdfPage<'b>, ) -> Result<PdfPageObject<'b>, PdfiumError>
Source§fn move_to_page(&mut self, page: &mut PdfPage<'_>) -> Result<(), PdfiumError>
fn move_to_page(&mut self, page: &mut PdfPage<'_>) -> Result<(), PdfiumError>
Source§fn move_to_annotation(
&mut self,
annotation: &mut PdfPageAnnotation<'_>,
) -> Result<(), PdfiumError>
fn move_to_annotation( &mut self, annotation: &mut PdfPageAnnotation<'_>, ) -> Result<(), PdfiumError>
Source§fn width(&self) -> Result<PdfPoints, PdfiumError>
fn width(&self) -> Result<PdfPoints, PdfiumError>
Source§fn height(&self) -> Result<PdfPoints, PdfiumError>
fn height(&self) -> Result<PdfPoints, PdfiumError>
Source§fn is_inside_rect(&self, rect: &PdfRect) -> bool
fn is_inside_rect(&self, rect: &PdfRect) -> bool
true if the bounds of this PdfPageObject lie entirely within the given rectangle.Source§fn does_overlap_rect(&self, rect: &PdfRect) -> bool
fn does_overlap_rect(&self, rect: &PdfRect) -> bool
true if the bounds of this PdfPageObject lie at least partially within
the given rectangle.