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.

Write the /Extend attribute.

Set whether the shading should extend beyond either side of the axis / circles. Can be used for axial and radial shadings.

Methods from Deref<Target = Dict<'a>>

The number of written pairs.

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).

Write a sequence of pairs with primitive values.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Start writing the object.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.