Pango.Attribute¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
end_index |
r/w |
end index of the range (in bytes). The character at this index is not included in the range. |
|
klass |
r/w |
the class structure holding information about the type of the attribute |
|
start_index |
r/w |
the start index of the range (in bytes). |
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Pango.Attribute¶
The
PangoAttributestructure represents the common portions of all attributes.Particular types of attributes include this structure as their initial portion. The common portion of the attribute holds the range to which the value in the type-specific part of the attribute applies and should be initialized using [method`Pango`.Attribute.init]. By default, an attribute will have an all-inclusive range of [0,:obj:GObject.G_MAXUINT].
- as_color()[source]¶
- Returns:
The attribute as
PangoAttrColor, orNoneif it’s not a color attribute- Return type:
Returns the attribute cast to
PangoAttrColor.This is mainly useful for language bindings.
New in version 1.50.
- as_float()[source]¶
- Returns:
The attribute as
PangoAttrFloat, orNoneif it’s not a floating point attribute- Return type:
Returns the attribute cast to
PangoAttrFloat.This is mainly useful for language bindings.
New in version 1.50.
- as_font_desc()[source]¶
- Returns:
The attribute as
PangoAttrFontDesc, orNoneif it’s not a font description attribute- Return type:
Returns the attribute cast to
PangoAttrFontDesc.This is mainly useful for language bindings.
New in version 1.50.
- as_font_features()[source]¶
- Returns:
The attribute as
PangoAttrFontFeatures, orNoneif it’s not a font features attribute- Return type:
Returns the attribute cast to
PangoAttrFontFeatures.This is mainly useful for language bindings.
New in version 1.50.
- as_int()[source]¶
- Returns:
The attribute as
PangoAttrInt, orNoneif it’s not an integer attribute- Return type:
Returns the attribute cast to
PangoAttrInt.This is mainly useful for language bindings.
New in version 1.50.
- as_language()[source]¶
- Returns:
The attribute as
PangoAttrLanguage, orNoneif it’s not a language attribute- Return type:
Returns the attribute cast to
PangoAttrLanguage.This is mainly useful for language bindings.
New in version 1.50.
- as_shape()[source]¶
- Returns:
The attribute as
PangoAttrShape, orNoneif it’s not a shape attribute- Return type:
Returns the attribute cast to
PangoAttrShape.This is mainly useful for language bindings.
New in version 1.50.
- as_size()[source]¶
- Returns:
The attribute as
PangoAttrSize, orNoneif it’s not a size attribute- Return type:
Returns the attribute cast to
PangoAttrSize.This is mainly useful for language bindings.
New in version 1.50.
- as_string()[source]¶
- Returns:
The attribute as
PangoAttrString, orNoneif it’s not a string attribute- Return type:
Returns the attribute cast to
PangoAttrString.This is mainly useful for language bindings.
New in version 1.50.
- copy()[source]¶
- Returns:
the newly allocated
PangoAttribute, which should be freed with [method`Pango`.Attribute.destroy].- Return type:
Make a copy of an attribute.
- equal(attr2)[source]¶
- Parameters:
attr2 (
Pango.Attribute) – anotherPangoAttribute- Returns:
Trueif the two attributes have the same value- Return type:
Compare two attributes for equality.
This compares only the actual value of the two attributes and not the ranges that the attributes apply to.
- init(klass)[source]¶
- Parameters:
klass (
Pango.AttrClass) – aPangoAttrClass
Initializes self's klass to klass, it’s start_index to
Pango.ATTR_INDEX_FROM_TEXT_BEGINNINGand end_index toPango.ATTR_INDEX_TO_TEXT_ENDsuch that the attribute applies to the entire text by default.New in version 1.20.