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.