pub struct SeparationColorSpace {
pub colorant_name: String,
pub alternate_space: AlternateColorSpace,
pub tint_transform: TintTransform,
}Expand description
Separation color space for spot colors
Fields§
§colorant_name: StringName of the colorant (e.g., “PANTONE 185 C”, “Gold”, “Silver”)
alternate_space: AlternateColorSpaceAlternate color space (usually DeviceRGB or DeviceCMYK)
tint_transform: TintTransformTint transformation function
Implementations§
Source§impl SeparationColorSpace
impl SeparationColorSpace
Sourcepub fn new(
colorant_name: impl Into<String>,
alternate_space: AlternateColorSpace,
tint_transform: TintTransform,
) -> Self
pub fn new( colorant_name: impl Into<String>, alternate_space: AlternateColorSpace, tint_transform: TintTransform, ) -> Self
Create a new separation color space
Sourcepub fn rgb_separation(
colorant_name: impl Into<String>,
r: f64,
g: f64,
b: f64,
) -> Self
pub fn rgb_separation( colorant_name: impl Into<String>, r: f64, g: f64, b: f64, ) -> Self
Create a simple RGB separation
Sourcepub fn cmyk_separation(
colorant_name: impl Into<String>,
c: f64,
m: f64,
y: f64,
k: f64,
) -> Self
pub fn cmyk_separation( colorant_name: impl Into<String>, c: f64, m: f64, y: f64, k: f64, ) -> Self
Create a simple CMYK separation
Sourcepub fn to_pdf_array(&self) -> Vec<Object>
pub fn to_pdf_array(&self) -> Vec<Object>
Convert to PDF color space array
Sourcepub fn apply_tint(&self, tint: f64) -> Vec<f64>
pub fn apply_tint(&self, tint: f64) -> Vec<f64>
Apply tint value to get alternate color space values
Sourcepub fn tint_to_rgb(&self, tint: f64) -> Color
pub fn tint_to_rgb(&self, tint: f64) -> Color
Convert tint to RGB approximation
Trait Implementations§
Source§impl Clone for SeparationColorSpace
impl Clone for SeparationColorSpace
Source§fn clone(&self) -> SeparationColorSpace
fn clone(&self) -> SeparationColorSpace
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SeparationColorSpace
impl RefUnwindSafe for SeparationColorSpace
impl Send for SeparationColorSpace
impl Sync for SeparationColorSpace
impl Unpin for SeparationColorSpace
impl UnsafeUnpin for SeparationColorSpace
impl UnwindSafe for SeparationColorSpace
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