pub struct ParagraphStyle {
pub text_align: TextAlign,
pub text_direction: TextDirection,
pub line_height: TextUnit,
pub text_indent: Option<TextIndent>,
pub platform_style: Option<PlatformParagraphStyle>,
pub line_height_style: Option<LineHeightStyle>,
pub line_break: LineBreak,
pub hyphens: Hyphens,
pub text_motion: Option<TextMotion>,
}Expand description
Style of a whole paragraph: alignment, direction, line height and line breaking.
Compose’s ParagraphStyle.
Fields§
§text_align: TextAlignHorizontal alignment of the lines.
text_direction: TextDirectionBase direction of the paragraph.
line_height: TextUnitDistance between baselines, in Sp or as a multiple of the font size. Unspecified uses
the natural line height of the font.
text_indent: Option<TextIndent>Indent of the first line and of the other lines. Text layout does not apply it yet.
platform_style: Option<PlatformParagraphStyle>Platform-specific settings.
line_height_style: Option<LineHeightStyle>How the line height is placed in each line and trimmed at the edges of the paragraph.
line_break: LineBreakStrategy that breaks the paragraph into lines.
hyphens: HyphensWhether words may be split with a hyphen.
text_motion: Option<TextMotion>Whether the text moves. None counts as TextMotion::Static.
Implementations§
Source§impl ParagraphStyle
impl ParagraphStyle
Sourcepub fn merge(&self, other: &Self) -> Self
pub fn merge(&self, other: &Self) -> Self
Returns a style where each field set in other replaces the one in self. Fields unset
in other keep the value of self.
Sourcepub fn plus(&self, other: &Self) -> Self
pub fn plus(&self, other: &Self) -> Self
Same as ParagraphStyle::merge. Compose’s ParagraphStyle.plus.
Sourcepub fn render_hash(&self) -> u64
pub fn render_hash(&self) -> u64
Hash of every field that changes how the paragraph looks, as renderers use it to key caches.