On Tue, Apr 18, 2000 at 03:06:04PM -0400, Jason Mawdsley wrote:
> Hi!
>
> The following functions now support GM_ADVANCED graphics mode:
> - X11DRV_PolyPolygon
> - X11DRV_PolyPolyline
> - X11DRV_Polygon
> - X11DRV_Polyline
> - X11DRV_LineTo
> - X11DRV_Rectangle
> - X11DRV_SetPixel
> - X11DRV_GetPixel
Hi,
There's a problem with most of these. You only use the World
Transform [WT] when you're in GM_ADVANCED, in fact Windows will use it
no matter which mode it's in. You can only change the WT in
GM_ADVANCED but if you go back to GM_COMPATIBLE the transform is still
there. Programs might do this to take advantage of the different
rectangle inclusion or arc drawing rules. I think what you want to do
is use LPToDP to transform the co-ords (or modify [X|Y]LPTODP to
respect WTs).
X11DRV_Rectangle then has to be drawn using XDrawLines/XFillPolygon
unless the WT is diagonal (eM12 == 0 && eM21 == 0) or off-diagonal (eM11
== 0 && eM22 == 0 i.e. +/- pi/2 rotation). Then you can use
X{Draw|Fill}Rectangle which may be accelerated.
There should be a test for GM_ADVANCED but this just changes whether
(right,bottom) is inside or outside the rect.
I think most of the other functions you've changed will work as they
are if you change {X|Y}LPTODP. The curve functions are harder...
> All located in /graphics/x11drv/graphics.c
>
> I also made changes to the following functions:
>
> - SetGraphicsMode
> - SetArcDirection
> - SetMapMode
I find the MM_LOENGLISH change very surprising, but I assume you've
tested it.
> - SetWorldTransform
> - ModifyWorldTransform
These should fail if the determinant of the WT is too small - no idea
how to define too though. This ensures we can always generate an
inverse transform.
If you like I'll merge your stuff into what I did a re-submit it.
Huw.
--
Dr. Huw D M Davies | Clarendon Laboratory
[EMAIL PROTECTED] | Parks Road
Tel: +44 1865 272390 | Oxford OX1 3PU
Fax: +44 1865 272400 | UK