GXPS.Page

g GObject.GInterface GObject.GInterface Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object GXPS.Page GXPS.Page GObject.Object->GXPS.Page Gio.Initable->GXPS.Page

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.Initable (2)

Structs:

GObject.ObjectClass (5)

class

error_quark ()

get_anchor_destination (anchor)

get_links ()

get_size ()

render (cr)

Virtual Methods

Inherited:

GObject.Object (7), Gio.Initable (1)

Properties

Name

Type

Flags

Short Description

source

str

w/co

The Page Source File

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class GXPS.Page(**kwargs)
Bases:

GObject.Object, Gio.Initable

Abstract:

No

Structure:

GXPS.PageClass

The GXPS.Page struct contains only private fields and should not be directly accessed.

classmethod error_quark()
Return type:

int

get_anchor_destination(anchor)
Parameters:

anchor (str) – the name of an anchor in self

Raises:

GLib.Error

Returns:

True if the destination for the anchor was found in page and area contains the rectangle, False otherwise.

area:

return location for page area of anchor

Return type:

(bool, area: cairo.Rectangle)

Gets the rectangle of self corresponding to the destination of the given anchor. If anchor is not found in self, False will be returned and error will contain GXPS.PageError.INVALID_ANCHOR

Raises:

GLib.Error

Returns:

a GLib.List of GXPS.Link items.

Return type:

[GXPS.Link]

Gets a list of GXPS.Link items that map from a location in self to a GXPS.LinkTarget. Items in the list should be freed with GXPS.Link.free() and the list itself with g_list_free() when done.

get_size()
Returns:

width:

return location for the page width

height:

return location for the page height

Return type:

(width: float, height: float)

Gets the size of the page.

render(cr)
Parameters:

cr (cairo.Context) – a cairo context to render to

Raises:

GLib.Error

Returns:

True if page was successfully rendered, False otherwise.

Return type:

bool

Render the page to the given cairo context. In case of error, False is returned and error is filled with information about error.

Property Details

GXPS.Page.props.source
Name:

source

Type:

str

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

The Page Source File