I have a stack that I want to constrain to a 4:3 ratio when resizing, with a minimum stack size of 800 X 600. A search of the archives didn't yield any relevant results.

If I do this (in the resizeStack handler):

  put the topLeft of this stack into tAnchorPnt
  set the height of this stack to (pNewWdth * 3) div 4
  set the topLeft of this stack to tAnchorPnt

it works as long as my drag on the resize gadget has a horizontal component.

Likewise, this works:

  put the topLeft of this stack into tAnchorPnt
  set the width of this stack to (pNewHgt * 4) div 3
  set the topLeft of this stack to tAnchorPnt

as long as there is a vertical component to the drag.

This:

  put the topLeft of this stack into tAnchorPnt
  if pNewWdth <> pOldWdth then
    set the height of this stack to (pNewWdth * 3) div 4
  else
    set the width of this stack to (pNewHgt * 4) div 3
  end if
  set the topLeft of this stack to tAnchorPnt

Just produces bizarre results.

Any suggestions for my humanities-addled, math-challenged brain?

Devin

Devin Asay
Humanities Technology and Research Support Center
Brigham Young University

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to