Lines Matching defs:marker

38 #include "sp-marker.h"
132 /* This stanza checks that an object's marker style agrees with
133 * the marker objects it has allocated. sp_shape_set_marker ensures
134 * that the appropriate marker objects are present (or absent) to
176 /* Dimension marker views */
191 /* Update marker views */
196 // Marker selector needs this here or marker previews are not rendered.
206 * Calculate the transform required to get a marker's path object in the
212 * The axes of the temporary new user coordinate system are aligned according to the orient attribute on the 'marker'
284 * Updates the instances (views) of a given marker in a shape.
288 * @todo figure out what to do when both 'marker' and for instance 'marker-end' are set.
300 // the first vertex should get a start marker, the last an end marker, and all the others a mid marker
303 // START marker
309 // Reverse start marker if necessary.
321 // MID marker
326 && ! ((path_it == (pathv.end()-1)) && (path_it->size_default() == 0)) ) // if this is the last path and it is a moveto-only, don't draw mid marker there
344 /* Put marker between curve_it1 and curve_it2.
346 * there should be a midpoint marker between last segment and closing straight line segment
378 // END marker
411 // Note: marker selector preview does not trigger SP_OBJECT_STYLE_MODIFIED_FLAG so
412 // this is not called when marker previews are generated, however there is code in
452 // START marker
461 // Reverse start marker if necessary
472 // total marker transform
475 // get bbox of the marker with that transform
481 // MID marker
487 SPMarker* marker = _marker[i];
488 SPItem* marker_item = sp_item_first_item_child( marker );
497 && ! ((path_it == (pathv.end()-1)) && (path_it->size_default() == 0)) ) // if this is the last path and it is a moveto-only, there is no mid marker there
501 if (marker->orient_mode == MARKER_ORIENT_ANGLE) {
503 tr = Geom::Rotate::from_degrees(marker->orient.computed) * Geom::Translate(transl);
506 if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH) {
510 tr = marker_item->transform * marker->c2p * tr * transform;
521 /* Put marker between curve_it1 and curve_it2.
523 * there should be a midpoint marker between last segment and closing straight line segment */
525 SPMarker* marker = _marker[i];
526 SPItem* marker_item = sp_item_first_item_child( marker );
531 if (marker->orient_mode == MARKER_ORIENT_ANGLE) {
533 tr = Geom::Rotate::from_degrees(marker->orient.computed) * Geom::Translate(transl);
536 if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH) {
540 tr = marker_item->transform * marker->c2p * tr * transform;
554 if (marker->orient_mode == MARKER_ORIENT_ANGLE) {
556 tr = Geom::Rotate::from_degrees(marker->orient.computed) * Geom::Translate(transl);
559 if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH) {
563 tr = marker_item->transform * marker->c2p * tr * transform;
569 // END marker
572 SPMarker* marker = _marker[i];
573 SPItem* marker_item = sp_item_first_item_child( marker );
589 if (marker->orient_mode == MARKER_ORIENT_ANGLE) {
591 tr = Geom::Rotate::from_degrees(marker->orient.computed) * Geom::Translate(transl);
594 if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH) {
598 // total marker transform
599 tr = marker_item->transform * marker->c2p * tr * transform;
601 // get bbox of the marker with that transform
615 SPMarker *marker = SP_MARKER(obj);
616 if (marker->markerUnits == SP_MARKER_UNITS_STROKEWIDTH) {
620 SPItem* marker_item = sp_item_first_item_child( marker );
622 tr = marker_item->transform * marker->c2p * tr;
670 // START marker
678 // MID marker
684 && ! ((path_it == (pathv.end()-1)) && (path_it->size_default() == 0)) ) // if this is the last path and it is a moveto-only, there is no mid marker there
697 /* Put marker between curve_it1 and curve_it2.
699 * there should be a midpoint marker between last segment and closing straight line segment */
718 // END marker
756 /* This stanza checks that an object's marker style agrees with
757 * the marker objects it has allocated. sp_shape_set_marker ensures
758 * that the appropriate marker objects are present (or absent) to
766 /* provide key and dimension the marker views */
779 /* Update marker views */
793 * Sets style, path, and paintbox. Updates marker views, including dimensions.
815 /* Note, we're ignoring 'marker' settings, which technically should apply for
816 all three settings. This should be fixed later such that if 'marker' is
862 // there is only a start marker on the first path of a pathvector
872 n = (n > 1) ? (n - 2) : 0; // Minus the start and end marker, but never negative.
882 // there is only an end marker on the last path of a pathvector
892 * Checks if the given marker is used in the shape, and if so, it
894 * and unrefs the marker from the shape.
897 sp_shape_marker_release (SPObject *marker, SPShape *shape)
903 if (marker == shape->_marker[i]) {
905 /* Hide marker */
909 /* Detach marker */
921 sp_shape_marker_modified (SPObject */*marker*/, guint /*flags*/, SPItem */*item*/)
928 * Adds a new marker to shape object at the location indicated by key. value
930 * in the document <defs>). If the shape object already has a marker
932 * new marker is hrefed and its signals connected.
945 SPMarker *marker = dynamic_cast<SPMarker *>(mrk);
946 if (marker != shape->_marker[key]) {
950 /* Detach marker */
954 /* Hide marker */
960 /* Unref marker */
963 if (marker) {
964 shape->_marker[key] = static_cast<SPMarker *>(sp_object_href(marker, object));
965 shape->_release_connect[key] = marker->connectRelease(sigc::bind<1>(sigc::ptr_fun(&sp_shape_marker_release), shape));
966 shape->_modified_connect[key] = marker->connectModified(sigc::bind<2>(sigc::ptr_fun(&sp_shape_marker_modified), shape));