~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/sp-image.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
29
#include "svg/svg-length.h"
 
30
#include "sp-item.h"
 
31
#include "display/display-forward.h"
 
32
 
 
33
#define SP_IMAGE_HREF_MODIFIED_FLAG SP_OBJECT_USER_MODIFIED_FLAG_A
 
34
 
 
35
struct SPImage : public SPItem {
 
36
    SVGLength x;
 
37
    SVGLength y;
 
38
    SVGLength width;
 
39
    SVGLength height;
 
40
 
 
41
    // Added by EAF
 
42
    /* preserveAspectRatio */
 
43
    unsigned int aspect_align : 4;
 
44
    unsigned int aspect_clip : 1;
 
45
    int trimx, trimy, trimwidth, trimheight;
 
46
    double viewx, viewy, viewwidth, viewheight;
 
47
 
 
48
    SPCurve *curve; // This curve is at the image's boundary for snapping
 
49
 
 
50
    gchar *href;
 
51
#if ENABLE_LCMS
 
52
    gchar *color_profile;
 
53
#endif // ENABLE_LCMS
 
54
 
 
55
    GdkPixbuf *pixbuf;
 
56
    gchar *pixPath;
 
57
    time_t lastMod;
 
58
};
 
59
 
 
60
struct SPImageClass {
 
61
    SPItemClass parent_class;
 
62
};
 
63
 
 
64
GType sp_image_get_type (void);
 
65
 
 
66
/* Return duplicate of curve or NULL */
 
67
SPCurve *sp_image_get_curve (SPImage *image);
 
68
 
 
69
void sp_image_refresh_if_outdated( SPImage* image );
 
70
 
 
71
#endif