Lines Matching defs:marker

88     SPObject *marker = doc->getObjectById(b);
91 return marker;
247 /* Drop down marker selectors*/
256 startMarkerCombo = Gtk::manage(new MarkerComboBox("marker-start", SP_MARKER_LOC_START));
265 midMarkerCombo = Gtk::manage(new MarkerComboBox("marker-mid", SP_MARKER_LOC_MID));
274 endMarkerCombo = Gtk::manage(new MarkerComboBox("marker-end", SP_MARKER_LOC_END));
483 * Handles when user selects one of the markers from the marker combobox.
484 * Gets the marker uri string and applies it to all selected
505 gchar const *marker = marker_combo->get_active_marker_uri();
510 sp_repr_css_set_property(css, combo_id, marker);
512 // Also update the marker combobox, so the document's markers
521 if (!SP_IS_SHAPE(item) || SP_IS_RECT(item)) { // can't set marker to rect, until it's converted to using <path>
527 SPObject *markerObj = getMarkerObj(marker, document);
605 * Fork marker if necessary and set the referencing items url to the new marker
606 * Return the new marker
609 StrokeStyle::forkMarker(SPObject *marker, int loc, SPItem *item)
611 if (!item || !marker) {
618 * Optimization when all the references to this marker are from this item
621 Glib::ustring urlId = Glib::ustring::format("url(#", marker->getRepr()->attribute("id"), ")");
629 if (marker->hrefcount <= refs) {
630 return marker;
633 marker = sp_marker_fork_if_necessary(marker);
635 // Update the items url to new marker
636 Inkscape::XML::Node *mark_repr = marker->getRepr();
644 return marker;
648 * Change the color of the marker to match the color of the item.
651 * 1. If the item has fill, use that for the marker fill,
652 * 2. If the marker has same fill and stroke assume its solid, use item stroke for both fill and stroke the line stroke
653 * 3. If the marker has fill color, use the marker fill color
657 StrokeStyle::setMarkerColor(SPObject *marker, int loc, SPItem *item)
660 if (!item || !marker) {
667 const gchar *stock = marker->getRepr()->attribute("inkscape:isstock");
674 // Check if we need to fork this marker
675 marker = forkMarker(marker, loc, item);
677 Inkscape::XML::Node *repr = marker->getRepr()->firstChild();
689 // Current marker style
690 SPCSSAttr *css_marker = sp_css_attr_from_object(marker->firstChild(), SP_STYLE_FLAG_ALWAYS);
694 // Create new marker style with the lines stroke
701 // 1. If the line has fill, use that for the marker fill
706 // 2. If the marker has same fill and stroke assume its solid. use line stroke for both fill and stroke the line stroke
711 // 3. If the marker has fill color, use the marker fill color
716 sp_repr_css_change_recursive(marker->firstChild()->getRepr(), css, "style");
718 // Tell the combos to update its image cache of this marker
719 gchar const *mid = marker->getRepr()->attribute("id");
745 // If the item has a gradient use the first stop color for the marker
1249 * Updates the marker combobox to highlight the appropriate marker and scroll to
1250 * that marker.
1276 // FIXME: use the first in the list that has the marker of each type, if any
1280 // For all three marker types,
1295 // Extract the name of the marker that the object uses
1296 SPObject *marker = getMarkerObj(object->style->marker_ptrs[keyloc[i].loc]->value, object->document);
1297 // Scroll the combobox to that marker
1298 combo->set_current(marker);
1300 // Set the marker color
1305 setMarkerColor(marker, combo->get_loc(), SP_ITEM(object));
1309 _("Set marker color"));