pub struct FormXObject {
pub bbox: Rectangle,
pub matrix: Option<[f64; 6]>,
pub resources: Dictionary,
pub content: Vec<u8>,
pub group: Option<TransparencyGroup>,
pub reference: Option<ObjectId>,
pub metadata: Option<Dictionary>,
}Expand description
Form XObject - reusable graphics content
Fields§
§bbox: RectangleBounding box of the form
matrix: Option<[f64; 6]>Optional transformation matrix
resources: DictionaryResources used by the form
content: Vec<u8>Graphics operations content
group: Option<TransparencyGroup>Optional group attributes for transparency
reference: Option<ObjectId>Optional reference to external XObject
metadata: Option<Dictionary>Metadata
Implementations§
Source§impl FormXObject
impl FormXObject
Sourcepub fn with_matrix(self, matrix: [f64; 6]) -> Self
pub fn with_matrix(self, matrix: [f64; 6]) -> Self
Set transformation matrix
Sourcepub fn with_resources(self, resources: Dictionary) -> Self
pub fn with_resources(self, resources: Dictionary) -> Self
Set resources
Sourcepub fn with_content(self, content: Vec<u8>) -> Self
pub fn with_content(self, content: Vec<u8>) -> Self
Set content stream
Sourcepub fn with_transparency_group(self, group: TransparencyGroup) -> Self
pub fn with_transparency_group(self, group: TransparencyGroup) -> Self
Add transparency group
Sourcepub fn with_metadata(self, metadata: Dictionary) -> Self
pub fn with_metadata(self, metadata: Dictionary) -> Self
Set metadata
Sourcepub fn from_graphics_ops(bbox: Rectangle, ops: &str) -> Self
pub fn from_graphics_ops(bbox: Rectangle, ops: &str) -> Self
Create a form XObject from graphics operations
Sourcepub fn has_transparency(&self) -> bool
pub fn has_transparency(&self) -> bool
Check if form has transparency
Trait Implementations§
Source§impl Clone for FormXObject
impl Clone for FormXObject
Source§fn clone(&self) -> FormXObject
fn clone(&self) -> FormXObject
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FormXObject
impl RefUnwindSafe for FormXObject
impl Send for FormXObject
impl Sync for FormXObject
impl Unpin for FormXObject
impl UnwindSafe for FormXObject
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more