sp-line.cpp revision e898e8dd3fbc3e21f3a35f089a0d1c1dc6d48850
273e421813f295d65aab512f508e8fb575d997d4gouldtj * SVG <line> implementation
273e421813f295d65aab512f508e8fb575d997d4gouldtj * Lauris Kaplinski <lauris@kaplinski.com>
273e421813f295d65aab512f508e8fb575d997d4gouldtj * Abhishek Sharma
273e421813f295d65aab512f508e8fb575d997d4gouldtj * Jon A. Cruz <jon@joncruz.org>
273e421813f295d65aab512f508e8fb575d997d4gouldtj * Copyright (C) 1999-2002 Lauris Kaplinski
273e421813f295d65aab512f508e8fb575d997d4gouldtj * Released under GNU GPL, read the file 'COPYING' for more information
273e421813f295d65aab512f508e8fb575d997d4gouldtj line_type = g_type_register_static(SP_TYPE_SHAPE, "SPLine", &line_info,(GTypeFlags)0);
273e421813f295d65aab512f508e8fb575d997d4gouldtjvoid SPLineClass::sp_line_class_init(SPLineClass *klass)
273e421813f295d65aab512f508e8fb575d997d4gouldtj SPLineClass::static_parent_class = (SPShapeClass *) g_type_class_ref(SP_TYPE_SHAPE);
273e421813f295d65aab512f508e8fb575d997d4gouldtj SPObjectClass *sp_object_class = (SPObjectClass *) klass;
switch (key) {
case SP_ATTR_X1:
case SP_ATTR_Y1:
case SP_ATTR_X2:
case SP_ATTR_Y2:
if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) {
Inkscape::XML::Node * SPLine::write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
return repr;
shape->setCurveInsync(c, TRUE); // *_insync does not call update, avoiding infinite recursion when set_shape is called by update
c->unref();