Pango.AttrShape¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
attr |
r/w |
the common portion of the attribute |
|
copy_func |
r/w |
copy function for the user data |
|
data |
r/w |
user data set (see [func`Pango`.AttrShape.new_with_data]) |
|
destroy_func |
r/w |
destroy function for the user data |
|
ink_rect |
r/w |
the ink rectangle to restrict to |
|
logical_rect |
r/w |
the logical rectangle to restrict to |
Methods¶
class |
|
class |
|
Details¶
- class Pango.AttrShape¶
The
PangoAttrShape
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 characterlogical_rect (
Pango.Rectangle
) – logical rectangle to assign to each character
- Returns:
the newly allocated
PangoAttribute
, which should be freed with [method`Pango`.Attribute.destroy]- Return type:
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
.
- classmethod new_with_data(ink_rect, logical_rect, data, copy_func)[source]¶
- Parameters:
ink_rect (
Pango.Rectangle
) – ink rectangle to assign to each characterlogical_rect (
Pango.Rectangle
) – logical rectangle to assign to each charactercopy_func (
Pango.AttrDataCopyFunc
orNone
) – function to copy data when the attribute is copied. IfNone
, data is simply copied as a pointer
- Returns:
the newly allocated
PangoAttribute
, which should be freed with [method`Pango`.Attribute.destroy]- Return type:
Creates a new shape attribute.
Like [func`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.