Re: face-offset face function
Hi Max,

Just a comment to say that win-offset? ans screen-offset? funcs will be (are) fixed in 
view1.3 (regarding edge size).

Regards

DideC
 
> hi all,
> 
> I just tought I'd share a little function I add to the base face object of many of 
> my view windows...
> 
> (use the 'with facet in VID)
> 
> 
> ;---8<---------------------------------------------
>       ;-     face-offset ()
>       face-offset: function [/stop-face sface]  [parent off][
>               parent: self
>               off: 0x0
>               until [
>                       off: off + parent/offset
>                       if parent/parent-face [
>                               if parent/parent-face/edge [
>                                       off: off + parent/parent-face/edge/size
>                               ]
>                       ]
>                       (((parent: parent/parent-face) = sface) OR ( not parent ))
>               ]
>               off
>       ]
> ;---8<---------------------------------------------
> 
> It is like the rebol win-offset function but includes the edge fix AND also includes 
> a stop face.
> 
> The stop-face refinement lets you supply any face so that you can get the offset of 
> a face wrt to any of its parents (instead of only the window). 
> 
> As mentionned before, in its current format, it is intended to be included as a 
> method of a face object, but can easiliy be made as a stand-alone function.
> 
> 
> cheers!!!
> 
> -MAx
> ---
> happy like a busy bee cause I'm currently using rebol for my day job, full-time.  :-)
>  
> 
> 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to