Re: Graphics scripting language
- Posted by Ryan W. Johnson <ryanj at fluidae.com> Dec 23, 2005
- 545 views
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...]