Struct rckive_genpdf::elements::Text
source · pub struct Text { /* private fields */ }
Expand description
A single line of formatted text.
This element renders a single styled string on a single line. It does not wrap it if the
string is longer than the line. Therefore you should prefer Paragraph
over Text
for
most use cases.
Implementations§
Trait Implementations§
source§impl Element for Text
impl Element for Text
source§fn render(
&mut self,
context: &Context,
area: Area<'_>,
style: Style
) -> Result<RenderResult, Error>
fn render(
&mut self,
context: &Context,
area: Area<'_>,
style: Style
) -> Result<RenderResult, Error>
Renders this element to the given area using the given style and font cache. Read more
source§fn framed(self, line_style: impl Into<LineStyle>) -> FramedElement<Self>where
Self: Sized,
fn framed(self, line_style: impl Into<LineStyle>) -> FramedElement<Self>where
Self: Sized,
Draws a frame around this element using the given line style.