# Knowledge Base

## KB10876 - Extended Line Symbology

Note!
The current version of this document is available here.
The text below should be treated as obsolete.

Current Status of Extended Line Symbology - A “Preview”

• Available as of the DK v. 10.2.0 and Editor/Viewer v. 3.5.0.
• A deeper optimization (especially on .NET) will be added later.
• Language specification should be stable.
##### Logic
• All parameters (except GOTO) are relative and move the “drawing position” cursor along the shape. The X coordinate moves cursor along the shape. The Y coordinate moves curser 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 Sample `;` Comment out whole line Added in build .10004 `;This is comment` `GOTO(x)` `G` Move drawing position along the shape to an arbitrary position. ```GOTO(10%) G(10%)``` ﻿﻿ `MOVE(dx,dy)` `M` Move drawing along line by a delta. ```MOVE(10,-10) M(+10-10)``` `DRAW(x1,y1,x2,y2,..,xn,yn)` D Draw a vector segment. ```DRAW(5,5 5 -5) D(+5+5+5-5)``` `OUTLINE(x1,y1,x2,y2,..,xn,yn)` `O` Draw a line symbol with the rotation point at the place of the current “drawing position”. Whole symbol will be rotated with the same parameters. First set of coordinates means the starting point of the shape. ```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)` `I` Draw a filled symbol with the rotation point at the place of the current “drawing position”. Whole symbol will be rotated with the same parameters. First set of coordinates means the staring point of the shape. ```FILL(5,5 -10,0 0,-10 10,0 0,-10) I(+5+5-10+0+0-10+10+0+0-10)``` `LINE(x)` `L` Draw parallel line on current “drawing position offset”. NOT WORKING YET ```LINE(100%) L(100%)``` `FOR(x)` `F` Start of the loop. Parameters for the distance the loop will be repeated. Default is 100%. A negative value means calculation starting from the end of the line. For example, FOR(-45%) means repeat until 45% of the distance of the entire line length, starting from the end of the line. ```FOR(50%) F(50%)``` `END()` `E` End of the loop. ```END() E()``` `WIDTH(x)` `W` Change line width. ```WIDTH(10W) W(10W)``` `COLOR(r,g,b)` `C` Change drawing color. ```COLOR(255,0,0) C(255,0,0)``` ﻿﻿ `COLOR(mode)` `C` Change drawing color to:   0 - line/area color   1 - outline color ```COLOR(1) C(1)```

##### Values option
 Option Description Sample None Default - pixels `GOTO(10)` `X` Device independednt pixels - 1 pixel in 96dpi. Multiplied by 10 so 10X means one "pixel" `GOTO(10X)` `T` Twips (1/1440 of inch) `GOTO(700T)` `W` Line width (as set for Line.Width) expressed multiplied by 10. So 15T means 1.5 line widths. `GOTO(15T)` `S` Line with scaled device independent pixels (similar to 'X'). Scales means that wider lines will result no proportional scaling: 10X for thin lines means really same as 10X but for wider line it will be represented by smaller value for better visual effect Added in build .10041 GOTO(10S)

##### Coding
• Values can be separated by space, coma, plus sign, or minus 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)                                         `

##### Example 2
Use of line width units (W)

`&M(0W-25W)F()D(0W50W50W+0W0W-50W50W0W)E()` ##### Example 3
Use of scaled line width (S)

`&M(0S-25S)F()D(0S50S50S+0S0S-50S50S0S)E()` Created: February 09, 2012, Modified: August 10, 2016