pub struct TilingPattern<'a> { /* private fields */ }
Expand description
Writer for a tiling pattern stream.
This struct is created by Chunk::tiling_pattern
.
Implementations§
source§impl<'a> TilingPattern<'a>
impl<'a> TilingPattern<'a>
sourcepub fn paint_type(&mut self, paint_type: PaintType) -> &mut Self
pub fn paint_type(&mut self, paint_type: PaintType) -> &mut Self
Write the /PaintType
attribute.
Sets whether to use external or stream color. Required.
sourcepub fn tiling_type(&mut self, tiling_type: TilingType) -> &mut Self
pub fn tiling_type(&mut self, tiling_type: TilingType) -> &mut Self
Write the /TilingType
attribute.
Sets how to stretch and space the pattern. Required.
sourcepub fn bbox(&mut self, bbox: Rect) -> &mut Self
pub fn bbox(&mut self, bbox: Rect) -> &mut Self
Write the /BBox
attribute.
Sets the bounding box of the pattern in the pattern’s coordinate system. Required.
sourcepub fn x_step(&mut self, x_step: f32) -> &mut Self
pub fn x_step(&mut self, x_step: f32) -> &mut Self
Write the /XStep
attribute.
Sets the horizontal spacing between pattern cells. Required.
Panics if x_step
is zero.
sourcepub fn y_step(&mut self, y_step: f32) -> &mut Self
pub fn y_step(&mut self, y_step: f32) -> &mut Self
Write the /YStep
attribute.
Sets the vertical spacing between pattern cells. Required.
Panics if y_step
is zero.
Methods from Deref<Target = Stream<'a>>§
sourcepub fn decode_parms(&mut self) -> DecodeParms<'_>
pub fn decode_parms(&mut self) -> DecodeParms<'_>
Start writing the /DecodeParms
attribute.
This is a dictionary that specifies parameters to be used in decoding
the stream data using the filter specified by the
/Filter
attribute.
Methods from Deref<Target = Dict<'a>>§
sourcepub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
pub fn insert(&mut self, key: Name<'_>) -> Obj<'_>
Start writing a pair with an arbitrary value.
sourcepub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
pub fn pair<T: Primitive>(&mut self, key: Name<'_>, value: T) -> &mut Self
Write a pair with a primitive value.
This is a shorthand for dict.insert(key).primitive(value)
.
sourcepub fn pairs<'n, T: Primitive>(
&mut self,
pairs: impl IntoIterator<Item = (Name<'n>, T)>,
) -> &mut Self
pub fn pairs<'n, T: Primitive>( &mut self, pairs: impl IntoIterator<Item = (Name<'n>, T)>, ) -> &mut Self
Write a sequence of pairs with primitive values.