Trait poppler::prelude::AnnotExt

source ·
pub trait AnnotExt: IsA<Annot> + Sealed + 'static {
    // Provided methods
    fn annot_type(&self) -> AnnotType { ... }
    fn color(&self) -> Option<Color> { ... }
    fn contents(&self) -> Option<GString> { ... }
    fn flags(&self) -> AnnotFlag { ... }
    fn modified(&self) -> Option<GString> { ... }
    fn name(&self) -> Option<GString> { ... }
    fn page_index(&self) -> i32 { ... }
    fn rectangle(&self) -> Rectangle { ... }
    fn set_color(&self, poppler_color: Option<&Color>) { ... }
    fn set_contents(&self, contents: &str) { ... }
    fn set_flags(&self, flags: AnnotFlag) { ... }
    fn set_rectangle(&self, poppler_rect: &mut Rectangle) { ... }
}
Expand description

Trait containing all Annot methods.

Implementors

AnnotMarkup, Annot

Provided Methods§

source

fn annot_type(&self) -> AnnotType

Gets the type of self

Returns

AnnotType of self.

source

fn color(&self) -> Option<Color>

Retrieves the color of self.

Returns

a new allocated Color with the color values of self, or None. It must be freed with g_free() when done.

source

fn contents(&self) -> Option<GString>

Retrieves the contents of self.

Returns

a new allocated string with the contents of self. It must be freed with g_free() when done.

source

fn flags(&self) -> AnnotFlag

Retrieves the flag field specifying various characteristics of the self.

Returns

the flag field of self.

source

fn modified(&self) -> Option<GString>

Retrieves the last modification data of self. The returned string will be either a PDF format date or a text string. See also poppler_date_parse()

Returns

a new allocated string with the last modification data of self. It must be freed with g_free() when done.

source

fn name(&self) -> Option<GString>

Retrieves the name of self.

Returns

a new allocated string with the name of self. It must be freed with g_free() when done.

source

fn page_index(&self) -> i32

Returns the page index to which self is associated, or -1 if unknown

Returns

page index or -1

source

fn rectangle(&self) -> Rectangle

Retrieves the rectangle representing the page coordinates where the annotation self is placed.

Returns
poppler_rect

a Rectangle to store the annotation’s coordinates

source

fn set_color(&self, poppler_color: Option<&Color>)

Sets the color of self.

poppler_color

a Color, or None

source

fn set_contents(&self, contents: &str)

Sets the contents of self to the given value, replacing the current contents.

contents

a text string containing the new contents

source

fn set_flags(&self, flags: AnnotFlag)

Sets the flag field specifying various characteristics of the self.

flags

a AnnotFlag

source

fn set_rectangle(&self, poppler_rect: &mut Rectangle)

Move the annotation to the rectangle representing the page coordinates where the annotation self should be placed.

poppler_rect

a Rectangle with the new annotation’s coordinates

Implementors§

source§

impl<O: IsA<Annot>> AnnotExt for O