summaryrefslogtreecommitdiffstats
path: root/src/sp-image.h
blob: e0546d63d5057365374d855e0a43794204143e53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef __SP_IMAGE_H__
#define __SP_IMAGE_H__

/*
 * SVG <image> implementation
 *
 * Authors:
 *   Lauris Kaplinski <lauris@kaplinski.com>
 *   Edward Flick (EAF)
 *
 * Copyright (C) 1999-2005 Authors
 * Copyright (C) 2000-2001 Ximian, Inc.
 *
 * Released under GNU GPL, read the file 'COPYING' for more information
 */

#define SP_TYPE_IMAGE (sp_image_get_type ())
#define SP_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_IMAGE, SPImage))
#define SP_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_IMAGE, SPImageClass))
#define SP_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_IMAGE))
#define SP_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_IMAGE))

class SPImage;
class SPImageClass;

/* SPImage */

#include <gdk-pixbuf/gdk-pixbuf.h>
#include "svg/svg-length.h"
#include "sp-item.h"

#define SP_IMAGE_HREF_MODIFIED_FLAG SP_OBJECT_USER_MODIFIED_FLAG_A

struct SPImage : public SPItem {
	SVGLength x;
	SVGLength y;
	SVGLength width;
	SVGLength height;

	// Added by EAF
	/* preserveAspectRatio */
	unsigned int aspect_align : 4;
	unsigned int aspect_clip : 1;
	int trimx, trimy, trimwidth, trimheight;
	double viewx, viewy, viewwidth, viewheight;

	gchar *href;
#if ENABLE_LCMS
        gchar *color_profile;
#endif // ENABLE_LCMS

	GdkPixbuf *pixbuf;
};

struct SPImageClass {
	SPItemClass parent_class;
};

GType sp_image_get_type (void);



#endif