New DRAWLISTSCALE command to resize a DRAWLIST

4 views
Skip to first unread message

John Bridges

unread,
Jul 23, 2013, 3:53:28 PM7/23/13
to after...@googlegroups.com
New build of AfterGRASP is up for download:
 
 
agsetup_20130723.exe
 
----------------------------------------------------------------------------
Tue, 23 Jul 2013

New command to scale a DRAWLIST

DRAWLISTSCALE &DRAWLIST NEWWIDTH NEWHEIGHT

Useful for cases where you want to calculate text positions at a higher or
lower resolution than you are displaying.

Results are identical to this script code:

    for i from 0 count DRAWLIST->size step 4
        set DRAWLIST[@i] int((@DRAWLIST[@i]*@NEWWIDTH)/@OLDWIDTH+.5)
        set DRAWLIST[@i+1] int((@DRAWLIST[@i+1]*@NEWHEIGHT)/@OLDHEIGHT+.5)
        set DRAWLIST[@i+2] int(((@DRAWLIST[@i+2]+1)*@NEWWIDTH)/@OLDWIDTH-.5)
        set DRAWLIST[@i+3] int(((@DRAWLIST[@i+3]+1)*@NEWHEIGHT)/@OLDHEIGHT-.5)
    next

----------------------------------------------------------------------------
Mon, 22 Jul 2013

HTML font sizes given in measurements are now rounded, not truncated.
So a 14pt font at 71dpi is now 16 pixels instead of 15 pixels.

----------------------------------------------------------------------------
Tue, 10 Jul 2013

Unusual crash bug in conversion of BSTR variant to STR, sometimes the size
returned from SysStringLen would be less then the size stored in the
BSTR head. Changed to use the size stored in the BSTR head to prevent
this problem.


----------------------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages