Please enable JavaScript to view this site.

ESL Documentation

You can change the size of a graphical region's window, or of all the windows in a class, with the change window size action statement. The coordinates are specified in positive or negative integer values in the region's coordinate system.

 

The change window size by statement changes the relative size of the graphical region's window. For example, suppose you change the size of Blackboard's window from its defined size of 150 150, as shown below:

 

response to ChangeSize

    change Blackboard window size by -25 -25

 

Less of the graphical region appears in the viewport because you have reduced the size of the graphical region's window. Note that changing the size of the window does not change the origin of the window.

_img304

 

Only the part of the circle that is shown above in the rectangle of the viewport is now visible. Note that the part of the circle that is visible appears larger than it was before, because the contents of the window are magnified to fill the viewport completely.

 

The change window size to statement changes the absolute size of the window. For example:

 

response to ChangeSize

    change Blackboard window size to 50 100

 

makes the window smaller in both the horizontal dimension and the vertical dimension. Less of the circle is visible in the viewport, as shown below:

 

_img305

 

Note that the proportions of the window have changed (it is no longer a square), so that the part of the circle that you see in the viewport appears to be flattened. There is more magnification in the X direction than in the Y direction, leading to an effect of stretching the circle to be an ellipse.

 

If no scale has been specified for the region, change window size has no effect.