pub struct FreeTextSpec { /* private fields */ }Expand description
A free-text annotation (/Subtype /FreeText): text drawn on the page
rather than held behind an icon.
The one subtype whose text is required — a free-text annotation with no
/Contents has nothing to draw — so it is a constructor argument here
rather than the optional contents every other builder has, and this
builder declares the shared metadata setters itself instead of taking them
from spec_builder!.
Implementations§
Source§impl FreeTextSpec
impl FreeTextSpec
Sourcepub fn new(rect: Rect, color: Color, contents: impl Into<String>) -> Self
pub fn new(rect: Rect, color: Color, contents: impl Into<String>) -> Self
Free text over rect, with DEFAULT_DA as the
default appearance.
Sourcepub fn da(self, da: impl Into<String>) -> Self
pub fn da(self, da: impl Into<String>) -> Self
Sets /DA, the default-appearance string naming the font and size the
body is laid out with.
Left unset this is DEFAULT_DA.
Sourcepub fn align(self, align: Alignment) -> Self
pub fn align(self, align: Alignment) -> Self
Sets /Q, the text alignment.
Unset leaves the key out, which a reader takes as flush left.
Sets /T, the author.
Sourcepub fn name(self, name: impl Into<String>) -> AnnotWrite
pub fn name(self, name: impl Into<String>) -> AnnotWrite
Sets /NM, the annotation’s unique name.
Sourcepub fn modified(self, modified: impl Into<String>) -> AnnotWrite
pub fn modified(self, modified: impl Into<String>) -> AnnotWrite
Sets /M, the modification date.
Sourcepub fn flags(self, flags: AnnotFlags) -> AnnotWrite
pub fn flags(self, flags: AnnotFlags) -> AnnotWrite
Sets /F, the annotation flags.
Sourcepub fn meta(self, meta: AnnotMeta) -> AnnotWrite
pub fn meta(self, meta: AnnotMeta) -> AnnotWrite
Sets every metadata field at once.
Trait Implementations§
Source§impl Clone for FreeTextSpec
impl Clone for FreeTextSpec
Source§fn clone(&self) -> FreeTextSpec
fn clone(&self) -> FreeTextSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more