Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: How to extend effects?

From: rotenca:telvia:it at: 19-Mar-2003 16:31

> is it possible to simply have "view layout [image img effect [my-effect]]", > in essence extending the effects available to VID? > > *If* this is possible, is it also possible to make the my-effect func > generic such that "view layout [box blue effect [my-effect]]" works?
No, but in this case you could do: my-effect: func [img] [ repeat pos (img/size/x * img/size/y) [ poke img pos either odd? pos [][] ] img ] view layout [image effect [draw [image 0x0 my-effect img]]]
> If VID is a dialect, what are effects? Built-ins, properties, words? Are > they something that "belongs" to VID or View?
Effects are words of a dialect interpreted by View. The effect word Draw handles a sub-dialect in a block: the advantage of Draw sub-dialect is that it is reduced before interpreted, so it can contain Rebol code, like in the example. --- Ciao Romano