New Member
Harold Hunt
Harold@compasstechnologies.com
Fri, 8 Dec 2000 09:04:30 -0500
>I bet it's a real challenge mapping some of the X functions onto
>efficient Win32 API calls. It's been years since I did any
>Windows GUI programming, but ISTR that the X primitives and the
>Windows primitives are rather at odds in places.
Most X graphics functions map pretty nicely into Windows GDI functions,
according to the notes of other X on Win32 programs and per my own readings
of the X and Win32 APIs. Mismatched functions can be simplified, at first,
by using the sample implementation's machine independent functions that,
say, convert a call to draw an ellipse into a series of horizontal lines.
I have to develop a solution for another tricky area before I have to worry
about mapping X functions to Windows GDI. Windows GDI stores current pen
color, line width, fill pattern, etc. in a system structure called a Device
Context (DC); each DC is associated with one window or memory bitmap. X
stores the same drawing state information in a structure called a Graphics
Context (GC); GCs are not associated with a particular device, so, I could
draw on any X window or pixmap using a single GC, which may relate to
several Windows DCs. The real problem is mapping GCs to DCs and keeping
them in synch. :)
Well, I don't want to turn this into another Cygwin/XFree86 mailing list, so
I had better stop there :)
Harold