/*
 * ScaleVertices.virx
 * Copyright (c)1992 Bruno Costa & Lucia Darsa
 */

options results

signal on HALT
signal on SYNTAX
signal on FAILURE

lockgui

form = '"BOOL,TO Window,0|'	||,
       'STR,X Factor:,1.0,6|'	||,
       'STR,Y Factor:,1.0,6"'

requestform TITLE '"Scale Vertices"' form
if rc >= 5 then
  signal halt

parse var result window '|' sx '|' sy

if window = 0 then
  winname = 'FROM'
else
  winname = 'TO'

getcenterselected winname
parse var result cx cy

transformpoints winname sx 0 (-sx * cx + cx) 0 sy (-sy * cy + cy) 0 0 1

unlockgui
exit 0

BREAK_C:
HALT:
 unlockgui
 exit 20

FAILURE:
 requestnotify '"Host *"'address()'*" returned an error (severity 'rc')*nexecuting' compress(sourceline(2),'* ') 'at line' SIGL'"'
 unlockgui
 exit 20

SYNTAX:
 requestnotify '"'errortext(rc)'*nexecuting' compress(sourceline(2),'* ') 'at line' SIGL'"'
 unlockgui
 exit 20
