pub struct IconFit<'a> { /* private fields */ }
Expand description
Writer for an icon fit dictionary.
This struct is created by AppearanceCharacteristics::icon_fit
.
Implementations§
source§impl<'a> IconFit<'a>
impl<'a> IconFit<'a>
sourcepub fn scale(&mut self, value: IconScale) -> &mut Self
pub fn scale(&mut self, value: IconScale) -> &mut Self
Write the /SW
attribute. This sets under which circumstances the icon
of the widget annotation should be scaled.
sourcepub fn scale_type(&mut self, value: IconScaleType) -> &mut Self
pub fn scale_type(&mut self, value: IconScaleType) -> &mut Self
Write the /S
attribute. This sets the scaling type of this annoation.
sourcepub fn leftover_space(&mut self, x: f32, y: f32) -> &mut Self
pub fn leftover_space(&mut self, x: f32, y: f32) -> &mut Self
Write the /A
attribute. This sets the widget annotation’s leftover
space if proportional scaling is applied given as fractions between
0.0
and 1.0
.
sourcepub fn fit_bounds(&mut self, fit: bool) -> &mut Self
pub fn fit_bounds(&mut self, fit: bool) -> &mut Self
Wrtite the /FB
attribute. This sets whether the border line width
should be ignored when scaling the icon to fit the annotation bounds.
PDF 1.5+.
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.