Re: bug in gnome-canvas-line when using clip_path



To keep this patch from being lost please file a report with
bugzilla.gnome.org.

On Fri, Nov 14, 2003 at 08:51:59AM -0500, Bob Gibbs wrote:
> 
> Hi,
> 
>         I have been using anti-aliased GnomeCanvas with ArtSVP
> *clip_path passed in to the group update procedure. In doing this, I
> discovered a minor bug in the stock gnome-canvas-line.c item.
> 
> 
>         Would it be OK to submit the patch attached below ?
> 
>         Second question: clip_path is currently trapped to NULL by the
> GnomeCanvas do_update procedure.  Would it OK to add a public member
> clip_path and default this to NULL.  This would allow users to the
> built-in clipping without the need to create a custom clip group. (Would
> make things a little easier I think.)
> 
>         Note: I have looked at the stock gnome-canvas-clipgroup item.
> This does not solve my problem as it does the clipping during the render
> phase.  I need to do the clipping during the update phase for
> performance reasons.
> 
> Thanks.
> 
> Bob Gibbs
> 
> 
> Index: gnome-canvas-line.c
> ===================================================================
> RCS file: /cvs/gnome/libgnomecanvas/libgnomecanvas/gnome-canvas-line.c,v
> retrieving revision 1.71
> diff -u -r1.71 gnome-canvas-line.c
> --- gnome-canvas-line.c	3 May 2003 06:47:07 -0000	1.71
> +++ gnome-canvas-line.c	14 Nov 2003 11:46:45 -0000
> @@ -1072,19 +1072,19 @@
>  
>  		gnome_canvas_item_update_svp_clip (item, &line->fill_svp, svp,
> clip_path);
>  
> -		if (line->first_arrow && line->first_coords)
> +		if (line->first_arrow && line->first_coords) {
>  			svp = svp_from_points (line->first_coords, NUM_ARROW_POINTS,
> affine);
> -		else
> -			svp = NULL;
> +                        gnome_canvas_item_update_svp_clip (item, 
> +                                        &line->first_svp, svp,
> clip_path);
> +                }
>  
> -		gnome_canvas_item_update_svp_clip (item, &line->first_svp, svp,
> clip_path);
>  
> -		if (line->last_arrow && line->last_coords)
> +		if (line->last_arrow && line->last_coords) {
>  			svp = svp_from_points (line->last_coords, NUM_ARROW_POINTS, affine);
> -		else
> -			svp = NULL;
> +                        gnome_canvas_item_update_svp_clip (item, 
> +                                        &line->last_svp, svp,
> clip_path);
> +                }
>  
> -		gnome_canvas_item_update_svp_clip (item, &line->last_svp, svp,
> clip_path);
>  
>  	} else {
>  		set_line_gc_foreground (line);
> 
> 
> 
> 
> 
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list

-- 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jody gnome org | By definition all answers are replies. Unfortunately,
               | not all replies are answers.  -- JMS
8a:b7:80:f3:7f:df:f5:f6:e0:c0:3a:e0:23:d4:22:13




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]