Pango.AttrShape

Fields

Name Type Access Description
attr Pango.Attribute r/w the common portion of the attribute
copy_func Pango.AttrDataCopyFunc r/w copy function for the user data
data object r/w user data set (see Pango.AttrShape.new_with_data())
destroy_func GLib.DestroyNotify r/w destroy function for the user data
ink_rect Pango.Rectangle r/w the ink rectangle to restrict to
logical_rect Pango.Rectangle r/w the logical rectangle to restrict to

Methods

class new (ink_rect, logical_rect)
class new_with_data (ink_rect, logical_rect, data, copy_func)

Details

class Pango.AttrShape

The Pango.AttrShape structure is used to represent attributes which impose shape restrictions.

classmethod new(ink_rect, logical_rect)[source]
Parameters:
  • ink_rect (Pango.Rectangle) – ink rectangle to assign to each character
  • logical_rect (Pango.Rectangle) – logical rectangle to assign to each character
Returns:

the newly allocated Pango.Attribute, which should be freed with Pango.Attribute.destroy().

Return type:

Pango.Attribute

Create a new shape attribute. A shape is used to impose a particular ink and logical rectangle on the result of shaping a particular glyph. This might be used, for instance, for embedding a picture or a widget inside a Pango.Layout.

classmethod new_with_data(ink_rect, logical_rect, data, copy_func)[source]
Parameters:
Returns:

the newly allocated Pango.Attribute, which should be freed with Pango.Attribute.destroy().

Return type:

Pango.Attribute

Like Pango.AttrShape.new(), but a user data pointer is also provided; this pointer can be accessed when later rendering the glyph.

New in version 1.8.