pub trait PdfPageAnnotationVariableText<'a> {
// Required methods
fn font_size(&self, form: &PdfForm<'_>) -> Result<PdfPoints, PdfiumError>;
fn is_font_auto_sized(&self, form: &PdfForm<'_>) -> bool;
fn font_color(&self, form: &PdfForm<'_>) -> Result<PdfColor, PdfiumError>;
fn set_font_color(
&mut self,
form: &PdfForm<'_>,
color: PdfColor,
) -> Result<(), PdfiumError>;
fn justification(
&self,
) -> Result<PdfPageAnnotationVariableTextJustification, PdfiumError>;
fn rich_text(&self) -> Option<String>;
}Expand description
Text-handling functions common to all PdfPageAnnotation types that support custom text.
Required Methods§
Sourcefn font_size(&self, form: &PdfForm<'_>) -> Result<PdfPoints, PdfiumError>
fn font_size(&self, form: &PdfForm<'_>) -> Result<PdfPoints, PdfiumError>
Returns the size of the text in this annotation. A value of PdfPoints::ZERO indicates that the font size is determined automatically from the annotation height. See also the PdfPageAnnotationVariableText::is_font_auto_sized() function.
Sourcefn is_font_auto_sized(&self, form: &PdfForm<'_>) -> bool
fn is_font_auto_sized(&self, form: &PdfForm<'_>) -> bool
Returns true if the font size for this annotation is determined automatically
from the annotation height.
Sourcefn font_color(&self, form: &PdfForm<'_>) -> Result<PdfColor, PdfiumError>
fn font_color(&self, form: &PdfForm<'_>) -> Result<PdfColor, PdfiumError>
Returns the color of the text in this annotation.
Sourcefn set_font_color(
&mut self,
form: &PdfForm<'_>,
color: PdfColor,
) -> Result<(), PdfiumError>
fn set_font_color( &mut self, form: &PdfForm<'_>, color: PdfColor, ) -> Result<(), PdfiumError>
Sets the color of the text in this annotation.
Sourcefn justification(
&self,
) -> Result<PdfPageAnnotationVariableTextJustification, PdfiumError>
fn justification( &self, ) -> Result<PdfPageAnnotationVariableTextJustification, PdfiumError>
Returns the form of justification that should be used when displaying the text assigned to this annotation.