新規作成  編集  Ruby-GNOME2 Project Website  ページ一覧  検索  更新履歴  編集履歴  RSS  Back  ログイン

Pango::Renderer 差分 - Ruby-GNOME2 Project Website

  • 最後の更新で追加された部分はこのように表示します。
  • 最後の更新で削除された部分はこのように表示します。

= class Pango::Renderer
Pango::Renderer is a base class for objects that are used to render Pango objects such as Pango::GlyphString and Pango::Layout. ((* Since 1.8 *))

== Object Hierarchy
* Object
  * GLib::Instantiatable
    * GLib::Object
      * Pango::Renderer

== Instance Methods
--- draw_layout(layout, x, y)
    Draws layout with the specified Pango::Renderer. ((* Since 1.8 *))
    * layout: a Pango::Layout
    * x: x position of left edge of baseline, in user space coordinates in Pango units.
    * y: y position of top edge of baseline, in user space coordinates in Pango units.
    * Returns: self

--- draw_layout_line(line, x, y)
    Draws line with the specified Pango::Renderer. ((* Since 1.8 *))
    * line: a Pango::LayoutLine
    * x: x position of left edge of baseline, in user space coordinates in Pango units.
    * y: y position of top edge of baseline, in user space coordinates in Pango units.
    * Returns: self

--- draw_glyphs(font, glyphs, x, y)
    Draws the glyphs with the specified Pango::Renderer. ((* Since 1.8 *))
    * font: a Pango::Font
    * glyphs: a Pango::GlyphString
    * x: x position of left edge of baseline, in user space coordinates in Pango units.
    * y: y position of top edge of baseline, in user space coordinates in Pango units.
    * Returns: self

--- draw_rectangle(part, x, y, width, height)
    Draws an axis-aligned rectangle in user space coordinates with the specified Pango::Renderer. ((* Since 1.8 *))
    * part: type of object this rectangle is part of (Pango::Renderer#Part)
    * x: x position at which to draw rectangle, in user space coordinates in Pango units
    * y: y position at which to draw rectangle, in user space coordinates in Pango units
    * width: width of rectangle in Pango units user space coordinates
    * height: height of rectangle in Pango units in user space coordinates
    * Returns: self

--- draw_error_underline(x, y, width, height)
    Draw a squiggly line that approximately covers the given rectangle in the style of an underline used to indicate a spelling error. (The width of the underline is rounded to an integer number of up/down segments and the resulting rectangle is centered in the original rectangle) ((* Since 1.8 *))
    * x: X coordinate of underline, in Pango units in user coordinate system
    * y: Y coordinate of underline, in Pango units in user coordinate system
    * width: width of underline, in Pango units in user coordinate system
    * height: height of underline, in Pango units in user coordinate system
    * Returns: self

--- draw_trapezoid(part, y1, x11, x21, y2, x12, x22)
    Draws a trapezoid with the parallel sides aligned with the X axis using the given Pango::Renderer; coordinates are in device space. ((* Since 1.8 *))
    * part: type of object this trapezoid is part of (Pango::Renderer#Part)
    * y1: Y coordinate of top of trapezoid
    * x11: X coordinate of left end of top of trapezoid
    * x21: X coordinate of right end of top of trapezoid
    * y2: X coordinate of top of trapezoid
    * x12: X coordinate of left end of top of trapezoid
    * x22: Y coordinate of left end of top of trapezoid
     * Returns: self

--- draw_glyph(font, glyph, x, y)
    Draws a single glyph with coordinates in device space. ((* Since 1.8 *))
    * font: a Pango::Font
    * glyph: the glyph index(Integer) of a single glyph
    * x: X coordinate of left edge of baseline of glyph
    * y: Y coordinate of left edge of baseline of glyph
    * Returns: self

--- activate
    Does initial setup before rendering operations on the Pango::Renderer. Pango::Renderer#deactive should be called when done drawing. Calls such as Pango::Renderer#draw_layout automatically activate the layout before drawing on it. Calls to Pango::Renderer#activate and Pango::Renderer#deactivate can be nested and the Pango::Renderer will only be initialized and deinitialized once. ((* Since 1.8 *))
    * Returns: self
--- deactivate
    Cleans up after rendering operations on the Pango::Renderer. See docs for Pango::Renderer#activate. ((* Since 1.8 *))
    * Returns: self

--- get_color(part)
    Gets the current rendering color for the specified part. ((* Since 1.8 *))
    * part: the part to get the color for (Pango::Renderer#Part)
    * Returns:  the Pango::Color for the specified part, or nil if it hasn't been set and should be inherited from the environment.
--- set_color(part, color)
    Sets the color for part of the rendering. ((* Since 1.8 *))
    * part: the part to change the color of (Pango::Renderer#Part)
    * color: the new Pango::Color or nil to unset the current color
    * Returns: self

--- part_changed(part)
    Informs Pango that the way that the renderering is done for part has changed in a way that would prevent multiple pieces being joined together into one drawing call. For instance, if a subclass of Pango::Renderer was to add a stipple option for drawing underlines, it needs to call Pango::Renderer#part_changed(Pango::Renderer::PART_UNDERLINE). When the stipple changes or underlines with different stipples might be joined together. Pango automatically calls this for changes to colors. (See Pango::Renderer#set_color) ((* Since 1.8 *))
    * part: the part for which rendering has changed (Pango::Renderer#Part)
    * Returns: self

--- matrix
    Gets the transformation matrix that will be applied when rendering. See Pango::Renderer#matrix=. ((* Since 1.8 *))
    * Returns: the Pango::Matrix, or nil if no matrix has been set (which is the same as the identity matrix).
--- matrix=(matrix)
    Sets the transformation matrix that will be applied when rendering. ((* Since 1.8 *))
    * matrix: a Pango::Matrix, or nil to unset any existing matrix (No matrix set is the same as setting the identity matrix).
    * Returns: matrix
--- set_matrix(matrix)
    Same as Pango::Renderer#matrix=. ((* Since 1.8 *))
    * matrix: a Pango::Matrix, or nil to unset any existing matrix (No matrix set is the same as setting the identity matrix).
    * Returns: self

== Constants
=== Part
Part defines different items to render for such purposes as setting colors.
You can omit "Renderer::" like as Pango::PART_FOREGROUND instead of Pango::Renderer::PART_FOREGROUND. ((* Since 1.8 *))
--- PART_FOREGROUND
    the text itself
--- PART_BACKGROUND
    the area behind the text
--- PART_UNDERLINE
    underlines
--- PART_STRIKETHROUGH
    strikethrough lines


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