ruby-****@sourc*****
ruby-****@sourc*****
2005年 11月 15日 (火) 17:55:10 JST
------------------------- REMOTE_ADDR = 15.211.169.100 REMOTE_HOST = REMOTE_USER = ruby-gnome2-hiki URL = /hiki.cgi?Pango%3A%3ALayout ------------------------- @@ -234,18 +234,34 @@ * new_index: the new cursor byte index. A value of -1 indicates that the cursor has been moved off the beginning of the layout. A value of GLib::MAXINT indicates that the cursor has been moved off the end of the layout. * new_trailing: number of characters to move forward from the location returned for new_index to get the position where the cursor should be displayed. This allows distinguishing the position at the beginning of one line from the position at the end of the preceding line. new_index is always on the line where the cursor should be displayed. ---- extents +--- get_extents(ink_rect = nil, logical_rect = nil) Computes the logical and ink extents of layout. Logical extents are usually what you want for positioning things. The extents are given in layout coordinates; layout coordinates begin at the top left corner of the layout. + * ink_rect: a Pango::Rectangle used as initial value then stored the extents of the layout as drawn, or nil + * logical_rect: Pango::Rectangle used as initial value then stored the logical extents of the layout, or nil * Returns: [ink_rect, logical_rect] - * ink_rect: the extents of the layout as drawn or nil to indicate that the result is not needed. (Pango::Rectangle) - * logical_rect: the logical extents of the layout or nil to indicate that the result is not needed. (Pango::Rectangle) + * ink_rect: the extents of the layout as drawn. (Pango::Rectangle) + * logical_rect: the logical extents of the layout. (Pango::Rectangle) ---- pixel_extents +--- extents + Same as Pango::Layout#get_extents(nil, nil) + * Returns: [ink_rect, logical_rect] + * ink_rect: the extents of the layout as drawn. (Pango::Rectangle) + * logical_rect: the logical extents of the layout. (Pango::Rectangle) + +--- get_pixel_extents(ink_rect = nil, logical_rect = nil) Computes the logical and ink extents of layout in device units. See Pango::Layout#extents; this method just calls Pango::Layout#extents and then converts the extents to device units using the Pango::SCALE factor. + * ink_rect: a Pango::Rectangle used as initial value then stored the extents of the layout as drawn, or nil + * logical_rect: Pango::Rectangle used as initial value then stored the logical extents of the layout, or nil * Returns: [ink_rect, logical_rect] - * ink_rect: the extents of the layout as drawn or nil to indicate that the result is not needed. (Pango::Rectangle) - * logical_rect: the logical extents of the layout or nil to indicate that the result is not needed. (Pango::Rectangle) + * ink_rect: the extents of the layout as drawn. (Pango::Rectangle) + * logical_rect: the logical extents of the layout. (Pango::Rectangle) +--- pixel_extents + Same as Pango::Layout#get_pixel_extents(nil, nil) + * Returns: [ink_rect, logical_rect] + * ink_rect: the extents of the layout as drawn. (Pango::Rectangle) + * logical_rect: the logical extents of the layout. (Pango::Rectangle) + --- size Determines the logical width and height of a Pango::Layout in Pango units. (device units divided by Pango::SCALE). This is simply a convenience method around Pango::Layout#extents. * Returns: [width, height] @@ -267,34 +283,41 @@ * line: the index of a line, which must be between 0 and Pango::Layout#line_count - 1, inclusive. * Returns: the requested Pango::LayoutLine, or nil if the index is out of range. This layout line can be ref'ed and retained, but will become invalid if changes are made to the Pango::Layout. ---- copy - - * Returns: self +--- lines + Returns the lines of the layout as a list. + * Returns: an Array containing the lines(Pango::LayoutLine) in the layout. This points to internal data of the Pango::Layout and must be used with care. It will become invalid on any change to the layout's text or properties. - ---- get_clip_region - - * Returns: self - - ---- get_extents - - * Returns: self - ---- get_pixel_extents - - * Returns: self --- iter - - * Returns: self + Returns an iterator to iterate over the visual extents of the layout. + * Returns: a new Pango::LayoutIter +--- copy + Creates a copy of the Pango::Layout. + * Returns: a copyed Pango::Layout ---- lines - - * Returns: self +--- get_clip_region(x_origin, y_origin, index_ranges) + ((* Ruby/GTK *)) Obtains a clip region which contains the areas where the given ranges of text would be drawn. x_origin and y_origin are the same position you would pass to Gdk::Drawable#draw_layout_line. index_ranges should contain ranges of bytes in the layout's text. + * x_origin: X pixel where you intend to draw the layout with this clip + * y_origin: Y pixel where you intend to draw the layout with this clip + * index_ranges: an Array of byte(Integer) indexes into the layout, where even members of array are start indexes and odd elements are end indexes + * Returns: a clip region(Gdk::Region) containing the given ranges - - == Constants === WrapMode A WrapMode describes how to wrap the lines of a Pango::Layout to the desired width. @@ -324,9 +331,15 @@ Center the line within the available space --- ALIGN_RIGHT Put all available space on the left - -== See Also == ChangeLog +* 2005-11-15 Done for 1.10. - ((<Masao>)) * 2005-11-11 Modified. - ((<Masao>)) * 2005-11-10 Added. - ((<Masao>))