Package libavg :: Module avg :: Class Words

Class Words




A words node displays formatted text. Rendering is done by pango. All properties are set in pixels. International and multi-byte character sets are fully supported. Words nodes should use UTF-8 to encode international characters.

Instance Methods

Inherited from RasterNode: getBitmap, getOrigVertexCoords, getWarpedVertexCoords, setWarpedVertexCoords

Inherited from Node: __init__, getParent, getRelPos, releaseEventCapture, setEventCapture, setEventHandler

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties
  alignment
The paragraph alignment.
  color
The color of the text in standard html color notation: FF0000 is red, 00FF00 green, etc.
  font
The family name of the truetype font to use.
  indent
The indentation of the first line of the paragraph.
  italic
Boolean value that determines if the text is displayed in italic.
  linespacing
The number of pixels between different lines of a paragraph.
  parawidth
The width at which to word-wrap.
  size
The font size in pixels.
  smallcaps
  stretch
One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded' and 'ultraexpanded'.
  text
The string to display.
  weight
Sets the character weight.

Inherited from RasterNode: angle, blendmode, maxtileheight, maxtilewidth, pivotx, pivoty

Inherited from Node: active, height, id, opacity, sensitive, width, x, y

Inherited from object: __class__

Property Details

alignment

The paragraph alignment. Possible values are 'left', 'center' and 'right'.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

color

The color of the text in standard html color notation: FF0000 is red, 00FF00 green, etc.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

font

The family name of the truetype font to use. This font must be installed in the system, for instance using the installfonts.sh script in the main libavg source directory.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

indent

The indentation of the first line of the paragraph.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

italic

Boolean value that determines if the text is displayed in italic.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

linespacing

The number of pixels between different lines of a paragraph.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

parawidth

The width at which to word-wrap.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

size

The font size in pixels. Fractional sizes are supported.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

smallcaps

Get Method:
unreachable(...)
Set Method:
unreachable(...)

stretch

One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded' and 'ultraexpanded'. Not implemented in most fonts.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

text

The string to display. In the avg file, this is either the text attribute of the words node or the content of the words node itself. In the second case, the string can be formatted using the pango text attribute markup language described at http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html. Markup can also be used if the text is set using python.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

weight

Sets the character weight. Possible values are 'ultralight', 'light', 'normal', 'semibold', 'bold', 'ultrabold' and 'heavy'. This value is mapped to the weights implemented in the font chosen. In most cases, working weights are limited to 'normal' and 'bold'.
Get Method:
unreachable(...)
Set Method:
unreachable(...)