[ruby-gnome2-doc-cvs] [Hiki] create - RSVG::Handle

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2005年 6月 11日 (土) 00:22:40 JST


-------------------------
REMOTE_ADDR = 219.53.36.42
REMOTE_HOST = 
REMOTE_USER = ruby-gnome2-hiki        URL = http://ruby-gnome2.sourceforge.jp/cgi-bin/hiki/hiki.cgi?RSVG%3A%3AHandle
-------------------------
TITLE       = RSVG::Handle
KEYWORD     = 
= class RSVG::Handle

== Object Hierarchy
* Object
  * RSVG::Handle

== Class Methods
--- RSVG::Handle.new(gz=nil)

     Returns a new rsvg handle. This handle can be used for
     dynamically loading an image. You need to feed it data
     using RSVG::Handle#write, then call RSVG::Handle#close
     when done. No more than one image can be loaded with
     one handle.

     * gz: Specify (({true})) if you want to handle GZipped
       SVG (svgz) instead of normal SVG (svg).
     * Returns: A new RSVG::Handle

== Instance Methods
--- close

     Closes (({self})), to indicate that loading the image
     is complete. This will return (({true})) if the loader
     closed successfully.

     * Returns: (({true})) if the loader closed
       successfully, raises RSVG::Error if there was an
       error, or (({nil})) if the loader already closed.

--- closed?
     
     * Returns: Whether closed or not

--- desc

     Returns the SVG's description in UTF-8 or (({nil})).
     
     * Returns: The SVG's description

--- pixbuf

     Returns the pixbuf loaded by handle. If insufficient
     data has been read to create the pixbuf, or an error
     occurred in loading, then (({nil})) will be
     returned. Note that the pixbuf may not be complete
     until RSVG::Handle#close has been called.
     
     * Returns: the pixbuf loaded by handle, or (({nil})).

--- set_dpi_x_y(dpi_x, dpi_y)

     Sets the DPI for the outgoing pixbuf. Common values are
     75, 90, and 300 DPI. Passing a number <= 0 to #dpi_x or
     #dpi_y will reset the DPI to whatever the default value
     happens to be.

     * dpi_x: Dots Per Inch (aka Pixels Per Inch) of x
     * dpi_y: Dots Per Inch (aka Pixels Per Inch) of y
     * Returns: (({nil}))

--- set_size_callback(&block)

     Sets the sizing function for the (({self})). This
     function is called right after the size of the image
     has been loaded. The size of the image is passed in to
     the (({block})), which may then modify these values to
     set the real size of the generated pixbuf. If the image
     has no associated size, then the size arguments are set
     to -1.

     * block: A block for callback is called width and
       height. And return the array of new width and height,
       or (({nil})) if don't change the size.
     * Returns: (({nil}))

--- title

     Returns the SVG's title in UTF-8 or (({nil})).
     
     * Returns: The SVG's title

--- write(buf)

     Loads the image. This will return (({true})) if the
     data was loaded successful, and raise RSVG::Error if an
     error occurred. In the latter case, the loader will be
     closed, and will not accept further writes.
     
     * buf: SVG data
     * Returns: (({true})) if the write was successful, or
       raises RSVG::Error if there was an error.

== See Also

== ChangeLog

* 2005-06-11 ((<kou>)): completed.

- ((<kou>))






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