Re: Help needed with scaleFactor and scaling

2017-02-18 Thread Colin Holgate via use-livecode
This seems to work (to make button 1 appear to be 100 pixels from the top and left, and to appear to be 200 wide and 150 tall): on fixit put random(10)/10 + 1 into it set the scalefactor of this stack to it set the rect of btn 1 to 100/it,100/it,100/it+100/it,100/it+50/it end fixit

Help needed with scaleFactor and scaling

2017-02-18 Thread Dan Friedman via use-livecode
Can anyone figure out the math to resize a control so it appears to be unchanged when you set the scaleFactor of a stack? For example… you have a button who’s rect is 100,100,400,400. On the screen, it looks to be 300px wide. Now, if you set the scaleFactor to 1.5, what rect do you have to