[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] create - Gtk::PrintContext

アーカイブの一覧に戻る

ruby-****@sourc***** ruby-****@sourc*****
2006年 7月 9日 (日) 21:41:35 JST


-------------------------
REMOTE_ADDR = 138.243.201.11
REMOTE_HOST = 
REMOTE_USER = ruby-gnome2-hiki
        URL = /hiki.cgi?Gtk%3A%3APrintContext
-------------------------
TITLE       = Gtk::PrintContext
KEYWORD     = 
= class Gtk::PrintContext

A Gtk::PrintContext encapsulates context information that is
required when drawing pages for printing, such as the cairo
context and important parameters like page size and
resolution. It also lets you easily create Pango::Layout and
Pango::Context objects that match the font metrics of the
cairo surface.

Gtk::PrintContext objects gets passed to the ::begin-print,
::end-print, ::request-page-setup and ::draw-page signals on
the Gtk::PrintOperation.

== Object Hierarchy
* Object
  * GLib::Instantiatable
    * GLib::Object
      * Gtk::PrintContext

== Instance Methods

--- cairo_context
     Obtains the cairo context that is associated with the Gtk::PrintContext.
     * Returns: the cairo context of self

--- create_pango_context
     Creates a new Pango::Context that can be used with the Gtk::PrintContext.
     * Returns: a new Pango context for self

--- create_pango_layout
     Creates a new Pango::Layout that is suitable for use
     with the Gtk::PrintContext.

     * Returns: a new Pango layout for self

--- dpi_x
     Obtains the horizontal resolution of the
     Gtk::PrintContext, in dots per inch.

     * Returns: the horizontal resolution of self

--- dpi_y
     Obtains the vertical resolution of the
     Gtk::PrintContext, in dots per inch.

     * Returns: the vertical resolution of self

--- height
     Obtains the height of the Gtk::PrintContext, in pixels.

     * Returns: the height of self

--- width
     Obtains the width of the Gtk::PrintContext, in pixels.

     * Returns: the width of self

--- page_setup
     Obtains the Gtk::PageSetup that determines the page
     dimensions of the Gtk::PrintContext.

     * Returns: the page setup of self

--- pango_fontmap
     Returns a Pango::FontMap that is suitable for use with
     the Gtk::PrintContext.

     * Returns: the font map of self

--- set_cairo_context(cr, dpi_x, dpi_y)
     Sets a new cairo context on a print context.

     This function is intended to be used when implementing
     an internal print preview, it is not needed for printing,
     since GTK+ itself creates a suitable cairo context in that
     case.

     * cr: the cairo context
     * dpi_x: the horizontal resolution to use with ((|cr|))
     * dpi_y: the vertical resolution to use with ((|cr|))

== See Also

* Gtk::PrintOperation
* Cairo::Context

== ChangeLog

* 2006-07-09: updated for 2.10. - ((<kou>))

- ((<kou>))






ruby-gnome2-cvs メーリングリストの案内
アーカイブの一覧に戻る