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

[REBOL] [vid] List Query

From: moliad:aei:ca at: 29-Dec-2003 22:08

I meant to say: it returns the offset FOR any given face (from window) I also have checked that the win-offset? (after sourcing it and doing a test) does not take into consideration the edges... so that if you compare the value returned by win-offset and a place a face at that location within the root face , you will have an offset equal to all nested faces without their edge sizes... here is a patch which fixes this, I'm quite sure its been suggested before, but it was so simple to do... It would have taken me more time to find it... win-offset?: func [ {Given any face, returns its screen absolute offset.} face [object!] /local xy ][ xy: 0x0 while [face] [ if face/parent-face [ xy: xy + face/offset if face/parent-face/edge [xy: xy + face/parent-face/edge/size] ] face: face/parent-face ] xy ] HTH!!! -MAx