Lines Matching defs:stop

51 #include "sp-stop.h"
99 N_("Linear gradient <b>mid stop</b>"),
104 N_("Radial gradient <b>mid stop</b>"),
105 N_("Radial gradient <b>mid stop</b>"),
181 // set both fill and stroke with our stop-color and stop-opacity
245 SPCSSAttr *stop = sp_repr_css_attr_new();
252 sp_repr_css_set_property (stop, "stop-color", css->attribute("flood-color"));
256 sp_repr_css_set_property (stop, "stop-color", css->attribute("lighting-color"));
260 sp_repr_css_set_property (stop, "stop-color", css->attribute("color"));
264 sp_repr_css_set_property (stop, "stop-color", css->attribute("stroke"));
268 sp_repr_css_set_property (stop, "stop-color", css->attribute("fill"));
271 if (css->attribute("stop-color")) {
272 sp_repr_css_set_property (stop, "stop-color", css->attribute("stop-color"));
276 if ( !sp_repr_css_property_is_unset( stop, "stop-color") ) {
278 Glib::ustring tmp = makeStopSafeColor( sp_repr_css_property( stop, "stop-color", "" ), stopIsNull );
280 sp_repr_css_set_property( stop, "stop-color", tmp.c_str() );
285 if (css->attribute("stop-opacity")) { // direct setting of stop-opacity has priority
286 sp_repr_css_set_property(stop, "stop-opacity", css->attribute("stop-opacity"));
296 sp_repr_css_set_property(stop, "stop-opacity", os.str().c_str());
300 sp_repr_css_set_property(stop, "stop-opacity", "0"); // if a single fill/stroke property is set to none, don't change color, set opacity to 0
304 if (!stop->attributeList()) { // nothing for us here, pass it on
305 sp_repr_css_attr_unref(stop);
314 sp_item_gradient_stop_set_style(draggable->item, draggable->point_type, draggable->point_i, draggable->fill_or_stroke, stop);
318 //sp_repr_css_print(stop);
319 sp_repr_css_attr_unref(stop);
383 // calculate the new stop offset
396 // calculate the new stop offset
408 // calculate the new stop offset
544 // select the newly created stop
585 SPCSSAttr *stop = sp_repr_css_attr_new ();
586 sp_repr_css_set_property( stop, "stop-color", stopIsNull ? 0 : toUse.c_str() );
587 sp_repr_css_set_property( stop, "stop-opacity", "1" );
591 sp_item_gradient_stop_set_style (draggable->item, draggable->point_type, draggable->point_i, draggable->fill_or_stroke, stop);
593 sp_repr_css_attr_unref(stop);
598 // now see if we're over line and create a new stop
607 SPStop *stop = addStopNearPoint(line->item, p, 5/desktop->current_zoom());
608 if (stop) {
610 sp_repr_css_set_property( css, "stop-color", stopIsNull ? 0 : toUse.c_str() );
611 sp_repr_css_set_property( css, "stop-opacity", "1" );
612 sp_repr_css_change(stop->getRepr(), css, "style");
1119 SPStop *stop = NULL;
1120 switch (draggable->point_type) { // if we delete first or last stop, move the next/previous to the edge
1124 stop = gradient->getFirstStop();
1126 SPStop *next = stop->getNextStop();
1137 stop = sp_last_stop(gradient);
1139 SPStop *prev = stop->getPrevStop();
1150 stop = sp_get_stop_i(gradient, draggable->point_i);
1158 gradient->getRepr()->removeChild(stop->getRepr());
1160 _("Delete gradient stop"));
1423 this->knot->tip = g_strdup_printf (_("%s %d for: %s%s; drag with <b>Ctrl</b> to snap offset; click with <b>Ctrl+Alt</b> to delete stop"),
1762 * Select draggers by stop
1764 void GrDrag::selectByStop(SPStop *stop, bool add_to_selection, bool override )
1776 if (stop_i == stop) {
2398 _("Move gradient mid stop(s)"));
2475 SPStop *stop = sp_get_stop_i(vector, draggable->point_i);
2479 if ( (SPStop*)l->data == stop ) {
2485 midstoplist = g_slist_append(midstoplist, stop);
2494 SPStop *stop = NULL;
2496 stop = vector->getFirstStop();
2498 stop = sp_last_stop(vector);
2500 if (stop) {
2502 stopinfo->spstop = stop;
2528 SPStop *stop = (SPStop*) midstoplist->data;
2529 document = stop->document;
2530 Inkscape::XML::Node * parent = stop->getRepr()->parent();
2531 parent->removeChild(stop->getRepr());
2532 midstoplist = g_slist_remove(midstoplist, stop);
2558 SPStop *stop = stopinfo->vector->getFirstStop();
2559 gdouble offset = stop->offset;
2567 stop->offset = 0;
2568 sp_repr_set_css_double(stop->getRepr(), "offset", 0);
2572 stop = stop->getNextStop();
2573 while ( stop != laststop ) {
2574 stop->offset = (stop->offset - offset)/(1 - offset);
2575 sp_repr_set_css_double(stop->getRepr(), "offset", stop->offset);
2576 stop = stop->getNextStop();
2600 SPStop *stop = stopinfo->vector->getFirstStop();
2601 stop = stop->getNextStop();
2602 while ( stop != laststop ) {
2603 stop->offset = stop->offset / offset;
2604 sp_repr_set_css_double(stop->getRepr(), "offset", stop->offset);
2605 stop = stop->getNextStop();
2637 SPStop *stop = stopinfo->vector->getFirstStop();
2638 stop = stop->getNextStop();
2639 while ( stop != laststop ) {
2640 stop->offset = stop->offset / offset;
2641 sp_repr_set_css_double(stop->getRepr(), "offset", stop->offset);
2642 stop = stop->getNextStop();
2654 // stopinfo->spstop is the selected stop
2669 sp_repr_css_set_property(css, "fill", sp_repr_css_property(stopcss, "stop-color", "inkscape:unset"));
2670 sp_repr_css_set_property(css, "fill-opacity", sp_repr_css_property(stopcss, "stop-opacity", "1"));
2672 sp_repr_css_set_property(css, "stroke", sp_repr_css_property(stopcss, "stop-color", "inkscape:unset"));
2673 sp_repr_css_set_property(css, "stroke-opacity", sp_repr_css_property(stopcss, "stop-opacity", "1"));
2687 DocumentUndo::done( document, SP_VERB_CONTEXT_GRADIENT, _("Delete gradient stop(s)") );