Lines Matching defs:gr
82 unsigned long sp_gradient_to_hhssll(SPGradient *gr);
131 gvs->gr = NULL;
151 if (gvs->gr) {
154 gvs->gr = NULL;
179 GtkWidget *sp_gradient_vector_selector_new(SPDocument *doc, SPGradient *gr)
183 g_return_val_if_fail(!gr || SP_IS_GRADIENT(gr), NULL);
184 g_return_val_if_fail(!gr || (gr->document == doc), NULL);
189 sp_gradient_vector_selector_set_gradient(SP_GRADIENT_VECTOR_SELECTOR(gvs), doc, gr);
197 void sp_gradient_vector_selector_set_gradient(SPGradientVectorSelector *gvs, SPDocument *doc, SPGradient *gr)
199 // g_message("sp_gradient_vector_selector_set_gradient(%p, %p, %p) [%s] %d %d", gvs, doc, gr,
200 // (gr ? gr->getId():"N/A"),
201 // (gr ? gr->isSwatch() : -1),
202 // (gr ? gr->isSolid() : -1));
207 g_return_if_fail(!gr || (doc != NULL));
208 g_return_if_fail(!gr || SP_IS_GRADIENT(gr));
209 g_return_if_fail(!gr || (gr->document == doc));
210 g_return_if_fail(!gr || gr->hasStops());
214 if (gvs->gr) {
216 gvs->gr = NULL;
229 if (gr) {
230 gvs->gradient_release_connection = gr->connectRelease(sigc::bind<1>(sigc::ptr_fun(&sp_gvs_gradient_release), gvs));
233 gvs->gr = gr;
235 if (!suppress) g_signal_emit(G_OBJECT(gvs), signals[VECTOR_SET], 0, gr);
236 } else if (gr != gvs->gr) {
241 sp_gradient_vector_selector_set_gradient(gvs, doc, gr);
243 g_signal_emit(G_OBJECT(gvs), signals[VECTOR_SET], 0, gr);
261 return gvs->gr;
300 if (gvs->gr) {
301 std::set<SPObject *> gradients = gvs->gr->document->getResourceList("gradient");
323 } else if (!gvs->gr) {
329 SPGradient *gr;
330 gr = SP_GRADIENT(gl->data);
331 gl = g_slist_remove(gl, gr);
333 unsigned long hhssll = sp_gradient_to_hhssll(gr);
334 GdkPixbuf *pixb = sp_gradient_to_pixbuf (gr, 64, 18);
335 Glib::ustring label = gr_prepare_label(gr);
340 row[gvs->columns->refcount] = usageCount[gr];
341 row[gvs->columns->data] = gr;
354 unsigned long sp_gradient_to_hhssll(SPGradient *gr)
356 SPStop *stop = gr->getFirstStop();
419 SPGradient *gr = NULL;
420 gr = gr_item_get_gradient(item, true); // fill
421 if (gr) {
422 mapUsageCount->count(gr) > 0 ? (*mapUsageCount)[gr] += 1 : (*mapUsageCount)[gr] = 1;
424 gr = gr_item_get_gradient(item, false); // stroke
425 if (gr) {
426 mapUsageCount->count(gr) > 0 ? (*mapUsageCount)[gr] += 1 : (*mapUsageCount)[gr] = 1;
434 if (gvs->gr) {
436 gvs->gr = NULL;
451 if (gvs->gr) {
453 gvs->gr = NULL;