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>
General layout attributes.
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<'_>
Block level elements.
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<'_>
Illustration elements.
impl LayoutAttributes<'_>
Illustration elements.
Source§impl LayoutAttributes<'_>
Table header and data.
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 LayoutAttributes<'_>
Grouping elements.
impl LayoutAttributes<'_>
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<'_>
Inline elements.
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<'_>
Vertical Text.
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<'_>
Ruby annotations.
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.