Criar  Editar  FrontPage  Índices  Buscar  Alterações  History  RSS  Back  Login

Pango::Attribute Diff - Ruby-GNOME2 Project Website

  • Added parts are displayed like this.
  • Deleted parts are displayed like this.

= class Pango::Attribute
Attributed text is used in a number of places in Pango. It is used as the input to the itemization process and also when creating a Pango::Layout.

The Pango::Attribute class represents the common portions of all attributes. Particular types of attributes inherits this class 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.

== Object Hierarchy
* Object
  * Data
    * Pango::Attribute

== Class Methods
--- Pango::Attribute.type_register(name)
    Allocate a new attribute type ID.
    * name: an identifier for the type. (Currently unused.)  
    * Returns: the new type ID.  

== Instance Methods
--- ==(other)
    Compare two attributes for equality. This compares only the actual value of the two attributes and not the ranges that the attributes apply to.
    * other: another Pango::Attribute  
    * Returns: true if the two attributes have the same value.  

--- start_index
    Gets the start index of the range (in bytes).
    * Returns: the start index

--- end_index
    Gets the end index of the range (in bytes).
    * Returns: the end index

== Constants
=== Type
distinguishes between different types of attributes. Along with the predefined values, it is possible to allocate additional values for custom attributes using Pango::Attribute.type_register. The predefined values are given below. The type of class used to store the attribute is listed in parentheses after the description.

--- TYPE_INVALID
--- TYPE_LANGUAGE
--- TYPE_FAMILY
--- TYPE_STYLE
--- TYPE_WEIGHT
--- TYPE_VARIANT
--- TYPE_STRETCH
--- TYPE_SIZE
--- TYPE_FONT_DESC
--- TYPE_FOREGROUND
--- TYPE_BACKGROUND
--- TYPE_UNDERLINE
--- TYPE_STRIKETHROUGH
--- TYPE_RISE
--- TYPE_SHAPE
--- TYPE_SCALE
--- TYPE_FALLBACK
--- TYPE_LETTER_SPACING
--- TYPE_UNDERLINE_COLOR
--- TYPE_STRIKETHROUGH_COLOR
--- TYPE_ABSOLUTE_SIZE

== ChangeLog
* 2005-11-15 Added. - ((<Masao>))