PapersDocument.AnnotationFreeText

g GObject.Object GObject.Object PapersDocument.Annotation PapersDocument.Annotation GObject.Object->PapersDocument.Annotation PapersDocument.AnnotationMarkup PapersDocument.AnnotationMarkup PapersDocument.Annotation->PapersDocument.AnnotationMarkup PapersDocument.AnnotationFreeText PapersDocument.AnnotationFreeText PapersDocument.AnnotationMarkup->PapersDocument.AnnotationFreeText

Subclasses:

None

Methods

Inherited:

PapersDocument.AnnotationMarkup (11), PapersDocument.Annotation (19), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (page)

auto_resize (ctx)

get_font_description ()

get_font_rgba ()

set_font_description (font_desc)

set_font_rgba (rgba)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

PapersDocument.AnnotationMarkup (6), PapersDocument.Annotation (8)

Name

Type

Flags

Short Description

font-desc

Pango.FontDescription

r/w

font-rgba

Gdk.RGBA

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class PapersDocument.AnnotationFreeText(**kwargs)
Bases:

PapersDocument.AnnotationMarkup

Abstract:

No

Structure:

PapersDocument.AnnotationFreeTextClass

classmethod new(page)
Parameters:

page (PapersDocument.Page) – a PapersDocument.Page

Returns:

a new free text annotation

Return type:

PapersDocument.Annotation

Creates a new free text annotation in the page. Font shall be set afterwards.

New in version 48.0.

auto_resize(ctx)
Parameters:

ctx (Pango.Context) – a valid Pango.Context

Resize the annotation so as all the text fits in its rect, according to Pango metrics. This should typically be called every time the content is changed unless the free text annotation is supposed to be fixed width for instance.

New in version 48.0.

get_font_description()
Returns:

the font description used to display the annotation.

Return type:

Pango.FontDescription

Returns a copy of the font descption used by the annotation.

New in version 48.0.

get_font_rgba()
Returns:

the font RGBA, must be freed by the caller

Return type:

Gdk.RGBA

Gets the text color of self.

New in version 48.0.

set_font_description(font_desc)
Parameters:

font_desc (Pango.FontDescription) – a Pango.FontDescription

Returns:

True if the font description has been changed, False otherwise

Return type:

bool

Set the font of the free text annotation to annotation to font_desc.

New in version 48.0.

set_font_rgba(rgba)
Parameters:

rgba (Gdk.RGBA) – a Gdk.RGBA

Returns:

True if the color has been changed, False otherwise

Return type:

bool

Set the text color of the annotation to rgba.

New in version 48.0.

Property Details

PapersDocument.AnnotationFreeText.props.font_desc
Name:

font-desc

Type:

Pango.FontDescription

Default Value:

None

Flags:

READABLE, WRITABLE

PapersDocument.AnnotationFreeText.props.font_rgba
Name:

font-rgba

Type:

Gdk.RGBA

Default Value:

None

Flags:

READABLE, WRITABLE