Page 1 of 1

margins for within function ?

Posted: Wed Jun 17, 2009 10:15 pm
by jmburnod
Hi All,

Is there a default margin for the function within ?


I watch it when using this function. The screen result is diifferent (4 pixels)

Code: Select all

function fRectInside pGrc1,pGrc2
   put within(grc pGrc1,the topleft of grc pGrc2) into DTL
   put within(grc pGrc1,the topRight of grc pGrc2) into DTR
   put within(grc pGrc1,the bottomRight of grc pGrc2) into DBR
   put within(grc pGrc1,the bottomLeft of grc pGrc2) into DBL
   put DTL&","&DTR&","&DBR&","&DBL into rRectInside
   return rRectInside
end fRectInside
Thank for your help

Jean-Marc

Posted: Wed Jun 17, 2009 10:59 pm
by Mark
Hi Jean-Marc,

First of all, the within function works fine here. There is no weird margin. Second, you might want to readabout the intersect function in the docs.

Best,

Mark

Margin for within function ?

Posted: Thu Jun 18, 2009 7:49 am
by jmburnod
Hi Mark,

Yes, within work fine but with a margin of 4 pixels. Can i send you an snapshot of it ?

Intersect work fine also but i need to know if the topleft,topright,botright and botleft are within an other object. Intersect return true if a part of object is within.

All the best

Jean-Marc

Margin for within function ?

Posted: Sat Jun 20, 2009 10:38 am
by jmburnod
Hi Mark,

You can watch on this picture:

within(grc 1,the topleft of grc 2) return true

[img]
http://alternatic.ch/jmb/devrev/marginrectInside.png
[/img]

Regards

Jean-Marc