#include <goffice/goffice-config.h>
#include <goffice/utils/go-color.h>
#include <goffice/utils/go-image.h>
#include <glib/gi18n-lib.h>
#include <string.h>
#include <gsf/gsf-impl-utils.h>
Classes | |
struct | _GOImage |
Defines | |
#define | PIXBUF_IMAGE_FORMAT_OFFSET (1+GO_IMAGE_FORMAT_UNKNOWN) |
Functions | |
char * | go_mime_to_image_format (char const *mime_type) |
go_mime_to_image_format: : a mime type string | |
char * | go_image_format_to_mime (char const *format) |
go_image_format_to_mime: : a file extension string | |
static void | go_image_build_pixbuf_format_infos (void) |
GOImageFormatInfo const * | go_image_get_format_info (GOImageFormat format) |
go_image_get_format_info: : a GOImageFormat | |
Variables | |
static GOImageFormatInfo const | image_format_infos [GO_IMAGE_FORMAT_UNKNOWN] |
static GOImageFormatInfo * | pixbuf_image_format_infos = NULL |
static unsigned | pixbuf_format_nbr = 0 |
static gboolean | pixbuf_format_done = FALSE |
: a string | |
go_image_get_format_from_name: returns: corresponding GOImageFormat. | |
enum | { IMAGE_PROP_0, IMAGE_PROP_WIDTH, IMAGE_PROP_HEIGHT } |
typedef GObjectClass | GOImageClass |
static GObjectClass * | parent_klass |
GOImageFormat | go_image_get_format_from_name (char const *name) |
GSList * | go_image_get_formats_with_pixbuf_saver (void) |
go_image_get_formats_with_pixbuf_saver: | |
static void | go_image_set_property (GObject *obj, guint param_id, GValue const *value, GParamSpec *pspec) |
static void | go_image_get_property (GObject *obj, guint param_id, GValue *value, GParamSpec *pspec) |
static void | go_image_finalize (GObject *obj) |
static void | go_image_class_init (GOImageClass *klass) |
GSF_CLASS (GOImage, go_image, go_image_class_init, NULL, G_TYPE_OBJECT) | |
guint8 * | go_image_get_pixels (GOImage *image) |
int | go_image_get_rowstride (GOImage *image) |
void | go_image_fill (GOImage *image, GOColor color) |
#define PIXBUF_IMAGE_FORMAT_OFFSET (1+GO_IMAGE_FORMAT_UNKNOWN) |
Referenced by go_image_get_formats_with_pixbuf_saver().
typedef GObjectClass GOImageClass |
static void go_image_build_pixbuf_format_infos | ( | void | ) | [static] |
References GOImageFormatInfo::alpha_support, GOImageFormatInfo::desc, GOImageFormatInfo::ext, GOImageFormatInfo::format, gchar, GO_IMAGE_FORMAT_UNKNOWN, GOImageFormatInfo::has_pixbuf_saver, GOImageFormatInfo::is_dpi_useful, and GOImageFormatInfo::name.
Referenced by go_image_get_format_from_name(), go_image_get_format_info(), and go_image_get_formats_with_pixbuf_saver().
static void go_image_class_init | ( | GOImageClass * | klass | ) | [static] |
References _, IMAGE_PROP_HEIGHT, and IMAGE_PROP_WIDTH.
static void go_image_finalize | ( | GObject * | obj | ) | [static] |
References _GOImage::data, GO_IMAGE, and _GOImage::pixbuf.
char* go_image_format_to_mime | ( | char const * | format | ) |
go_image_format_to_mime: : a file extension string
returns: corresponding mime type.
References gchar.
GOImageFormat go_image_get_format_from_name | ( | char const * | name | ) |
References GOImageFormatInfo::format, go_image_build_pixbuf_format_infos(), and pixbuf_format_nbr.
GOImageFormatInfo const* go_image_get_format_info | ( | GOImageFormat | format | ) |
go_image_get_format_info: : a GOImageFormat
Retrieves infromation associated to .
returns: a GOImageFormatInfo struct.
References go_image_build_pixbuf_format_infos(), GO_IMAGE_FORMAT_UNKNOWN, and pixbuf_format_nbr.
GSList* go_image_get_formats_with_pixbuf_saver | ( | void | ) |
go_image_get_formats_with_pixbuf_saver:
returns: a list of GOImageFormat that can be created from a pixbuf.
References go_image_build_pixbuf_format_infos(), pixbuf_format_nbr, and PIXBUF_IMAGE_FORMAT_OFFSET.
guint8* go_image_get_pixels | ( | GOImage * | image | ) |
References _GOImage::data.
static void go_image_get_property | ( | GObject * | obj, | |
guint | param_id, | |||
GValue * | value, | |||
GParamSpec * | pspec | |||
) | [static] |
References GO_IMAGE, _GOImage::height, IMAGE_PROP_HEIGHT, IMAGE_PROP_WIDTH, _GOImage::pixbuf, _GOImage::target_cairo, and _GOImage::width.
int go_image_get_rowstride | ( | GOImage * | image | ) |
References _GOImage::rowstride.
static void go_image_set_property | ( | GObject * | obj, | |
guint | param_id, | |||
GValue const * | value, | |||
GParamSpec * | pspec | |||
) | [static] |
char* go_mime_to_image_format | ( | char const * | mime_type | ) |
go_mime_to_image_format: : a mime type string
returns: file extension for the given mime type.
References go_image_build_pixbuf_format_infos(), and pixbuf_mimes.
GSF_CLASS | ( | GOImage | , | |
go_image | , | |||
go_image_class_init | , | |||
NULL | , | |||
G_TYPE_OBJECT | ||||
) |
GOImageFormatInfo const image_format_infos[GO_IMAGE_FORMAT_UNKNOWN] [static] |
{ {GO_IMAGE_FORMAT_SVG, (char *) "svg", (char *) N_("SVG (vector graphics)"), (char *) "svg", FALSE, FALSE, TRUE}, {GO_IMAGE_FORMAT_PNG, (char *) "png", (char *) N_("PNG (raster graphics)"), (char *) "png", TRUE, TRUE, TRUE}, {GO_IMAGE_FORMAT_JPG, (char *) "jpeg", (char *) N_("JPEG (photograph)"), (char *) "jpg", TRUE, TRUE, FALSE}, {GO_IMAGE_FORMAT_PDF, (char *) "pdf", (char *) N_("PDF (portable document format)"), (char *) "pdf", FALSE, FALSE, TRUE}, {GO_IMAGE_FORMAT_PS, (char *) "ps", (char *) N_("PS (postscript)"), (char *) "ps", FALSE, TRUE, TRUE}, {GO_IMAGE_FORMAT_EMF, (char *) "emf", (char *) N_("EMF (extended metafile)"), (char *) "emf", FALSE, FALSE, TRUE}, {GO_IMAGE_FORMAT_WMF, (char *) "wmf", (char *) N_("WMF (windows metafile)"), (char *) "wmf", FALSE, FALSE, TRUE} }
GObjectClass* parent_klass [static] |
gboolean pixbuf_format_done = FALSE [static] |
unsigned pixbuf_format_nbr = 0 [static] |
GOImageFormatInfo* pixbuf_image_format_infos = NULL [static] |