[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] create - Cairo::Context

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2005年 10月 5日 (水) 20:00:36 JST


-------------------------
REMOTE_ADDR = 219.53.2.8
REMOTE_HOST = 
REMOTE_USER = ruby-gnome2-hiki
        URL = /hiki.cgi?Cairo%3A%3AContext
-------------------------
TITLE       = Cairo::Context
KEYWORD     = 
= class Cairo::Context

There are only GDK and Pango related APIs.

== Object Hierarchy
* Object
  * Cairo::Context

== Instance Methods

=== GDK related APIs

--- rectangle(rectangle)
    Adds the given rectangle to the current path of self.
     
     * rectangle: Gdk::Rectangle
     * Returns: self

--- region(region)
    Adds the given region to the current path of self.
    
     * region: Gdk::Region
     * Returns: self

--- set_source_color(color)
    Sets the specified Gdk::Color as the source color of self.
    
     * color: Gdk::Color
     * Returns: self

--- set_source_pixbuf(pixbuf, pixbuf_x, pixbuf_y)
    Sets the given pixbuf as the source pattern for the
    Cairo context. The pattern has an extend mode of
    Cairo::EXTEND_NONE and is aligned so that the origin of
    ((|pixbuf|)) is ((|pixbuf_x|)), ((|pixbuf_y|))
     
     * pixbuf: Gdk::Pixbuf
     * pixbuf_x: X coordinate of location to place upper
       left corner of ((|pixbuf|))
     * pixbuf_y: Y coordinate of location to place upper
       left corner of ((|pixbuf|))
     * Returns: self

=== Pango related APIs

--- create_layout                                                                                                           

     Creates a layout object set up to match the
     current transformation and target surface of the Cairo
     context. This layout can then be used for text
     measurement with functions like Pango::Layout#size
     or drawing with functions like
     Cairo::Context#show_layout. If you change the
     transformation or target surface for self, you need to
     call Cairo::Context#update_layout.

     This function is the most convenient way to use Cairo with
     Pango, however it is slightly inefficient since it
     creates a separate Pango::Context object for each
     layout. This might matter in an application that was
     laying out large amounts of text.

     * Returns: the newly created Pango::Layout

--- glyph_string_path(font, glyphs)

     Adds the glyphs in ((|glyphs|)) to the current path in self.
     The origin of the glyphs (the left
     edge of the baseline) will be at the current point of self.

     * font: a Pango::Font
     * glyphs: a Pango::GlyphString
     * Returns: self

--- layout_path(layout)

     Adds the text in a Pango::LayoutLine to the current
     path in self. The top-left corner of the Pango::Layout
     will be at the current point of self.

     * layout: a Pango::Layout
     * Returns: self

--- layout_line_path(line)

     Adds the text in Pango::LayoutLine to the current path
     in self. The origin of the glyphs (the left edge of the
     line) will be at the current point of self.

     * line: a Pango::LayoutLine
     * Returns: self

--- show_glyph_string(font, glyphs)

     Draws the glyphs in ((|glyphs|)) in self.
     The origin of the glyphs (the left edge of the
     baseline) will be drawn at the current point of self.

     * font: Pango::Font
     * glyphs: Pango::GlyphString
     * Returns: self

--- show_layout(layout)

     Draws a Pango::LayoutLine in self. The
     top-left corner of the Pango::Layout will be drawn at
     the current point of self.

     * layout: a Pango layout
     * Returns: self

--- show_layout_line(line)

     Draws a Pango::LayoutLine in self. The
     origin of the glyphs (the left edge of the line) will be
     drawn at the current point of self.

     * line: a Pango::LayoutLine
     * Returns: self

--- update_context(context);

     Updates a Pango::Context previously created for use
     with Cairo to match the current transformation and
     target surface of a Cairo context. If any layouts have
     been created for the context, it's necessary to call
     Pango::Layout#context_changed on those layouts.

     * context: a Pango::Context, from
       Pango::CairoFontMap#create_context
     * Returns: self

--- update_layout(layout)

     Updates the private Pango::Context of a Pango::Layout
     created with Cairo::Context#create_layout to match the
     current transformation and target surface of a Cairo
     context.

     * layout: a Pango::Layout, from
       Cairo::Context#create_layout
     * Returns: self                                                                                                        

== See Also

* Gdk::Drawable#create_cairo_context
* Pango::Context
* Pango::CairoFontMap

== ChangeLog

* 2005-10-05 Added Pango related APIs. - ((<kou>))
* 2005-10-03 Added GDK related APIs. - ((<kou>))






ruby-gnome2-cvs メーリングリストの案内
Back to archive index