| shingles.net.nz |
Shingles Consulting | |
|
graphex.ew |
graphex simple graphics library for win32lib |
|
| Euphoria Page |
This page has moved. Redirecting in 5 seconds. If that doesn't work, click here
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). |
Screenshots: |
| LINKS
win32lib - the current cornerstone of my interest in Euphoria Euphoria - the best RAD language I've seen in a long time, and it has been around a long time ... another gem :) EXAMPLES
Depending on what kind of security you are running you may or may not be able to run or download these.
The name "graphex" is both a play on the word "graphics" and an indication of the "Ex"-ness of the functionality this provides on top of win32lib (eg like createEx, etc)
graphex.ew is released under the same terms as win32lib.
|
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. |
graphex.ew
Demo #1: Stepwise demonstration of the system and a brief overview of its drawing capabilities.
graphex.ew
Demo #2: The "shape" pen based system graphex.ew
gcanvas.ew
|
Content Copyright © 2006 Gary Shingles