Class: GOffice::Image

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Direct Known Subclasses

Emf, Pixbuf, Spectre, Svg

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(doc, cc, image) ⇒ Gtk::Widget

Returns and shows new image selector.

Parameters:

Class Method Details

.format_to_mime(format) ⇒ String

Returns corresponding mime type.

Parameters:

  • format (String)

    a file extension string

Returns:

  • (String)

    corresponding mime type.

.formats_with_pixbuf_saverGLib::SList<GOffice::ImageFormat>

from a pixbuf.

Returns:

.get_default_dpi(dpi_x, dpi_y) ⇒ nil

Parameters:

  • dpi_x (Float)
  • dpi_y (Float)

Returns:

  • (nil)

.get_format_from_name(name) ⇒ GOffice::ImageFormat

Returns corresponding GOImage::Format.

Parameters:

  • name (String)

    a string

Returns:

.get_format_info(format) ⇒ GOffice::ImageFormatInfo

Retrieves information associated to format.

Parameters:

Returns:

  • (GOffice::ImageFormatInfo)

    a GOImage::FormatInfo struct.

.set_default_dpi(dpi_x, dpi_y) ⇒ nil

Parameters:

  • dpi_x (Float)
  • dpi_y (Float)

Returns:

  • (nil)

.type_for_format(format) ⇒ GLib::Type

Parameters:

  • format (String)

Returns:

  • (GLib::Type)

Instance Method Details

#differ(second) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)

#draw(cr) ⇒ nil

Parameters:

  • cr (cairo::Context)

Returns:

  • (nil)

#get_data(length) ⇒ Integer

Parameters:

  • length (Integer)

Returns:

  • (Integer)

#get_scaled_pixbuf(width, height) ⇒ GdkPixbuf::Pixbuf

Builds a scaled pixbuf from the image and returns it. The caller needs to unref it. The pixbuf is scaled so that its width and height are not larger than, respectively, width and height, and preserving the aspect ratio.

Parameters:

  • width (Integer)

    the new pixbuf width

  • height (Integer)

    the new pixbuf height

Returns:

  • (GdkPixbuf::Pixbuf)

    the scaled pixbuf for image

#heightInteger

Returns height.

Returns:

  • (Integer)

    height

#height=(height) ⇒ Integer

Parameters:

  • height (Integer)

Returns:

  • (Integer)

    height

  • (Integer)

    height

#infoGOffice::ImageFormatInfo

Returns:

  • (GOffice::ImageFormatInfo)

#load_attrs(xin, attrs) ⇒ nil

Parameters:

  • xin (Gsf::XMLIn)
  • attrs (libxml2::Char)

Returns:

  • (nil)

#load_data(xin) ⇒ nil

Parameters:

  • xin (Gsf::XMLIn)

Returns:

  • (nil)

#nameString

Returns:

  • (String)

#name=(name) ⇒ nil

Parameters:

  • name (String)

Returns:

  • (nil)

#pixbufGdkPixbuf::Pixbuf

Builds a pixbuf from the image if not already done and returns it, adding a reference.

Returns:

  • (GdkPixbuf::Pixbuf)

    the pixbuf for image

#save(output) ⇒ nil

Parameters:

  • output (Gsf::XMLOut)

Returns:

  • (nil)

#thumbnailGdkPixbuf::Pixbuf

Generates a thumbnail for image if not already done and returns it, adding a reference. The pixbuf is scaled so that its width and height are not larger than 64 pixels, and preserving the aspect ratio.

Returns:

  • (GdkPixbuf::Pixbuf)

    the thumbnail for image

#widthInteger

Returns width.

Returns:

  • (Integer)

    width

#width=(width) ⇒ Integer

Parameters:

  • width (Integer)

Returns:

  • (Integer)

    width

  • (Integer)

    width