Lines Matching defs:marker

2  * SVG <marker> implementation
27 #include "sp-marker.h"
61 * Initializes an SPMarker object. This notes the marker's viewBox is
62 * not set and initializes the marker's c2p identity matrix.
96 * as the marker is removed from the tree, even if it is still referenced
97 * by other objects. It hides and removes any views of the marker, then
232 repr = xml_doc->createElement("svg:marker");
317 * Removes any SPMarkerViews that a marker has with a specific key.
320 * removes the old view of the marker and establishes a new one, registering
321 * it with the marker's list of views for future updates.
323 * \param marker Marker to create views in.
327 // If marker views are always created in order, then this function could be eliminated
330 sp_marker_show_dimension (SPMarker *marker, unsigned int key, unsigned int size)
332 std::map<unsigned int, SPMarkerView>::iterator it = marker->views_map.find(key);
333 if (it != marker->views_map.end()) {
336 marker->hide(key);
343 marker->views_map[key] = SPMarkerView();
345 marker->views_map[key].items.push_back(NULL);
351 * Shows an instance of a marker. This is called during sp_shape_update_marker_view()
355 sp_marker_show_instance ( SPMarker *marker, Inkscape::DrawingItem *parent,
359 // Do not show marker if linewidth == 0 and markerUnits == strokeWidth
361 // that contains the "degenerate" marker.
362 if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH && linewidth == 0) {
366 std::map<unsigned int, SPMarkerView>::iterator it = marker->views_map.find(key);
367 if (it == marker->views_map.end()) {
382 view->items[pos] = marker->private_show(parent->drawing(), key, SP_ITEM_REFERENCE_FLAGS);
388 if (g) g->setChildTransform(marker->c2p);
394 if (marker->orient_mode == MARKER_ORIENT_AUTO) {
396 } else if (marker->orient_mode == MARKER_ORIENT_AUTO_START_REVERSE) {
402 m = Geom::Rotate::from_degrees(marker->orient.computed);
405 if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH) {
415 * Hides/removes all views of the given marker that have key 'key'.
420 sp_marker_hide (SPMarker *marker, unsigned int key)
422 marker->hide(key);
423 marker->views_map.erase(key);
432 Inkscape::XML::Node *repr = xml_doc->createElement("svg:marker");
434 // Uncommenting this will make the marker fixed-size independent of stroke width.
466 SPObject *sp_marker_fork_if_necessary(SPObject *marker)
468 if (marker->hrefcount < 2) {
469 return marker;
475 const gchar *stock = marker->getRepr()->attribute("inkscape:isstock");
479 return marker;
482 SPDocument *doc = marker->document;
485 marker->getRepr()->setAttribute("inkscape:collect", NULL);
486 Inkscape::XML::Node *mark_repr = marker->getRepr()->duplicate(xml_doc);
491 marker->getRepr()->setAttribute("inkscape:collect", "always");