scalebar { <window> }
Draw a scalebar graphic symbol, or turn the auto-scalebar feature on or off.
<window>
A window identifier. The window must be a graphic window. If omitted, the current graphic window
is used.
-col=<color>
The color of the scalebar text. If omitted, a default foreground color (usually
black) is used.
-fil=<fillstyle>
Define the fill characteristics of the scalebar frame. If omitted, the color
yellow is used. Note: <fillstyle>
can be a fillstyle, color, tile, hatchstyle or graduation.
-h=<num>
The character height of the scalebar text. If omitted, a pixel height of
10 is used.
-imp
Use imperial measure (inches, yards, miles) in the scalebar text. If this
switch is omitted, metric is used (cm, m or km).
-j=<string>
A position justification for the scrollbar, a combination of L,R,T,B and M relative to the graphic window
canvas area.
If omitted, BL (bottom left) is used.
-ma=<nums[2]>
2 margins in pixels to offset the scalebar from the appropriate left/right
or top/bottom edges, depending on the justification. The default values
are 15 and 10.
-off
Turn the auto-scalebar off for the window. This also removes the scalebar
layer from the window's layer array.
-on
Turn the auto-scalebar on for the window. This also ensures the presence
of a scalebar layer in the window's layer array.
-ts=<textstyle>
The textstyle for the scalebar text, including font, aspect ratio etc. If
omitted, the system text style (system_ts) is used.
The textstyle can have a scalable or fixed font.
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.
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'
Commands: |
|
Identifiers: |
window (graphic) |
Structures: |