pub struct ColorantWriter<'a, 'n: 'a> { /* private fields */ }
Expand description
A writer for colorant structs.
Created by ColorantsWriter::add_colorant
.
Implementations§
source§impl<'a, 'n: 'a> ColorantWriter<'a, 'n>
impl<'a, 'n: 'a> ColorantWriter<'a, 'n>
sourcepub fn type_(&mut self, kind: ColorantType) -> &mut Self
pub fn type_(&mut self, kind: ColorantType) -> &mut Self
Write the xmpG:type
property.
Whether this is a spot color or a process color.
sourcepub fn swatch_name(&mut self, name: &str) -> &mut Self
pub fn swatch_name(&mut self, name: &str) -> &mut Self
Write the xmpG:swatchName
property.
The name of the colorant.
sourcepub fn colorant_mode(&mut self, mode: ColorantMode) -> &mut Self
pub fn colorant_mode(&mut self, mode: ColorantMode) -> &mut Self
Write the xmpG:colorantMode
property.
In which color space this colorant is defined.
sourcepub fn l(&mut self, l: f64) -> &mut Self
pub fn l(&mut self, l: f64) -> &mut Self
Write the xmpG:colorantType
property.
The L
value of a colorant with xmpG:colorantMode
set to Lab
.
sourcepub fn a(&mut self, a: i32) -> &mut Self
pub fn a(&mut self, a: i32) -> &mut Self
Write the xmpG:a
property.
The a
value of a colorant with xmpG:colorantMode
set to Lab
.
sourcepub fn b(&mut self, b: i32) -> &mut Self
pub fn b(&mut self, b: i32) -> &mut Self
Write the xmpG:b
property.
The b
value of a colorant with xmpG:colorantMode
set to Lab
.
sourcepub fn black(&mut self, black: f64) -> &mut Self
pub fn black(&mut self, black: f64) -> &mut Self
Write the xmpG:black
property.
The K
value of a colorant with xmpG:colorantMode
set to CMYK
.
sourcepub fn cyan(&mut self, cyan: f64) -> &mut Self
pub fn cyan(&mut self, cyan: f64) -> &mut Self
Write the xmpG:cyan
property.
The C
value of a colorant with xmpG:colorantMode
set to CMYK
.
sourcepub fn magenta(&mut self, magenta: f64) -> &mut Self
pub fn magenta(&mut self, magenta: f64) -> &mut Self
Write the xmpG:magenta
property.
The M
value of a colorant with xmpG:colorantMode
set to CMYK
.
sourcepub fn yellow(&mut self, yellow: f64) -> &mut Self
pub fn yellow(&mut self, yellow: f64) -> &mut Self
Write the xmpG:yellow
property.
The Y
value of a colorant with xmpG:colorantMode
set to CMYK
.
sourcepub fn red(&mut self, red: i32) -> &mut Self
pub fn red(&mut self, red: i32) -> &mut Self
Write the xmpG:red
property.
The R
value of a colorant with xmpG:colorantMode
set to RGB
.
Methods from Deref<Target = Struct<'a, 'n>>§
sourcepub fn element(
&mut self,
name: &'a str,
namespace: Namespace<'n>,
) -> Element<'_, 'n>
pub fn element( &mut self, name: &'a str, namespace: Namespace<'n>, ) -> Element<'_, 'n>
Start writing a property in the struct.
sourcepub fn element_with_attrs<'b>(
&mut self,
name: &'a str,
namespace: Namespace<'n>,
attrs: impl IntoIterator<Item = (&'b str, &'b str)>,
) -> Element<'_, 'n>
pub fn element_with_attrs<'b>( &mut self, name: &'a str, namespace: Namespace<'n>, attrs: impl IntoIterator<Item = (&'b str, &'b str)>, ) -> Element<'_, 'n>
Start writing a property with attributes in the struct.