Struct pdf_writer::writers::Shading [−][src]
pub struct Shading<'a> { /* fields omitted */ }
Expand description
Writer for a shading dictionary. PDF 1.3+.
This struct is created by PdfWriter::shading
and
ShadingPattern::shading
.
Implementations
Write the /ShadingType
attribute.
Sets the type of shading. The available and required attributes change depending on this. Required.
Write the /ColorSpace
attribute.
Sets the color space of the shading function. May not be a Pattern
space. Required.
Write the /Background
attribute.
Sets the background color of the area to be shaded. The background
iterator must contain exactly as many elements as the current
color space has dimensions.
Write the /BBox
attribute.
Sets the bounding box of the shading in the target coordinate system.
Write the /AntiAlias
attribute.
Sets whether to anti-alias the shading.
Write the /Domain
attribute.
Sets the domain of the shading function in a rectangle. Can be used for
function, axial, or radial shadings. Will otherwise default to
[x_min = 0, x_max = 1, y_min = 0, y_max = 1]
Write the /Matrix
attribute.
Maps the shading domain rectangle to the target coordinate system. Can be used for function shadings. Will otherwise default to the identity matrix.
Write the /Function
attribute.
Sets the 2-in function to use for shading. Required.
Write the /Coords
attribute.
Sets the coordinates of the start and end of the axis in terms of the target coordinate system. Required for axial (4 items) and radial (6 items; centers and radii) shadings.
Methods from Deref<Target = Dict<'a>>
Start writing a pair with an arbitrary value.
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.