Please enable JavaScript to view this site.

ESL Documentation

You can change the size of a graphical region's viewport, or of all the viewports in a class, with the change size action statement. The coordinates are specified in positive or negative integer values in the coordinate system of the region's parent. Changing the viewport size of a graphical region does not affect the size of its window unless the no scale attribute has been specified. If no scale is specified, the window size changes in conjunction with the viewport size. (See Using the No Scale Attribute for more information on the no scale attribute.)

 

The change size to statement changes the absolute size of the windows by values representing the new X and Y coordinate positions of the graphical region's size. For example, suppose you change the size of Blackboard's viewport from its defined size of

150 150:

 

response to ChangeSize

    change Blackboard size to 100 100

 

As always, the entire contents of the window are shown in the viewport. The viewport has been made smaller, so the contents of the window appear smaller. You now see the following:

_img300

Note that the proportions of the viewport have not been changed. It is still a square, although each side is now 100 coordinate positions in length rather than 150. Therefore, the contents of the window (in this case, a circle) are displayed without distortion.

 

You can change the relative size of the viewport by using the change size by statement. For example:

 

response to ChangeSize

    change Blackboard size by 75 -75

 

makes the size of the viewport 75 coordinate positions wider in the horizontal dimension and 75 coordinate positions shorter in the vertical dimension. Its new size is 225 75. The viewport and its contents appear as shown below:

_img301