Lines Matching defs:cbp
60 SPCanvasBPath *cbp = SP_CANVAS_BPATH (object);
62 if (cbp->curve) {
63 cbp->curve = cbp->curve->unref();
72 SPCanvasBPath *cbp = SP_CANVAS_BPATH(item);
82 if (!cbp->curve) return;
84 cbp->affine = affine;
86 Geom::OptRect bbox = bounds_exact_transformed(cbp->curve->get_pathvector(), affine);
105 SPCanvasBPath *cbp = SP_CANVAS_BPATH (item);
109 if ( !cbp->curve ||
110 ((cbp->stroke_rgba & 0xff) == 0 && (cbp->fill_rgba & 0xff) == 0 ) ||
111 cbp->curve->get_segment_count() < 1)
117 bool dofill = ((cbp->fill_rgba & 0xff) != 0);
118 bool dostroke = ((cbp->stroke_rgba & 0xff) != 0);
123 feed_pathvector_to_cairo (buf->ct, cbp->curve->get_pathvector(), cbp->affine, area,
128 ink_cairo_set_source_rgba32(buf->ct, cbp->fill_rgba);
129 cairo_set_fill_rule(buf->ct, cbp->fill_rule == SP_WIND_RULE_EVENODD? CAIRO_FILL_RULE_EVEN_ODD
135 ink_cairo_set_source_rgba32(buf->ct, cbp->stroke_rgba);
137 if (cbp->dashes[0] != 0 && cbp->dashes[1] != 0) {
138 cairo_set_dash (buf->ct, cbp->dashes, 2, 0);
149 SPCanvasBPath *cbp = SP_CANVAS_BPATH (item);
151 if ( !cbp->curve ||
152 ((cbp->stroke_rgba & 0xff) == 0 && (cbp->fill_rgba & 0xff) == 0 ) ||
153 cbp->curve->get_segment_count() < 1)
160 pathv_matrix_point_bbox_wind_distance(cbp->curve->get_pathvector(), cbp->affine, p, NULL, NULL, &dist, 0.5, &viewbox);
183 sp_canvas_bpath_set_bpath (SPCanvasBPath *cbp, SPCurve *curve)
185 g_return_if_fail (cbp != NULL);
186 g_return_if_fail (SP_IS_CANVAS_BPATH (cbp));
188 if (cbp->curve) {
189 cbp->curve = cbp->curve->unref();
193 cbp->curve = curve->ref();
196 sp_canvas_item_request_update (SP_CANVAS_ITEM (cbp));
200 sp_canvas_bpath_set_fill (SPCanvasBPath *cbp, guint32 rgba, SPWindRule rule)
202 g_return_if_fail (cbp != NULL);
203 g_return_if_fail (SP_IS_CANVAS_BPATH (cbp));
205 cbp->fill_rgba = rgba;
206 cbp->fill_rule = rule;
208 sp_canvas_item_request_update (SP_CANVAS_ITEM (cbp));
212 sp_canvas_bpath_set_stroke (SPCanvasBPath *cbp, guint32 rgba, gdouble width, SPStrokeJoinType join, SPStrokeCapType cap, double dash, double gap)
214 g_return_if_fail (cbp != NULL);
215 g_return_if_fail (SP_IS_CANVAS_BPATH (cbp));
217 cbp->stroke_rgba = rgba;
218 cbp->stroke_width = MAX (width, 0.1);
219 cbp->stroke_linejoin = join;
220 cbp->stroke_linecap = cap;
221 cbp->dashes[0] = dash;
222 cbp->dashes[1] = gap;
224 sp_canvas_item_request_update (SP_CANVAS_ITEM (cbp));