Code

Initial support of color-profile on <image>
[inkscape.git] / src / sp-image.h
1 #ifndef __SP_IMAGE_H__
2 #define __SP_IMAGE_H__
4 /*
5  * SVG <image> implementation
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *   Edward Flick (EAF)
10  *
11  * Copyright (C) 1999-2005 Authors
12  * Copyright (C) 2000-2001 Ximian, Inc.
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #define SP_TYPE_IMAGE (sp_image_get_type ())
18 #define SP_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_IMAGE, SPImage))
19 #define SP_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_IMAGE, SPImageClass))
20 #define SP_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_IMAGE))
21 #define SP_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_IMAGE))
23 class SPImage;
24 class SPImageClass;
26 /* SPImage */
28 #include <gdk-pixbuf/gdk-pixbuf.h>
29 #include "svg/svg-length.h"
30 #include "sp-item.h"
32 #define SP_IMAGE_HREF_MODIFIED_FLAG SP_OBJECT_USER_MODIFIED_FLAG_A
34 struct SPImage : public SPItem {
35         SVGLength x;
36         SVGLength y;
37         SVGLength width;
38         SVGLength height;
40         // Added by EAF
41         /* preserveAspectRatio */
42         unsigned int aspect_align : 4;
43         unsigned int aspect_clip : 1;
44         int trimx, trimy, trimwidth, trimheight;
45         double viewx, viewy, viewwidth, viewheight;
47         gchar *href;
48 #if ENABLE_LCMS
49         gchar *color_profile;
50 #endif // ENABLE_LCMS
52         GdkPixbuf *pixbuf;
53 };
55 struct SPImageClass {
56         SPItemClass parent_class;
57 };
59 GType sp_image_get_type (void);
63 #endif