~centralelyon2010/inkscape/imagelinks2

1 by mental
moving trunk for module inkscape
1
#ifndef __SP_IMAGE_H__
2
#define __SP_IMAGE_H__
3
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
 */
16
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))
22
23
class SPImage;
24
class SPImageClass;
25
26
/* SPImage */
27
28
#include <gdk-pixbuf/gdk-pixbuf.h>
9012.1.132 by Krzysztof Kosiński
Always embed bitmap copies created with Alt+B.
29
#include <glibmm/ustring.h>
1 by mental
moving trunk for module inkscape
30
#include "svg/svg-length.h"
31
#include "sp-item.h"
32
33
#define SP_IMAGE_HREF_MODIFIED_FLAG SP_OBJECT_USER_MODIFIED_FLAG_A
34
35
struct SPImage : public SPItem {
5685 by joncruz
Added external image edit launch and refresh on changed
36
    SVGLength x;
37
    SVGLength y;
38
    SVGLength width;
39
    SVGLength height;
40
9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
41
    Geom::Rect clipbox;
42
    double sx, sy;
43
    double ox, oy;
44
5685 by joncruz
Added external image edit launch and refresh on changed
45
    // Added by EAF
46
    /* preserveAspectRatio */
47
    unsigned int aspect_align : 4;
48
    unsigned int aspect_clip : 1;
9020 by JazzyNico
Code refactoring and merging with trunk (revision 10599).
49
    //int trimx, trimy, trimwidth, trimheight;
50
    //double viewx, viewy, viewwidth, viewheight;
5685 by joncruz
Added external image edit launch and refresh on changed
51
52
    SPCurve *curve; // This curve is at the image's boundary for snapping
53
54
    gchar *href;
402 by joncruz
Initial support of color-profile on <image>
55
#if ENABLE_LCMS
5685 by joncruz
Added external image edit launch and refresh on changed
56
    gchar *color_profile;
402 by joncruz
Initial support of color-profile on <image>
57
#endif // ENABLE_LCMS
1 by mental
moving trunk for module inkscape
58
5685 by joncruz
Added external image edit launch and refresh on changed
59
    GdkPixbuf *pixbuf;
60
    gchar *pixPath;
61
    time_t lastMod;
1 by mental
moving trunk for module inkscape
62
};
63
64
struct SPImageClass {
5685 by joncruz
Added external image edit launch and refresh on changed
65
    SPItemClass parent_class;
1 by mental
moving trunk for module inkscape
66
};
67
68
GType sp_image_get_type (void);
69
3110 by dvlierop2
implementing snapping to images
70
/* Return duplicate of curve or NULL */
71
SPCurve *sp_image_get_curve (SPImage *image);
9012.1.132 by Krzysztof Kosiński
Always embed bitmap copies created with Alt+B.
72
void sp_embed_image(Inkscape::XML::Node *imgnode, GdkPixbuf *pb, Glib::ustring const &mime);
5685 by joncruz
Added external image edit launch and refresh on changed
73
void sp_image_refresh_if_outdated( SPImage* image );
1 by mental
moving trunk for module inkscape
74
75
#endif