GOffice.Image¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Image height in pixels |
||
r/w |
Image width in pixels |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
data |
r |
||
data_length |
r |
||
height |
r |
||
name |
r |
||
parent |
r |
||
pixbuf |
r |
||
thumbnail |
r |
||
width |
r |
Class Details¶
- class GOffice.Image(**kwargs)¶
- Bases:
- Abstract:
Yes
- Structure:
- classmethod format_to_mime(format)¶
- classmethod get_format_from_name(name)¶
- Parameters:
name (
str
) – a string- Returns:
corresponding
GOffice.ImageFormat
.- Return type:
- classmethod get_format_info(format)¶
- Parameters:
format (
GOffice.ImageFormat
) – aGOffice.ImageFormat
- Returns:
a
GOffice.ImageFormatInfo
struct.- Return type:
Retrieves information associated to format.
- classmethod get_formats_with_pixbuf_saver()¶
- Returns:
a list of
GOffice.ImageFormat
that can be created from a pixbuf.- Return type:
- classmethod new_from_data(type, data, length, format)¶
- Parameters:
- Raises:
- Return type:
- classmethod sel_new(doc, cc, image)¶
- Parameters:
doc (
GOffice.Doc
) – TheGOffice.Doc
owning the image collectioncc (
GOffice.CmdContext
) – AGOffice.CmdContext
for error reportingimage (
GOffice.Image
) – AGOffice.Image
- Returns:
and shows new image selector.
- Return type:
- differ(second)¶
- Parameters:
second (
GOffice.Image
) –- Return type:
- draw(cr)¶
- Parameters:
cr (
cairo.Context
) –
- get_info()¶
- Return type:
- get_pixbuf()¶
- Returns:
the pixbuf for self
- Return type:
Builds a pixbuf from the image if not already done and returns it, adding a reference.
- get_scaled_pixbuf(width, height)¶
- Parameters:
- Returns:
the scaled pixbuf for self
- Return type:
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.
- get_thumbnail()¶
- Returns:
the thumbnail for self
- Return type:
Generates a thumbnail for self 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.
- load_attrs(xin, attrs)¶
- Parameters:
xin (
Gsf.XMLIn
) –attrs (
libxml2.Char
) –
- save(output)¶
- Parameters:
output (
Gsf.XMLOut
) –
- do_differ(second) virtual¶
- Parameters:
second (
GOffice.Image
) –- Return type:
- do_draw(cr) virtual¶
- Parameters:
cr (
cairo.Context
) –
- do_get_pixbuf() virtual¶
- Returns:
the pixbuf for image
- Return type:
Builds a pixbuf from the image if not already done and returns it, adding a reference.
- do_get_scaled_pixbuf(width, height) virtual¶
- Parameters:
- Returns:
the scaled pixbuf for image
- Return type:
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.
- do_load_attr(attr_name, attr_value) virtual¶
- Parameters:
attr_name (
libxml2.Char
) –attr_value (
libxml2.Char
) –
- do_save(output) virtual¶
- Parameters:
output (
Gsf.XMLOut
) –
Property Details¶
- GOffice.Image.props.height¶
-
Image height in pixels