Pango.AttrShape¶
record (struct)
The PangoAttrShape structure is used to represent attributes which
impose shape restrictions.
Static functions¶
new¶
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 PangoLayout.
Parameters:
ink_rect— ink rectangle to assign to each characterlogical_rect— logical rectangle to assign to each character
new_with_data¶
@staticmethod
def new_with_data(ink_rect: Rectangle, logical_rect: Rectangle, data: int | None = ..., copy_func: AttrDataCopyFunc | None = ...) -> Attribute
Creates a new shape attribute.
Like AttrShape.new, but a user data pointer
is also provided; this pointer can be accessed when later
rendering the glyph.
Parameters:
ink_rect— ink rectangle to assign to each characterlogical_rect— logical rectangle to assign to each characterdata— user data pointercopy_func— function to copydatawhen the attribute is copied. IfNone,datais simply copied as a pointer