Struct pdf_writer::writers::Separation

source ·
pub struct Separation<'a> { /* private fields */ }
Expand description

Writer for a separation dictionary. PDF 1.2+.

First, one of the alternate_... methods must be called to specify the alternate color space. Then, one of the tint_... methods must be called to specify the tint transform method. If the tint transform method is called before the alternate color space, the function panics. If multiple alternate color space functions are called, the function panics.

This struct is created by ColorSpace::separation.

Implementations§

source§

impl<'a> Separation<'a>

source

pub fn alternate_device(&mut self, device_space: DeviceColorSpace) -> &mut Self

Write the alternateSpace element as a device color space.

source

pub fn alternate_color_space(&mut self) -> ColorSpace<'_>

Start writing the alternateSpace element as a color space array. The color space must not be another Pattern, Separation, or DeviceN color space.

source

pub fn alternate_color_space_ref(&mut self, id: Ref) -> &mut Self

Write the alternateSpace element as an indirect reference. The color space must not be another Pattern, Separation, or DeviceN color space.

source

pub fn tint_exponential(&mut self) -> ExponentialFunction<'_>

Start writing the tintTransform element as an exponential interpolation function.

source

pub fn tint_stitching(&mut self) -> StitchingFunction<'_>

Start writing the tintTransform element as a stitching function.

source

pub fn tint_ref(&mut self, id: Ref) -> &mut Self

Write the tintTransform element as an indirect reference to a function. The function must take a single number as input and produce a color in the alternate color space as output. This must be used if a stream function like SampledFunction or PostScriptFunction is used.

Auto Trait Implementations§

§

impl<'a> Freeze for Separation<'a>

§

impl<'a> RefUnwindSafe for Separation<'a>

§

impl<'a> Send for Separation<'a>

§

impl<'a> Sync for Separation<'a>

§

impl<'a> Unpin for Separation<'a>

§

impl<'a> !UnwindSafe for Separation<'a>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Finish for T

source§

fn finish(self)

Does nothing but move self, equivalent to drop.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.