~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to app/vectors/gimpvectors-compat.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* The GIMP -- an image manipulation program
 
1
/* GIMP - The GNU Image Manipulation Program
2
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
3
 *
4
4
 * gimpvectors-compat.c
42
42
};
43
43
 
44
44
 
 
45
static const GimpCoords default_coords = GIMP_COORDS_DEFAULT_VALUES;
 
46
 
45
47
 
46
48
GimpVectors *
47
 
gimp_vectors_compat_new (GimpImage              *gimage,
 
49
gimp_vectors_compat_new (GimpImage              *image,
48
50
                         const gchar            *name,
49
51
                         GimpVectorsCompatPoint *points,
50
52
                         gint                    n_points,
57
59
  GimpCoords  *curr_coord;
58
60
  gint         i;
59
61
 
60
 
  g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
 
62
  g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
61
63
  g_return_val_if_fail (name != NULL, NULL);
62
64
  g_return_val_if_fail (points != NULL || n_points == 0, NULL);
63
65
  g_return_val_if_fail (n_points >= 0, NULL);
64
66
 
65
 
  vectors = gimp_vectors_new (gimage, name);
 
67
  vectors = gimp_vectors_new (image, name);
66
68
 
67
69
  coords = g_new0 (GimpCoords, n_points + 1);
68
70
 
73
75
 
74
76
  for (i = 0; i < n_points; i++)
75
77
    {
76
 
      curr_coord->x        = points[i].x;
77
 
      curr_coord->y        = points[i].y;
78
 
      curr_coord->pressure = GIMP_COORDS_DEFAULT_PRESSURE;
79
 
      curr_coord->xtilt    = GIMP_COORDS_DEFAULT_TILT;
80
 
      curr_coord->ytilt    = GIMP_COORDS_DEFAULT_TILT;
81
 
      curr_coord->wheel    = GIMP_COORDS_DEFAULT_WHEEL;
 
78
      *curr_coord = default_coords;
 
79
 
 
80
      curr_coord->x = points[i].x;
 
81
      curr_coord->y = points[i].y;
82
82
 
83
83
      /*  copy the first anchor to be the first control point  */
84
84
      if (curr_coord == curr_stroke + 1)
126
126
}
127
127
 
128
128
gboolean
129
 
gimp_vectors_compat_is_compatible (GimpImage *gimage)
 
129
gimp_vectors_compat_is_compatible (GimpImage *image)
130
130
{
131
 
  GList *list, *strokes;
 
131
  GList       *list;
 
132
  GList       *strokes;
132
133
  GimpVectors *vectors;
133
 
  GimpStroke *stroke;
134
 
  gint open_count;
 
134
  GimpStroke  *stroke;
 
135
  gint         open_count;
135
136
 
136
 
  for (list = GIMP_LIST (gimage->vectors)->list;
 
137
  for (list = GIMP_LIST (image->vectors)->list;
137
138
       list;
138
139
       list = g_list_next (list))
139
140
    {
162
163
 
163
164
GimpVectorsCompatPoint *
164
165
gimp_vectors_compat_get_points (GimpVectors *vectors,
165
 
                                guint32     *n_points,
166
 
                                guint32     *closed)
 
166
                                gint32      *n_points,
 
167
                                gint32      *closed)
167
168
{
168
169
  GimpVectorsCompatPoint *points;
169
170
  GList                  *strokes;