Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // if viewframe left and top coordinates are non zero value then exclude it
- // during the computation of xRatio and yRatio
- xRatio = (inPos.x - viewFrame.left)/actualWidth;
- yRatio = (inPos.y - viewFrame.top)/actualHeight;
- // Use viewframe width and height to compute wRatio and hRatio.
- wRatio = (float)inPos.w/(float)(viewFrame.right - viewFrame.left);
- hRatio = (float)inPos.h/(float)(viewFrame.bottom - viewFrame.top);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement