7.5

Table Of Contents
Argument
None
Code Sample Example
In this example, the current position is set first and saved.
gsave and grestore are required to be issued in pairs, meaning that you need the equal number of gsave and grestore
commands to run in any given object. However, an uneven number of commands can be located in the code, if some of them
are within IFstatements, so that when the code is actually run, the pairing occurs correctly in all instances.
Example
moveto( 1, 1 )
%Position is now 1,1
gsave()
%Save current state
lineto( 2, 1 )
%Position is now 2,1
lineto( 2, 2 )
%Position is now 2,2
grestore()
%Restore previous state: position is now 1,1
Scale (procedure)
Scales the result of all commands that follow the scale() command.
Syntax
scale(width, height)
Argument
width
Measure value specifying the factor by which to scale the width.
height
Measure value specifying the factor by which to scale the height.
Code Sample Example
scale( 2,0.5 )
©2010 Objectif Lune Inc - 568 -