marker.cpp revision 3e837b4cbc71d489d7ce89151c962698bbd270a3
360aad676ba92ca443083da298b766628f6a3bfbmental * SVG <marker> implementation
e7cd2ec3e1687a262ebe95e5ac7a47f8ab147ce2mental * Lauris Kaplinski <lauris@kaplinski.com>
e7cd2ec3e1687a262ebe95e5ac7a47f8ab147ce2mental * Bryce Harrington <bryce@bryceharrington.org>
e7cd2ec3e1687a262ebe95e5ac7a47f8ab147ce2mental * Abhishek Sharma
e7cd2ec3e1687a262ebe95e5ac7a47f8ab147ce2mental * Jon A. Cruz <jon@joncruz.org>
e7cd2ec3e1687a262ebe95e5ac7a47f8ab147ce2mental * Copyright (C) 1999-2003 Lauris Kaplinski
e7cd2ec3e1687a262ebe95e5ac7a47f8ab147ce2mental * 2004-2006 Bryce Harrington
e7cd2ec3e1687a262ebe95e5ac7a47f8ab147ce2mental * 2008 Johan Engelen
e7cd2ec3e1687a262ebe95e5ac7a47f8ab147ce2mental * Released under GNU GPL, read the file 'COPYING' for more information
e7cd2ec3e1687a262ebe95e5ac7a47f8ab147ce2mental unsigned int key;
e7cd2ec3e1687a262ebe95e5ac7a47f8ab147ce2mentalstatic void sp_marker_view_remove (SPMarker *marker, SPMarkerView *view, unsigned int destroyitems);
return new SPMarker();
this->markerUnits = 0;
this->markerUnits_set = 0;
this->orient_set = 0;
this->orient = 0;
while (this->views) {
switch (key) {
case SP_ATTR_MARKERUNITS:
if (value) {
case SP_ATTR_REFX:
case SP_ATTR_REFY:
case SP_ATTR_MARKERWIDTH:
case SP_ATTR_MARKERHEIGHT:
case SP_ATTR_ORIENT:
if (value) {
case SP_ATTR_VIEWBOX:
ictx.viewport = Geom::Rect::from_xywh(0, 0, this->markerWidth.computed, this->markerHeight.computed);
if (v->items[i]) {
Inkscape::XML::Node* SPMarker::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) {
if (this->markerUnits_set) {
if (this->orient_set) {
return repr;
Inkscape::DrawingItem* SPMarker::show(Inkscape::Drawing &/*drawing*/, unsigned int /*key*/, unsigned int /*flags*/) {
Inkscape::DrawingItem* SPMarker::private_show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) {
if (!view) {
for (unsigned int i = 0; i < size; i++) {
return NULL;
return NULL;
m = base;
m = base;
return NULL;
SPMarkerView *v;
while (v != NULL) {
v = next;
SPMarkerView *v;
if (destroyitems) {
delete view;
const gchar *generate_marker(GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Point center, Geom::Affine move)
return mark_id;
return marker;
return marker;
return marker_new;