[Mono-list] Why is an X server necessary to useSystem.Drawing.Graphics?

Dallman, John jgd at ugs.com
Tue Apr 25 06:57:39 EDT 2006

> I suppose my real concern is that if you want to use code to draw
> (e.g.) CAPTCHAs or other bitmaps as part of a process, rather than for
> the purposes of drawing UI for the user, running an X server to do it
> could seem like overkill on a server that would ordinarily not be
> running one. Feel free to mock my reasoning.

Have you ever written low-level drawing functions for bitmaps? Code
that can take coordinates and a bitmap, and draw pictures without
external assistance? It really isn't trivial, once you start getting 
into lines with width greater than one pixel, dotted line patterns, 
colour management, and many other things that look simple on a screen,
but are complex to implement. 

X is a capable and well-debugged graphics system. Using it for Mono
drawing is sensible code re-use, since any modern UNIX/Linux system 
is capable of running X and has it available. Developing a "simpler" 
drawing purely for off-screen drawing would grow into a project 
nearly as complex as X, and which would inevitably have 
inconsistencies with X. 

If you are running a server that generates stuff for web pages, 
rather than being a simple file/print server, it's going to 
need more support software to do those things. On MS Windows, you
can't operate without the GUI at all; on UNIX/Linux you can do so 
for some things, but they're fairly limited. 

John Dallman, Parasolid Porting Engineer, +44-1223-371554 

More information about the Mono-list mailing list