| graphex simple graphics library for win32lib |
|
|
|
|
graphex.ew is a Euphoria language library for drawing simple double buffered line oriented graphics and images in a win32lib program. >> with canvas gcanvas.ew is a graphex based canvas (scrollable object management).
(If you don't see Links on the left and screenshots on the right, please click here ) graphex.ew Synopsis: integer gfx -- image stored in a 'gfx' sequence Now whatever else you add to the window, the graphic will look after itself. You can either rely on it to display anything else you draw later on, or update the whole thing first and call the drawing routine whenever you like. gcanvas.ew The idea behind a graphex canvas is to allow a much larger graphex to be viewed through a smaller "view port" with scroll bars etc. You can attach events to to the canvas, and add a basic dot grid. Synopsis: integer canvas, -- id of canvas to be created object1_id, -- id of object 1 object2_id -- id of object 2 canvas = newGfxCanvas(Window1, 0, 0, 100, 100) -- create a canvas at 0,0 in (win32lib id) Window1 of size 100 x 100 pixels -- add a 30x30 green gfx rectangle outline at 10, 10 object1_id = gfxCanvasAddObject(canvas, 10, 10, Green, GP_RECT, {10, 10, 40, 40}) -- add a 50x50 blue solid rectangle off the canvas (scroll bars will appear unless suppressed) object2_id = gfxCanvasAddObject(canvas, 150, 150, Blue, GP_RECT_SOLID, {150, 150, 200, 200}) drawGfxCanvas(canvas) -- make it show As an extenstion to graphex the documentation is referenced from below and its development will probably remain linked to the graphex system itself. Documentation The current documentation is here. Download previous version 0.10.0 24-June-2006 78,881 bytes SCREENSHOT:
1. By "geometry management" I mean, using gfx_draw(...) at {10, 10} always means {10,10} in the image. Coordinates from a mouse event of {10,10} always means {10,10} in the image, etc. Eg in Demo4 above, the three coloured areas are made up of three gfx objects, so drawing the waveforms is much easier. Point it to the starting point and let the gfx_draw(.."shape") draw it. |
Show (3) - Add comments:



















