Andreas Beck <[EMAIL PROTECTED]> writes:
> No. LibGGI relies on being able to draw lines exactly in the same way, no
> matter what drawing engine is used.
Ofcourse.
> > The problem here is simple - the coordinate system in LibGGI ranges
> > from (0,0) to (oo,oo). Negative starting coordinates happens to work
> > when you use software clipping, but with hardware clipping and drawing
> > the results are undefined.
>
> No. They should be either completely defined or completely undefined.
>
> So we either document that giving negative values to any drawing function is
> undefined or we make sure every function obeys them as appropriate.
Bad wording on my side, that is what I mean.
> From a consistency point of view, I'd say, that if we accept signed values
> as input to the function, and if we support clipping at arbitrary windows
> anyway, we should as well clip correctly, if someone gives negative values.
>
> > The reason this behaviour should not be changed is that for lines it
> > isn't as simple as truncating negative values to zero. I do not
> > intend to put a full software line-drawer into the matrox sublib
> > for the sole purpose of supporting broken applications.
>
> ? You don't need to. This is what fallback rendering is for. Look at the
> KGI layer. If a function is not implemented or cannot handle a given
> situation, it will just fall back.
>
> Do the same for Matrox. All it takes is is something like
>
> if (x1<0||x2<0||y1<0||y2<0) return fallback_drawline(...);
But why? I'm very curious about how any application can benefit so
much from being able to pass negative coordinates that it warrants
this >10x slowdown? If there's a valid reason to why negative
coordinates should be supported allthough it will slow down _all_
applications (not very much, but still a slow down) I'd like to
hear it.
//Marcus
--
-------------------------------+------------------------------------
Marcus Sundberg | http://www.stacken.kth.se/~mackan
Royal Institute of Technology | Phone: +46 707 295404
Stockholm, Sweden | E-Mail: [EMAIL PROTECTED]