gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp ...


From: strk
Subject: Re: [Gnash-commit] gnash ChangeLog backend/render_handler_agg.cpp ...
Date: Wed, 7 Mar 2007 00:37:27 +0100

On Tue, Mar 06, 2007 at 11:46:30PM +0100, Bastiaan Jacques wrote:
> 
> 
> On Tue, 6 Mar 2007, Udo Giacomozzi wrote:
> 
> >Hello Bastiaan,
> >
> >Tuesday, March 6, 2007, 6:40:05 PM, you wrote:
> >BJ> -           unsigned int width = region.width()+1;
> >
> >I patched this some while ago because region.width() is *not* enough!
> >region.width() is implemented like:
> >
> > region.width() := getMaxX() - getMinX()
> >
> >In integer domain this is off by one since width==1 when
> >getMaxX()==getMinX() while it should be 1, otherwise it would be a
> >NULL region.
> >
> >So, region.width()+1 *is* correct.
> 
> It can be correct only if region.width() < xres. Which is not always true; 
> therefore this code will sometimes try to copy xres+1 bytes from the agg 
> buffer. 

You can use Intersection(RangeType&, RangeType&) to trim any overflow.

--strk;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]