Screen coordiantes to Client coordinates (RhinoScript)


#1

Is there a way to convert Client coordinate to Screen coordinate (or vice-versa)?

I see XformWorldToScreen and XformScreenToWorld, so the only way I can do the above conversion now is via converting to WorldCoordinate in-between. Any ideas for a direct way ?

I can get a ViewSize and ScreenSize, but I don’t see a way to know the viewport upper-left corner location to do the math, other than converting the Rhino.ViewNearCorners from world to screen/client.

Thanks,

–jarek


(Dale Fugier) #2

Hi @Jarek,

I don’t have any other suggestions for doing what you are already doing.

– Dale


#3

Thanks Dale. With the above method, there is 1 or 2 pixel tolerance issue every few tries, so not perfect, but will have to work around that I guess.