i.Mage Scripting
|
---|
Date: 7/6/2006
| I wrote a simple scripting language for i.Mage last night. Lets you create graphics based on little bits of script that can specify things in exact co-ordinates. This is generally useful to me for generating bits of graphics for web pages and applications that conform to some very specific size and shape requirements. Things like little circular filets for rounding off corners in webpages and the like. But I'm sure others will come up with a whole plethora of uses for it.
|
Comments:
|
Ben 07/06/2006 9:14am
| Interesting..., will you allow to run a script from the command line?
like 'image -r myscript.txt'
so we could actualy script the image scripting.
I think about generating a set of button images in all sort of colors.
I could script the myscript.txt to have the color changed (foreach colors) and then run the image creation script.
Or better, could you include loop instruction and variable in the scripting language?
|
fret 07/06/2006 12:47pm
| I've started thinking about those sorts of things but I haven't implemented either yet. |
fret 14/06/2006 6:46am
| I got a bit carried away. Erm, well the scripting language has now grown to handle for loops, evaluation of expressions and nice error messages.
e.g.
create 32, 32, 32;
for i=0; i<16; i++;
{
newpath p;
s = i * 2;
k = s + 2;
rect p, s, s, k, k;
rgba 255 - (i * 16), 0, i * 16, i * 16;
fillpath p;
}
Draws a bunch of squares going from transparent red through to opaque blue. |
Ben 14/06/2006 8:26am
| Hehe good job !
Can wait playing with it !
Thanks fret |
fret 15/06/2006 1:02am
| Added if statements and fixed up the docs. I should be able to release this sometime this weekend. |
Ben 20/06/2006 8:43am
| Awesome, this is great.
I've just test it, it realy does what I want.
Thank you.
|
Mario 26/06/2006 9:47am
| As you can find here:
http://www.rebol.net/article/0129.html
there is a set of scalar vector graphics functions called AGG that you can find on this page:
http://www.antigrain.com
HTH, Mario |
fret 27/06/2006 12:06am
| I know about Antigrain, and also Cairo. Both are good solutions which would suit well. But at the moment the built in renderer in Lgi is all I need personally.
Are you suggesting I convert the rendering over to Antigrain? (Why?) |
Mario 28/06/2006 7:13am
| No, I am not suggesting you to switch to Antigrain, just giving some info.
It looks to me that some of your work is similar or inspired to Amiga software (I could be wrong).
I've seen a Deluxe paint reimplementation in REBOL on last September/October and it was using the AGG functions in the language's draw system.
These two reasons lead me to the idea that AGG can help you but, as formerly said, this can be false and maybe is more difficult to adapt i.Mage to a new design than writing more functions on your own.
I like your work so don't misunderstand me due to my "maccheroni" English :) |
|
Reply
|
---|
From:
|
|
Email (optional):
|
(Will be HTML encoded to evade harvesting)
|
Message:
|
|
|
|
|
|
|