MAP ​
Adapt the scale and position of following commands or turn this kind of behavior off.
Syntax ​
Scale sizes proportionally:
MAP [ scale:realValue ] [ transx:measureValue ] [ transy:measureValue ] .
Separate scales for the horizontal and vertical axis:
MAP [ scalex:realValue ] [ scaley:realValue ] [ transx:measureValue ] [ transy:measureValue ] .
Parameters ​
Parameters for proportional scaling:
scale
(realValue, optional) - The factor by which all positions and sizes should be multiplied. The default is1.0
.transx
(measureValue, optional) - Translation coordinate for horizontal axis. This is added to all x-coordinates. The default is0cm
.transy
(measureValue, optional) - Translation coordinate for vertical axis. This is added to all y-coordinates. The default is0cm
.
Parameters for separate axis scaling:
scalex
(realValue, optional) - The factor by which all positions and sizes of the horizontal axis should be multiplied. The default is1.0
.scaley
(realValue, optional) - The factor by which all positions and sizes of the horizontal axis should be multiplied. The default is1.0
.transx
(measureValue, optional) - Translation coordinate for horizontal axis. This is added to all x-coordinates. The default is0cm
.transy
(measureValue, optional) - Translation coordinate for vertical axis. This is added to all y-coordinates. The default is0cm
.
Details ​
The MAP
command makes it possible to scale all following shape commands. A popular application is to resize a complex GraphRep symbol without having to adapt each single coordinate value, like POLYGON
with many coordinates.
The scaling can be set proportional (scale
) or non-proportional (scalex
, scaley
). A value of 1.0 or no specified value means original size. Additionally, translation coordinate values can be specified (transx
, transy
). These values specify a movement of coordinates, which is performed after the scaling.
The MAP
settings can be reset, disabling any scaling and translation coordinates, by using the command without any parameters.
See Also ​
Examples ​
Draw four rectangles, each one with a different size and position and a number identifying each rectangle in its middle. The changes to the size and position are realized through different (MAP
) settings.
GRAPHREP sizing:asymmetrical
SHADOW off
PEN color:"$008888" w:0.05cm
FILL color:"$66cccc"
MAP scalex:0.5 transy:1cm
RECTANGLE x:0cm y:0cm w:1cm h:1cm
TEXT "1" x:0.5cm y:0.5cm w:c h:c
MAP scaley:0.5 transx:1cm
RECTANGLE x:0cm y:0cm w:1cm h:1cm
TEXT "2" x:0.5cm y:0.5cm w:c h:c
MAP scale:2.0 transx:1cm transy:1cm
RECTANGLE x:0cm y:0cm w:1cm h:1cm
TEXT "3" x:0.5cm y:0.5cm w:c h:c
MAP
RECTANGLE x:0cm y:0cm w:1cm h:1cm
TEXT "4" x:0.5cm y:0.5cm w:c h:c
Versions and Changes ​
Available since ADOxx 1.3