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

[REBOL] VID Gurus needed 2

From: robert::muench::robertmuench::de at: 22-Oct-2002 14:36

Hi, I need some VID help again. Here is piece of code from my rebol-framework that handles the graph-layout stuff and wasn't written by myself... And that's why I'm lost because it's not base level ;-)) However, edge-layout: layout [ size el-size backdrop white feel [ redraw: func [f a e] [ clear f/lines append f/lines [pen 200.200.200] foreach edge edges [ append f/lines compose [ line (to-pair reduce [ el-x + to-integer edge/from/x el-y + to-integer edge/from/y]) (to-pair reduce [ el-x + to-integer edge/to/x el-y + to-integer edge/to/y]) ] ] ] ] with [ rate: none effect: copy/deep [draw []] lines: second effect ] ] Ok, first thing is, what is this 'with block for? Does 'rate later mean edge-layout/rate or is it bound to the feel block? If so why don't put the with block code into the feel block directly? And what does this copy stuff to effect mean? Yep, the assignment to lines is strange too... Now feel/redraw: I assume that f/lines is a selef choosen word, right? Than a block of DRAW dialect words is created dynamically and assigned to f/lines. So far I get it. But how does the face get's updated? Or is it because we are inside the redraw routine of this face? But than when does the draw dialect jumps in? You see I have some problmes understanding the timing of execution and how everything is tied together. Any help will be appreciated :-)) Robert