From bf4a1d2d49850170b936c30cfe2b30e798716406 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 3 Aug 2013 03:03:43 +0200 Subject: Cleaned up. (bzr r11608.1.117) --- src/widgets/gradient-toolbar.cpp | 2 +- src/widgets/gradient-vector.cpp | 10 +++++----- src/widgets/stroke-style.cpp | 2 +- src/widgets/swatch-selector.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index ecb9df4c4..4249591f0 100644 --- a/src/widgets/gradient-toolbar.cpp +++ b/src/widgets/gradient-toolbar.cpp @@ -800,7 +800,7 @@ static gboolean update_stop_list( GtkWidget *stop_combo, SPGradient *gradient, S if (SP_IS_STOP(sl->data)){ SPStop *stop = SP_STOP(sl->data); Inkscape::XML::Node *repr = reinterpret_cast(sl->data)->getRepr(); - Inkscape::UI::Widget::ColorPreview *cpv = Gtk::manage(new Inkscape::UI::Widget::ColorPreview(sp_stop_get_rgba32(stop))); + Inkscape::UI::Widget::ColorPreview *cpv = Gtk::manage(new Inkscape::UI::Widget::ColorPreview(stop->get_rgba32())); GdkPixbuf *pb = cpv->toPixbuf(32, 16); Glib::ustring label = gr_ellipsize_text(repr->attribute("id"), 25); diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index 118d8a68a..e9fc426f6 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -369,7 +369,7 @@ static void sp_gvs_rebuild_gui_full(SPGradientVectorSelector *gvs) unsigned long sp_gradient_to_hhssll(SPGradient *gr) { SPStop *stop = gr->getFirstStop(); - unsigned long rgba = sp_stop_get_rgba32(stop); + unsigned long rgba = stop->get_rgba32(); float hsl[3]; sp_color_rgb_to_hsl_floatv (hsl, SP_RGBA32_R_F(rgba), SP_RGBA32_G_F(rgba), SP_RGBA32_B_F(rgba)); @@ -635,7 +635,7 @@ static void update_stop_list( GtkWidget *vb, SPGradient *gradient, SPStop *new_s if (SP_IS_STOP(sl->data)){ SPStop *stop = SP_STOP(sl->data); Inkscape::XML::Node *repr = reinterpret_cast(sl->data)->getRepr(); - Inkscape::UI::Widget::ColorPreview *cpv = Gtk::manage(new Inkscape::UI::Widget::ColorPreview(sp_stop_get_rgba32(stop))); + Inkscape::UI::Widget::ColorPreview *cpv = Gtk::manage(new Inkscape::UI::Widget::ColorPreview(stop->get_rgba32())); GdkPixbuf *pb = cpv->toPixbuf(64, 16); gtk_list_store_append (store, &iter); @@ -791,8 +791,8 @@ static void sp_grd_ed_add_stop(GtkWidget */*widget*/, GtkWidget *vb) newstop->offset = (stop->offset + next->offset) * 0.5 ; - guint32 const c1 = sp_stop_get_rgba32(stop); - guint32 const c2 = sp_stop_get_rgba32(next); + guint32 const c1 = stop->get_rgba32(); + guint32 const c2 = next->get_rgba32(); guint32 cnew = sp_average_color(c1, c2); Inkscape::CSSOStringStream os; @@ -1315,7 +1315,7 @@ static void sp_gradient_vector_color_changed(SPColorSelector *csel, GObject *obj if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX(combo_box), &iter)) { GtkListStore *store = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(combo_box))); - Inkscape::UI::Widget::ColorPreview *cp = Gtk::manage(new Inkscape::UI::Widget::ColorPreview(sp_stop_get_rgba32(stop))); + Inkscape::UI::Widget::ColorPreview *cp = Gtk::manage(new Inkscape::UI::Widget::ColorPreview(stop->get_rgba32())); GdkPixbuf *pb = cp->toPixbuf(64, 16); gtk_list_store_set (store, &iter, 0, pb, /*1, repr->attribute("id"),*/ 2, stop, -1); diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 0a5b3781b..fc3477471 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -762,7 +762,7 @@ StrokeStyle::getItemColorForMarker(SPItem *item, Inkscape::PaintTarget fill_or_s stop = sp_last_stop(vector); } if (stop) { - guint32 const c1 = sp_stop_get_rgba32(stop); + guint32 const c1 = stop->get_rgba32(); gchar c[64]; sp_svg_write_color(c, sizeof(c), c1); color = g_strdup(c); diff --git a/src/widgets/swatch-selector.cpp b/src/widgets/swatch-selector.cpp index ad59e0dc3..7178ad072 100644 --- a/src/widgets/swatch-selector.cpp +++ b/src/widgets/swatch-selector.cpp @@ -172,7 +172,7 @@ void SwatchSelector::setVector(SPDocument */*doc*/, SPGradient *vector) if ( vector && vector->isSolid() ) { SPStop* stop = vector->getFirstStop(); - guint32 const colorVal = sp_stop_get_rgba32(stop); + guint32 const colorVal = stop->get_rgba32(); _csel->base->setAlpha(SP_RGBA32_A_F(colorVal)); SPColor color( SP_RGBA32_R_F(colorVal), SP_RGBA32_G_F(colorVal), SP_RGBA32_B_F(colorVal) ); // set its color, from the stored array -- cgit v1.2.3