Lines Matching defs:stop
45 #include "sp-stop.h"
352 * Return a "HHSSLL" version of the first stop color so we can sort by it
356 SPStop *stop = gr->getFirstStop();
357 unsigned long rgba = stop->get_rgba32();
483 static GtkWidget *sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *stop);
526 SPStop *stop = NULL;
531 stop = SP_STOP(ochild);
540 os << "stop-color: #000000;stop-opacity:" << 1.0 << ";";
544 child = xml_doc->createElement("svg:stop");
550 child = xml_doc->createElement("svg:stop");
558 sp_repr_set_css_double(stop->getRepr(), "offset", 0.0);
559 Inkscape::XML::Node *child = stop->getRepr()->duplicate(gradient->getRepr()->document());
561 gradient->getRepr()->addChild(child, stop->getRepr());
621 SPStop *stop = SP_STOP(sl->data);
623 Inkscape::UI::Widget::ColorPreview *cpv = Gtk::manage(new Inkscape::UI::Widget::ColorPreview(stop->get_rgba32()));
627 gtk_list_store_set (store, &iter, 0, pb, 1, repr->attribute("id"), 2, stop, -1);
646 // user selected existing stop from list
649 SPStop *stop = get_selected_stop(tbl);
650 if (!stop) {
659 csel->setColorAlpha(stop->getEffectiveColor(), stop->opacity);
669 prev = stop->getPrevStop();
678 next = stop->getNextStop();
695 gtk_adjustment_set_value(adj, stop->offset);
704 SPStop *stop = NULL;
710 gtk_tree_model_get (GTK_TREE_MODEL(store), &iter, 2, &stop, -1);
713 return stop;
721 SPStop *stop = get_selected_stop(vb);
722 if (stop) {
723 stop->offset = gtk_adjustment_get_value (adjustment);
724 sp_repr_set_css_double(stop->getRepr(), "offset", stop->offset);
726 DocumentUndo::maybeDone(stop->document, "gradient:stop:offset", SP_VERB_CONTEXT_GRADIENT,
727 _("Change gradient stop offset"));
751 SPStop *stop = get_selected_stop(vb);
752 if (!stop) {
758 SPStop *next = stop->getNextStop();
761 SPStop *prev = stop->getPrevStop();
763 next = stop;
764 stop = prev;
769 new_stop_repr = stop->getRepr()->duplicate(gradient->getRepr()->document());
770 gradient->getRepr()->addChild(new_stop_repr, stop->getRepr());
772 next = stop;
773 new_stop_repr = stop->getPrevStop()->getRepr()->duplicate(gradient->getRepr()->document());
774 gradient->getRepr()->addChild(new_stop_repr, stop->getPrevStop()->getRepr());
779 newstop->offset = (stop->offset + next->offset) * 0.5 ;
781 guint32 const c1 = stop->get_rgba32();
789 os << "stop-color:" << c << ";stop-opacity:" << opacity <<";";
801 _("Add gradient stop"));
808 SPStop *stop = get_selected_stop(vb);
809 if (!stop) {
815 // if we delete first or last stop, move the next/previous to the edge
816 if (stop->offset == 0) {
817 SPStop *next = stop->getNextStop();
822 } else if (stop->offset == 1) {
823 SPStop *prev = stop->getPrevStop();
830 gradient->getRepr()->removeChild(stop->getRepr());
834 _("Delete gradient stop"));
893 GtkWidget *b = gtk_button_new_with_label(_("Add stop"));
896 gtk_widget_set_tooltip_text(b, _("Add another control stop to gradient"));
898 b = gtk_button_new_with_label(_("Delete stop"));
901 gtk_widget_set_tooltip_text(b, _("Delete current control stop from gradient"));
932 SPStop *stop = get_selected_stop(vb);
933 if (!stop) {
937 gtk_adjustment_set_value(Offset_adj, stop->offset);
957 if (stop->offset>0 && stop->offset<1) {
1009 GtkWidget * sp_gradient_vector_editor_new(SPGradient *gradient, SPStop *stop)
1041 wd.stop = 0;
1067 GtkWidget *wid = static_cast<GtkWidget*>(sp_gradient_vector_widget_new(gradient, stop));
1074 // Simply load_gradient into the editor does not work for multi-stop gradients,
1075 // as the stop list and other widgets are in a wrong state and crash readily.
1089 sp_gradient_vector_editor_new(gradient, stop);
1149 SPStop *stop = get_selected_stop(widget);
1150 if (!stop) {
1158 csel->setColorAlpha(stop->getEffectiveColor(), stop->opacity);
1212 wd.stop = 0;
1305 SPStop *stop = get_selected_stop(GTK_WIDGET(object));
1306 if (!stop) {
1310 selected_color->colorAlpha(stop->specified_color, stop->opacity);
1311 stop->currentColor = false;
1348 SPStop *stop = get_selected_stop(GTK_WIDGET(object));
1349 if (!stop) {
1358 sp_repr_set_css_double(stop->getRepr(), "offset", stop->offset);
1360 os << "stop-color:" << color.toString() << ";stop-opacity:" << static_cast<gdouble>(alpha) <<";";
1361 stop->getRepr()->setAttribute("style", os.str().c_str());
1362 // g_snprintf(c, 256, "stop-color:#%06x;stop-opacity:%g;", rgb >> 8, static_cast<gdouble>(alpha));
1363 //stop->getRepr()->setAttribute("style", c);
1366 _("Change gradient stop color"));
1370 // Set the color in the selected stop after change
1377 Inkscape::UI::Widget::ColorPreview *cp = Gtk::manage(new Inkscape::UI::Widget::ColorPreview(stop->get_rgba32()));
1380 gtk_list_store_set (store, &iter, 0, pb, /*1, repr->attribute("id"),*/ 2, stop, -1);