pub struct LayoutAttributes<'a> { /* private fields */ }
Expand description
Writer for an layout attributes dictionary. PDF 1.4+
This struct is created by Attributes::layout
.
Implementations§
source§impl<'a> LayoutAttributes<'a>
impl<'a> LayoutAttributes<'a>
General layout attributes.
sourcepub fn writing_mode(&mut self, mode: WritingMode) -> &mut Self
pub fn writing_mode(&mut self, mode: WritingMode) -> &mut Self
Write the /WritingMode
attribute to set the writing direction.
sourcepub fn background_color(&mut self, color: [f32; 3]) -> &mut Self
pub fn background_color(&mut self, color: [f32; 3]) -> &mut Self
Write the /BackgroundColor
attribute to set the background color in
RGB between 0
and 1
. PDF 1.5+
sourcepub fn border_color(&mut self, color: [f32; 3]) -> &mut Self
pub fn border_color(&mut self, color: [f32; 3]) -> &mut Self
Write the /BorderColor
attribute.
sourcepub fn border_style(&mut self, style: [LayoutBorderStyle; 4]) -> &mut Self
pub fn border_style(&mut self, style: [LayoutBorderStyle; 4]) -> &mut Self
Write the /BorderStyle
attribute.
sourcepub fn border_thickness(&mut self, thickness: [f32; 4]) -> &mut Self
pub fn border_thickness(&mut self, thickness: [f32; 4]) -> &mut Self
Write the /BorderThickness
attribute.
source§impl LayoutAttributes<'_>
impl LayoutAttributes<'_>
Block level elements.
sourcepub fn space_before(&mut self, space: f32) -> &mut Self
pub fn space_before(&mut self, space: f32) -> &mut Self
Write the /SpaceBefore
attribute.
sourcepub fn space_after(&mut self, space: f32) -> &mut Self
pub fn space_after(&mut self, space: f32) -> &mut Self
Write the /SpaceAfter
attribute.
sourcepub fn start_indent(&mut self, indent: f32) -> &mut Self
pub fn start_indent(&mut self, indent: f32) -> &mut Self
Write the /StartIndent
attribute.
sourcepub fn end_indent(&mut self, indent: f32) -> &mut Self
pub fn end_indent(&mut self, indent: f32) -> &mut Self
Write the /EndIndent
attribute.
sourcepub fn text_indent(&mut self, indent: f32) -> &mut Self
pub fn text_indent(&mut self, indent: f32) -> &mut Self
Write the /TextIndent
attribute.
sourcepub fn text_align(&mut self, align: TextAlign) -> &mut Self
pub fn text_align(&mut self, align: TextAlign) -> &mut Self
Write the /TextAlign
attribute.
source§impl LayoutAttributes<'_>
impl LayoutAttributes<'_>
Illustration elements.
source§impl LayoutAttributes<'_>
impl LayoutAttributes<'_>
Table header and data.
sourcepub fn block_align(&mut self, align: BlockAlign) -> &mut Self
pub fn block_align(&mut self, align: BlockAlign) -> &mut Self
Write the /BlockAlign
attribute.
sourcepub fn inline_align(&mut self, align: InlineAlign) -> &mut Self
pub fn inline_align(&mut self, align: InlineAlign) -> &mut Self
Write the /InlineAlign
attribute.
sourcepub fn table_border_style(&mut self, style: [LayoutBorderStyle; 4]) -> &mut Self
pub fn table_border_style(&mut self, style: [LayoutBorderStyle; 4]) -> &mut Self
Write the /TBorderStyle
attribute. PDF 1.5+.
sourcepub fn table_padding(&mut self, padding: f32) -> &mut Self
pub fn table_padding(&mut self, padding: f32) -> &mut Self
Write the /TPadding
attribute. PDF 1.5+.
source§impl<'a> LayoutAttributes<'a>
impl<'a> LayoutAttributes<'a>
Grouping elements.
sourcepub fn column_count(&mut self, count: i32) -> &mut Self
pub fn column_count(&mut self, count: i32) -> &mut Self
Write the /ColumnCount
attribute. PDF 1.6+.
sourcepub fn column_widths(&mut self) -> TypedArray<'_, f32>
pub fn column_widths(&mut self) -> TypedArray<'_, f32>
Start writing the /ColumnWidths
array. The last number in the array is
used for all extra columns. PDF 1.6+.
sourcepub fn column_gap(&mut self) -> TypedArray<'_, f32>
pub fn column_gap(&mut self) -> TypedArray<'_, f32>
Start writing the /ColumnGap
array. The last number in the array is used
for all extra columns. PDF 1.6+.
source§impl LayoutAttributes<'_>
impl LayoutAttributes<'_>
Inline elements.
sourcepub fn line_height(&mut self, height: LineHeight) -> &mut Self
pub fn line_height(&mut self, height: LineHeight) -> &mut Self
Write the /LineHeight
attribute.
sourcepub fn baseline_shift(&mut self, shift: f32) -> &mut Self
pub fn baseline_shift(&mut self, shift: f32) -> &mut Self
Write the /BaselineShift
attribute.
sourcepub fn text_decoration_type(
&mut self,
decoration: TextDecorationType,
) -> &mut Self
pub fn text_decoration_type( &mut self, decoration: TextDecorationType, ) -> &mut Self
Write the /TextDecorationType
attribute. PDF 1.5+.
sourcepub fn text_decoration_color(&mut self, color: [f32; 3]) -> &mut Self
pub fn text_decoration_color(&mut self, color: [f32; 3]) -> &mut Self
Write the /TextDecorationColor
attribute in RGB. PDF 1.5+.
sourcepub fn text_decoration_thickness(&mut self, thickness: f32) -> &mut Self
pub fn text_decoration_thickness(&mut self, thickness: f32) -> &mut Self
Write the /TextDecorationThickness
attribute. PDF 1.5+.
source§impl LayoutAttributes<'_>
impl LayoutAttributes<'_>
Vertical Text.
sourcepub fn glyph_orientation_vertical(&mut self, angle: f32) -> &mut Self
pub fn glyph_orientation_vertical(&mut self, angle: f32) -> &mut Self
Write the /GlyphOrientationVertical
attribute as an angle between -90
and 360 in multiples of 90. PDF 1.5+.
source§impl LayoutAttributes<'_>
impl LayoutAttributes<'_>
Ruby annotations.
sourcepub fn ruby_align(&mut self, align: RubyAlign) -> &mut Self
pub fn ruby_align(&mut self, align: RubyAlign) -> &mut Self
Write the /RubyAlign
attribute. PDF 1.5+.
sourcepub fn ruby_position(&mut self, position: RubyPosition) -> &mut Self
pub fn ruby_position(&mut self, position: RubyPosition) -> &mut Self
Write the /RubyPosition
attribute. 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.