Re: [AD] some small patches

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, 2002-11-02 at 21:50, Eric Botcazou wrote:
> > Yes, that would make it consistent for all 4 sides. But where is the
> > problem with my patch?
> 
> Semantics problem: you said it was a bugfix, but I see no bug. The patch 
> quietly implements a new feature.

Well, not a bug, but inconsistency. The left and top sides behave
differently then the right and bottom, without the docs mentioning this.

> > It never actually sets the clipping rectangle outside - the only case where 
> > cl/ct are set to w/h, is when the clipping rectangle is empty anyway.
> 
> Ok, but is that safe in the first place ? Can cl safely point to an 
> out-of-bound location in memory ? Did you check that the asm code doesn't 
> unconditionally write the first pixel ?

Yes, that's the problem I also see. That's why I thought at first an
extra flag is needed.
 
> > This makes most sense IMO, because the clipping rectangle is clipped
> > with the bitmap area. When would you actually want the (current for
> > left/right side) behavior of clipping to leave a 1-pixel border at the
> > side?
> 
> I don't like playing with the borders as you're proposing. The range of cl is 
> 0->w-1, that of cr is 1->w, they must always stay within their range.

Yes, probably more safe considering how much internal code gets passed
the clipping rectangle.
 
> You have to devise another way to implement the feature.
> 

The zero area approach would still work.. but I must think if I can do
it without 4 additional ifs :)

--
Elias Pschernig



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/