Lines Matching defs:shape

33 #include "display/drawing-shape.h"
56 static void sp_shape_update_marker_view (SPShape *shape, Inkscape::DrawingItem *ai);
87 * as the shape is removed from the tree, even if it is still referenced
207 * right place for particular path segment on a shape.
284 * Updates the instances (views) of a given marker in a shape.
291 sp_shape_update_marker_view(SPShape *shape, Inkscape::DrawingItem *ai)
296 if (!shape->_curve) return;
297 Geom::PathVector const & pathv = shape->_curve->get_pathvector();
307 if ( shape->_marker[i] ) {
310 if (shape->_marker[i]->orient_mode == MARKER_ORIENT_AUTO_START_REVERSE) {
313 sp_marker_show_instance(shape->_marker[i], ai,
315 shape->style->stroke_width.computed);
322 if (shape->_marker[SP_MARKER_LOC_MID] || shape->_marker[SP_MARKER_LOC]) {
330 if ( shape->_marker[i] ) {
331 sp_marker_show_instance(shape->_marker[i], ai,
333 shape->style->stroke_width.computed);
350 if (shape->_marker[i]) {
351 sp_marker_show_instance(shape->_marker[i], ai,
353 shape->style->stroke_width.computed);
367 if (shape->_marker[i]) {
368 sp_marker_show_instance(shape->_marker[i], ai,
370 shape->style->stroke_width.computed);
379 if ( shape->_marker[SP_MARKER_LOC_END] || shape->_marker[SP_MARKER_LOC] ) {
391 if (shape->_marker[i]) {
392 sp_marker_show_instance(shape->_marker[i], ai,
394 shape->style->stroke_width.computed);
810 * \param shape Shape.
811 * \return TRUE if the shape has any markers, or FALSE if not.
837 * \param shape Shape.
839 * \return Number of markers that the shape has of this type.
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)
899 SPItem *item = dynamic_cast<SPItem *>(shape);
903 if (marker == shape->_marker[i]) {
907 sp_marker_hide(shape->_marker[i], v->arenaitem->key() + i);
910 shape->_release_connect[i].disconnect();
911 shape->_modified_connect[i].disconnect();
912 shape->_marker[i] = static_cast<SPMarker *>(sp_object_hunref(shape->_marker[i], item));
928 * Adds a new marker to shape object at the location indicated by key. value
929 * must be a valid URI reference resolvable from the shape object (i.e., present
930 * in the document <defs>). If the shape object already has a marker
937 SPShape *shape = dynamic_cast<SPShape *>(object);
938 g_return_if_fail(shape != NULL);
946 if (marker != shape->_marker[key]) {
947 if (shape->_marker[key]) {
951 shape->_release_connect[key].disconnect();
952 shape->_modified_connect[key].disconnect();
955 for (v = shape->display; v != NULL; v = v->next) {
956 sp_marker_hide(shape->_marker[key],
961 shape->_marker[key] = static_cast<SPMarker *>(sp_object_hunref(shape->_marker[key], object));
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));
983 * Adds a curve to the shape. If owner is specified, a reference
984 * will be made, otherwise the curve will be copied into the shape.
985 * Any existing curve in the shape will be unreferenced first.