Command: scalebar

Syntax

scalebar { <window> }

Description

Draw a scalebar graphic symbol, or turn the auto-scalebar feature on or off.

Parameters

Switches

Notes

The scalebar text is derived from the current window dimensions in world units. A suitable unit of measure (metric or imperial) is computed and usually rounded to a multiple of 5,10,50,100 etc..

If the window is not currently in use, or is not a graphic window, no action is taken.

Examples

Draw a scalebar in window 1.

scalebar win1

Turn the auto-scalebar on with a specific color and transparent fillstyle, placed at the bottom left of the window.

# A tranparent yellow fillstyle ...
fillstyle fsScalebar,-col=yellow,-alph=0.5
# A font and a textstyle using the font ...
font fntArial8,'Arial,8',-sys,-var
textstyle tsScalebar,-fo=fntArial8,-out=3,-su='p'
scalebar my_win, -on,-fil=fsScalebar,-ts=tsScalebar,-j='BL'

See Also

Commands:

color, fillstyle, textstyle

Identifiers:

window (graphic)

Structures:

window.layers, window.scalebar_layer