sp-line.cpp revision 4bd9cc13b0264b6577fd94bbbd737c4608b3466d
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * SVG <line> implementation
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Authors:
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Lauris Kaplinski <lauris@kaplinski.com>
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Abhishek Sharma
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Jon A. Cruz <jon@joncruz.org>
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Copyright (C) 1999-2002 Lauris Kaplinski
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Released under GNU GPL, read the file 'COPYING' for more information
9512fe850e98fdd448c638ca63fdd92a8a510255ahl line_type = g_type_register_static(SP_TYPE_SHAPE, "SPLine", &line_info,(GTypeFlags)0);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl SPLineClass::static_parent_class = (SPShapeClass *) g_type_class_ref(SP_TYPE_SHAPE);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl SPObjectClass *sp_object_class = (SPObjectClass *) klass;
9512fe850e98fdd448c638ca63fdd92a8a510255ahl item_class->convert_to_guides = SPLine::convertToGuides;
9512fe850e98fdd448c638ca63fdd92a8a510255ahl //shape_class->set_shape = SPLine::setShape;
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* CLine::onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) {
return repr;
Inkscape::XML::Node * SPLine::write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
shape->setCurveInsync(c, TRUE); // *_insync does not call update, avoiding infinite recursion when set_shape is called by update
c->unref();