~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/sp-polyline.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
static void sp_polyline_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
27
27
static void sp_polyline_set (SPObject *object, unsigned int key, const gchar *value);
28
 
static Inkscape::XML::Node *sp_polyline_write (SPObject *object, Inkscape::XML::Node *repr, guint flags);
 
28
static Inkscape::XML::Node *sp_polyline_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
29
29
 
30
30
static gchar * sp_polyline_description (SPItem * item);
31
31
 
105
105
                gboolean hascpt;
106
106
 
107
107
                if (!value) break;
108
 
                curve = sp_curve_new ();
 
108
                curve = new SPCurve ();
109
109
                hascpt = FALSE;
110
110
 
111
111
                cptr = value;
132
132
                        if (eptr == cptr) break;
133
133
                        cptr = eptr;
134
134
                        if (hascpt) {
135
 
                                sp_curve_lineto (curve, x, y);
 
135
                                curve->lineto(x, y);
136
136
                        } else {
137
 
                                sp_curve_moveto (curve, x, y);
 
137
                                curve->moveto(x, y);
138
138
                                hascpt = TRUE;
139
139
                        }
140
140
                }
141
141
                
142
142
                sp_shape_set_curve (SP_SHAPE (polyline), curve, TRUE);
143
 
                sp_curve_unref (curve);
 
143
                curve->unref();
144
144
                break;
145
145
        }
146
146
        default:
151
151
}
152
152
 
153
153
static Inkscape::XML::Node *
154
 
sp_polyline_write (SPObject *object, Inkscape::XML::Node *repr, guint flags)
 
154
sp_polyline_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
155
155
{
156
156
        SPPolyLine *polyline;
157
157
 
158
158
        polyline = SP_POLYLINE (object);
159
159
 
160
160
        if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
161
 
                Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
162
161
                repr = xml_doc->createElement("svg:polyline");
163
162
        }
164
163
 
167
166
        }
168
167
 
169
168
        if (((SPObjectClass *) (parent_class))->write)
170
 
                ((SPObjectClass *) (parent_class))->write (object, repr, flags);
 
169
                ((SPObjectClass *) (parent_class))->write (object, xml_doc, repr, flags);
171
170
 
172
171
        return repr;
173
172
}