in

Quark Forums

Proportional picture scaling?

Last post 10-07-2005 4:05 PM by larsen67. 15 replies.
Page 2 of 2 (16 items) < Previous 1 2
Sort Posts: Previous Next
  • 10-07-2005 4:05 PM In reply to

    Proportional picture scaling?

    Rodney, here is another one this will work out the scale needed to fill the pic box in either direction and apply proportional scaling to suit. Then centres too.

    tell application "QuarkXPress"
    set CurBox to object reference of current box
    set bounds of image 1 of CurBox to exact fit
    copy (coerce ((scale of image 1 of CurBox) as percent point) to list) to {VertPercent, HorPercent}
    set VertPercent to VertPercent as real
    set HorPercent to HorPercent as real
    if (VertPercent > HorPercent) then
    set scale of image 1 of CurBox to {VertPercent, VertPercent}
    else
    set scale of image 1 of CurBox to {HorPercent, HorPercent}
    end if
    set bounds of image 1 of CurBox to centered
    end tell
Page 2 of 2 (16 items) < Previous 1 2
Powered by Community Server (Commercial Edition), by Telligent Systems