[REBOL] Re: calm before the storm
From: moliad:gmai:l at: 11-Jun-2008 14:50
hi Pekr,
right now, picture-lab only has its first picture editor type. its a
text-area in which we write an effects block.
Other editors are planned, (a graphic element stacker (like
illustrator), a simple paint, and a graphical node-based editor).
Although the text-area editor sounds simple, and un-artistic, the
actual handling of that text is quite advanced, I deep bind the code
to external values, which are properties, so you can use external
words in your effects.
if you size related values, like in this simple example:
gradient 0x1 red black
draw [
pen yellow
line-width 3
box 10x10 (size - 10x10)
line 10x10 (size - 10x10)
]
anytime you change the size in the properties gui, the draw adapts,
the history is populated and a new render is done, so the box and
diagonal line are always pinned to the corners of the image.
ALL programming errors are gracefully handled. Indeed the text-area
bg even changes color in real-time as you type to hint to you what's
wrong (unloadable, unbindable, uncomposable, unrenderable)
The text-area in which we edit the effect block uses GLayout's editing
patch and actually calls the whole rendering procedure in real-time,
adding to the undo history only on valid effects blocks (it knows when
the render was successfull). so you can type your stuff and every
time a valid effect occurs, as you type, the output refreshes.
so right now, picture-lab is the most advanced draw block editor I
know of. its actually quite fun to type in your effects and draws and
see them pop-in as you type. Its a hell of a lot easier to do
graphics for rebol apps now.
I'll post screen shots when I have at least a pretty picture in the
output and the properties pages has a bit more "meat" in it.
shouldn't be too long.
btw, when R3 is a little closer to release (and picture lab is
liquified), I will be porting picture-lab to it. this will be pretty
easy, using liquid, as all of the actual code is abstracted through
the dataflow kernel. If I update the kernel to R3, the same
high-level code should work in both R2 and R3, on completely different
graphic and i/o sub-systems.
-MAx
On Wed, Jun 11, 2008 at 5:35 AM, Petr Krenzelok
<petr.krenzelok-seznam.cz> wrote: