[−][src]Struct printpdf::types::plugins::graphics::pdf_resources::PdfResources
Struct for storing the PDF Resources, to be used on a PDF page
Fields
xobjects: XObjectList
External graphics objects
patterns: PatternList
Patterns used on this page. Do not yet, use, placeholder.
graphics_states: ExtendedGraphicsStateList
Graphics states used on this page
layers: OCGList
Layers / optional content ("Properties") in the resource dictionary
Implementations
impl PdfResources
[src]
pub fn new() -> Self
[src]
Creates a new PdfResources struct (resources for exactly one PDF page)
pub fn add_graphics_state(
&mut self,
added_state: ExtendedGraphicsState
) -> ExtendedGraphicsStateRef
[src]
&mut self,
added_state: ExtendedGraphicsState
) -> ExtendedGraphicsStateRef
Add a graphics state to the resources
pub fn add_xobject(&mut self, xobj: XObject) -> XObjectRef
[src]
Adds an XObject to the page
pub fn add_pattern(&mut self, pattern: Pattern) -> PatternRef
[src]
STUB: Adds a pattern to the resources, to be used like a color
pub fn into_with_document_and_layers(
self,
doc: &mut Document,
layers: Vec<Object>
) -> (Dictionary, Vec<OCGRef>)
[src]
self,
doc: &mut Document,
layers: Vec<Object>
) -> (Dictionary, Vec<OCGRef>)
See XObject::Into_with_document
.
The resources also need access to the layers (the optional content groups), this should be a
Vec<lopdf::Object::Reference>
(to the actual OCG groups, which are added on the document level)
Trait Implementations
impl Clone for PdfResources
[src]
pub fn clone(&self) -> PdfResources
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PdfResources
[src]
impl Default for PdfResources
[src]
pub fn default() -> PdfResources
[src]
Auto Trait Implementations
impl RefUnwindSafe for PdfResources
[src]
impl Send for PdfResources
[src]
impl Sync for PdfResources
[src]
impl Unpin for PdfResources
[src]
impl UnwindSafe for PdfResources
[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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,