 TatukGIS Developer Kernel 11

Site Tools

doc:extended-line-symbology

Extended line symbology

Documentation | Other Specifications | Extended line symbology

Extended line symbology is simple script language defined to construct advanced lines such as arrow lines, parallel lines, precise dashed lines, serrated lines etc.

Syntax

Logic

• All parameters (except GOTO) are relative and move the “drawing position” cursor along with the shape. The X coordinate moves the cursor horizontally along with the shape. The Y coordinate moves the cursor perpendicularly.
• Drawing can contain as many commands as desired.
• Using GOTO(0) enables drawing over an already drawn line.
• FOR..END loop cannot be embedded into another loop.
• The more complicated the symbol, the slower the drawing speed.

Commands

Full Short Description Example Short example
; Comment out whole line.;This is a comment
GOTO(x)GMove drawing position along the shape to an arbitrary position.GOTO(10%)G(10%)
MOVE(dx,dy)MMove drawing along the line by delta.MOVE(10,-10)M(10,-10)
DRAW(x1,y1,x2,y2,..,xn,yn)DDraw a vector segmentDRAW(5,5 5 -5)D(+5+5+5-5)
OUTLINE(x1,y1,x2,y2,..,xn,yn)ODraw a line symbol with the rotation point at the place of the current “drawing position”. The whole symbol will be rotated with the same parameters.OUTLINE(5,5 -10,0 0,-10 10,0 0,-10)O(+5+5-10+0+0-10+10+0+0-10)
FILL(x1,y1,x2,y2,..,xn,yn)IDraw a filled symbol with the rotation point at the place of the current “drawing position”. The whole symbol will be rotated with the same parameters.FILL(5,5 -10,0 0,-10 10,0 0,-10)I(+5+5-10+0+0-10+10+0+0-10)
LINE(x)LDraw a parallel line on current “drawing position at an offset”, introduced in DK11.LINE(100%)L(100%)
FOR(x)FStart of the loop. Parameters for the distance the loop will be repeated. Default is 100% of the length. A negative value means the calculation starts from the end of the line. For example, FOR(-45%) means repeat though 45% of the length of the entire line, starting from the end of the line.FOR(50%)F(50%)
END()EEnd of the loopEND()E()
WIDTH(x)WChange line widthWIDTH(10W)W(10W)
COLOR(r, g, b)CChange drawing colorCOLOR(255,0,0)C(255,0,0)
COLOR(mode)CChange drawing color to: 0 (line/area color) or 1 (outline color)COLOR(0)C(1)

Values option

Symbol Description Example
NoneDevice independent pixel - 1 pixel in 96dpi; default, same as XGOTO(1)
XDevice independent pixel - 1 pixel in 96dpiGOTO(1X)
PScreen pixelGOTO(1P)
TTwip (1/1440 of inch)GOTO(700T)
WLine width (as set for Line.Width) expressed multiplied by 10, e.g., 15T means 1.5 line widthsGOTO(15W)
SLine with scaled device independent pixels (similar to 'X'); scale means that wider lines will be scaled proportionally: 10X for thin lines means really means the same as 10X, but for wider lines it will be represented by smaller value for better appearance.GOTO(10S)

Coding

• Values can be separated by a space, coma, plus sign, or minus sign.
• Symbol provided adds TGIS_SymbolList. Prepare short start with ‘&’ sign:
Line.Symbol = &F()DRAW(5 5 5 -5)MOVE(5 0)E()
• All commands can be located in a single line, so code:
FILL(0 0 20 5 0 -10)
M(45,0)
FOR(-45)
DRAW(0,6 6,0 0-6)
M(10,0)
END()
GOTO(100%)
COLOR(255,0,0)
FILL(0 0 -20 5 0 -10)

Can be expressed as:

I(0+0+20+5+0-10)M(45+0)F(-45)D(0+6+6+0+0-6)M(10+0)E()G(100%)C(255,0,0)I(0+0-20+5+0-10)

Examples

Example 1 FILL(0 0 20 5 0 -10)
M(45,0)
FOR(-45)
DRAW(0,6,6,0 0 -6)
M(10,0)
END()
GOTO(100%)
COLOR(255,0,0)
FILL(0 0 -20 5 0 -10)

Example 2 M(0W-25W)F()D(0W50W50W+0W0W-50W50W0W)E()

Example 3 M(0S-25S)F()D(0S50S50S+0S0S-50S50S0S)E()

Example 4 MOVE(0T-60T)
WIDTH(1)
COLOR(0,0,255)
LINE(100%)
GOTO(0%)
WIDTH(2)
COLOR(255,0,0)
FOR()
LINE(90T)
MOVE(90T0T)
END()

Example 5 M(0T60T)C(255,0,0)L(100%)G(0%)M(0T-60T)C(0,128,0)L(100%)G(0%)M(0T0T)C(64,64,64)W(3)F()L(90T)M(90T0T)E()

Editor

A built-in version of the linestyle editor is included in a legend control. 2019/10/02 14:54

Page Tools 