1. Graphics scripting language

I would like to have a fairly simple graphics scripting language that programs
could use to draw any graphics or text to the screen, memory, or a printer. This
language would be designed to allow for anything from simple lines, rectangles
and ellipses, to complex polylines, polycurves, and formatted text. It would need
to be able to handle filling complex shapes, alpha blending, gradients, and
images, also. Applying effects to areas of the canvas would be nice, too. This
library would definitely need to work on any platform.

I need something like this for my Fluid Aapplication Environment project, but i
believe it could be very useful for other euphoria projects, too. I think it
would make a nice addition to the user contributions.

I just don't have much time to start this sub-project, because there are so many
other parts of FluidAE that i need to work on right now (it is a very large
project that I have been working on for about 5 years).

Would anyone be interesting in tackling this challange? I would like to at least
start some discussion about how a graphical scripting language could be designed.

~Ryan W. Johnson

Fluid Application Environment
http://www.fluidae.com/

[cool quote here, if i ever think of one...]

new topic     » topic index » view message » categorize

2. Re: Graphics scripting language

Do you mean maybe an XML language? say;

<graphics>
 <line x = "3" y = "10" cx = "100" /> <!-- Horizontal Line -->
 <line x = "3" y = "10" cy = "100" /> <!-- Vertical Line -->

 bla bla bla ...

</graphics>

The multi-platform and display bit is surely more complicated because they all
do it differently - ie I still haven't worked out my problem on Windows! So,
could this bit be modular - each 'module' could interpret a parsed sequence, then
handle it for their platform/device.

Just an idea!

Alex

new topic     » goto parent     » topic index » view message » categorize

3. Re: Graphics scripting language

Alex Chamberlain wrote:
> 
> Do you mean maybe an XML language? say;
> 
> <graphics>
>  <line x = "3" y = "10" cx = "100" /> <!-- Horizontal Line -->
>  <line x = "3" y = "10" cy = "100" /> <!-- Vertical Line -->
> 
>  bla bla bla ...
> 
> </graphics>
> 
> The multi-platform and display bit is surely more complicated because they all
> do it differently - ie I still haven't worked out my problem on Windows! So,
> could this bit be modular - each 'module' could interpret a parsed sequence,
> then handle it for their platform/device.
> 
> Just an idea!
> 
> Alex

Or what about Allegro as a base (multiplatform, small, dead simple, versatile)

Chris


http://members.aol.com/chriscrylex/euphoria.htm
http://uboard.proboards32.com/
http://members.aol.com/chriscrylex/EUSQLite/eusql.html

new topic     » goto parent     » topic index » view message » categorize

4. Re: Graphics scripting language

Ryan W. Johnson wrote:
> 
> I would like to have a fairly simple graphics scripting language that programs
> could use to draw any graphics or text to the screen, memory, or a printer.
> This language would be designed to allow for anything from simple lines,
> rectangles
> and ellipses, to complex polylines, polycurves, and formatted text. It would
> need to be able to handle filling complex shapes, alpha blending, gradients,
> and images, also. Applying effects to areas of the canvas would be nice, too.
> This library would definitely need to work on any platform.
> 


I've got ooeu working as an embedded scripting language.  There are a few 
more things I need to do with it, and should release it next week.  It's 
a bit more than what you're asking for, but it would allow you to use any
available euphoria code as part of the scripting environment.

Matt Lewis

new topic     » goto parent     » topic index » view message » categorize

5. Re: Graphics scripting language

Alex Chamberlain wrote:
> 
> Do you mean maybe an XML language? say;
> 
> <graphics>
>  <line x = "3" y = "10" cx = "100" /> <!-- Horizontal Line -->
>  <line x = "3" y = "10" cy = "100" /> <!-- Vertical Line -->
> 
>  bla bla bla ...
> 
> </graphics>

Yes, that might work. It clearly shows what the different paramaters are.
However, i'm wondering if the language should be more compacted. One thing to
consider is the interpreting speed of an markup language vs. a very compact one,
maybe like this:

color 128,128,64,128   --red: 128, green: 128, blue: 64, alpha: 128
rect 3,10,100,300      --rectangle (3,10) - (100, 300)

I guess i'm just having trouble deciding. Maybe either one would be just as
fast. One would just have a larger file size, which probably doesn't hurt
anything.

> 
> The multi-platform and display bit is surely more complicated because they all
> do it differently - ie I still haven't worked out my problem on Windows! So,
> could this bit be modular - each 'module' could interpret a parsed sequence,
> then handle it for their platform/device.
> 
> Just an idea!
> 
> Alex

I think most of the work would be creating all the actual drawing functions,
especially the complex curves & gradients. The language parser itself should be
pretty easy.

~Ryan W. Johnson

Fluid Application Environment
http://www.fluidae.com/

[cool quote here, if i ever think of one...]

new topic     » goto parent     » topic index » view message » categorize

6. Re: Graphics scripting language

It could be designed like Logo, just with more drawing commands.  That would
make it very simple to write, someone wrote a logo-like drawing environment in
Liberty BASIC once!  Or it could just be a wrapper around one of those drawing
libraries.

Jeremy

Edmund Burke: "All that is necessary for evil to triumph is for good men to do
nothing."

new topic     » goto parent     » topic index » view message » categorize

7. Re: Graphics scripting language

Mybe S.V.G. Scaleble Vector Graphics could help (runs in a browser).
Or GraphApp has lot of drawing in it and works together with Euphoria (and PEU)
on Windows and Linux .
If you like to do all kind of plotting data then look at Ploticus (runs in
Windows and Linux)

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu