                                   scalew.ew
                                   
			 Scaling and viewporting routines
			for Andrea Cini's EuWinGUI Library

I have been playing around with Andrea Cini's EuWinGUI Library of routines (my
first venture, long deferred, into Windows programming). I somehow found this
GUI system a little less daunting than WIN32 and thought it would be a good
place to start.

As you probably know, migrating from the pure DOS version of Euphoria to
Windows is all a bit of a shock! I missed my old familiar ways of doing 
graphics with "pure euphoria" coding. It was, for instance, a surprise to find 
that Andrea's DrawLine(), DrawMultiLine() and DrawPolygon() commands do not 
share a common format for specifying points - I presume a reflection of how 
Microsoft may not have such a common format for its AVIs.

So I have 'ported' some of my old DOS scaling and drawing routines to EuWinGUI
and added some tweaks, all in the file scalew.ew. You can see a demo of 
what they do by running the (minimal) demo program graphics.exw.

Comments in the source-code of scalew.ew explains pretty fully what it does
and how. The functions w_eupline_2_GUImline() and w_eupgon_2_GUIpgon() have
been made global since they are of general usefulness if you are doing
drawing with EuWinGUI, translating euphoria polyline sequences into forms 
needed by EuWinGUI.

The code in scalew.ew is largely independent of GUI system being used. Those
blocks of code that are dependent I have prefaced with the comment:

	-- EuWinGui-specific display instructions

so it should now be pretty easy to tailor a version of this include-file to
suit any GUI system.

The overall upshot is that with just 3 "traditional euphoria"-like commands:

	w_set_view()
	w_polyline()
	w_polygon()

you can scale external drawing data to a EuWinGUI bitmap and draw over the BMP
in a comfortable (from the euphoria-programmer's point of view) way.

scalew.ew has received limited workout and testing. However I have used its 
DOS predecessor extensively and that has proved to be robust and trouble-free.


				----oOo----

Please address any ideas, queries or complaints to:

Copyright  Fred Mangan (2007) 
Townsville, Queensland 4814, Australia. 
Mangan_Fred@yahoo.com.au 

