Difference between revisions of "Shape drawing definition"

From wiki.fine.cz
Jump to navigation Jump to search
m
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Definition of shape drawn. There are two types of shape: <code>Sample</code> and <code>Picture</code>
Definition of shape drawn. There are two types of shape: <code>Sample</code> and <code>Picture</code>


==== Sample ====
=== '''Sample''' ===
 
----'''Data XML definition'''
==== Data XML definition ====
{| class="wikitable"
{| class="wikitable"
!Property
!Property
Line 10: Line 9:
!Default
!Default
|-
|-
|VErtical alignment
|Vertical alignment
|<sup>[[Legend of XML elements|[A]]]</sup> <code>AlignVErt</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>VertAlign</code>
|Alignment of insertion point: <code>Top</code>, <code>Center</code> or <code>Bottom</code>
|Alignment of insertion point: <code>Top</code>, <code>Center</code> or <code>Bottom</code>
|(empty)
|(empty)
Line 20: Line 19:
|(empty)
|(empty)
|}
|}
<code><ShapeDefinition AlignVert="Center"></code>
<code><ShapeDefinition VertAlign="Center"></code>


<code>    <ElemShape Kind="Line" Color="$00FF0000" LineWidth="nan" Mirror="true"></code>
<code>    <ElemShape Kind="Line" Color="$00FF0000" LineWidth="nan" Mirror="true"></code>
Line 42: Line 41:
<code></ShapeDefinition></code>
<code></ShapeDefinition></code>


===== ElemShape =====
'''ElemShape'''
 
Element of shape.
Element of shape.
{| class="wikitable"
{| class="wikitable"
Line 52: Line 52:
|Element type
|Element type
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Kind</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Kind</code>
|Type of element defined as <code>Line</code>, <code>Polygon</code>, <code>Polyline</code> or <code>Text</code>
|Type of element defined as <code>Line</code>, <code>Polygon</code>, <code>Polyline</code>, <code>Circle</code> or <code>Text</code>
|(empty)
|-
|Color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|Color of element
|(empty)
|-
|Mirror
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Mirror</code>
|Boolean value. If <code>true</code>, the shape is mirrored if user selects align to right in column definition
|(empty)
|(empty)
|}
|}
 
'''Line'''
====== Line ======
Following elements are drawn with default width.
{| class="wikitable"
{| class="wikitable"
!Property
!Property
Line 64: Line 72:
!Default
!Default
|-
|-
|Color
|Start point
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Pt1</code>
|Color of element
|Start point of line, the coordinates are relative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner
|(empty)
|-
|End point
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Pt2</code>
|End point of line, the coordinates are relative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner
|(empty)
|(empty)
|-
|-
|Line width
|Line width
|<sup>[[Legend of XML elements|[A]]]</sup> <code>LineWidth</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>LineWidth</code>
|Thickness of pen [mm], if folowed by *, means multiple of default width
|Thickness of pen as multiplier of default pen width <code>nan</code> or <code>1.0</code> for default width, <code>0.5</code> fot thin line and <code>2.0</code> for thick line
|(empty)
|(empty)
|}
|}
Line 82: Line 95:
<code></ElemShape></code>
<code></ElemShape></code>


====== Polygon ======
'''Polygon/Polyline'''
Following elements are drawn with default color.
 
Polygon is closed and Polyline is open. The parameters are same
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Line width
|<sup>[[Legend of XML elements|[A]]]</sup> <code>LineWidth</code>
|Thickness of pen as multiplier of default pen width <code>nan</code> or <code>1.0</code> for default width, <code>0.5</code> fot thin line and <code>2.0</code> for thick line
|(empty)
|-
|Fill color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>FillColor</code>
|[[Colors|Color]] of elements fill, <code>clNone</code> for no fill
|(empty)
|-
|Points
|<sup>[[Legend of XML elements|[E]]]</sup> <code>Pt</code>
|Two or more points, the coordinates are relative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner
|(empty)
|}
'''Circle'''
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Line width
|<sup>[[Legend of XML elements|[A]]]</sup> <code>LineWidth</code>
|Thickness of pen as multiplier of default pen width <code>nan</code> or <code>1.0</code> for default width, <code>0.5</code> fot thin line and <code>2.0</code> for thick line
|(empty)
|-
|Center
|<sup>[[Legend of XML elements|[E]]]</sup> <code>Center</code>
|Center of circle, the coordinates are relative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner
|(empty)
|-
|Radius
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Radius</code>
|Radius of circle, in range (0, 0.5>, where 0.5 is circle of diameter same as height of input rectangle
|(empty)
|-
|Fill color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>FillColor</code>
|[[Colors|Color]] of elements fill, <code>clNone</code> for no fill
|(empty)
|}
'''Text'''
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Text
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Text</code>
|Text of element
|(empty)
|-
|Horizontal position
|<sup>[[Legend of XML elements|[A]]]</sup> <code>PtX</code>
|Horizontal position of text, in range <0, 1>, where 0 is left and 1 is right
|(empty)
|-
|Horizontal alignment
|<sup>[[Legend of XML elements|[A]]]</sup> <code>AlignHorz</code>
|Horizontal alignment of text: <code>Left</code>, <code>Center</code> or <code>Right</code>
|(empty)
|}


====== Width[edit | edit source] ======
=== '''Picture''' ===
Following elements are drawn with given width.
----'''Data XML definition'''
{| class="wikitable"
{| class="wikitable"
!Property
!Property
Line 93: Line 177:
!Default
!Default
|-
|-
|Width
|Vertical alignment
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ToolWidth</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>VertAlign</code>
|Thickness of following elements [mm], if folowed by *, means multiple of default width
|Alignment of insertion point: <code>Top</code>, <code>Center</code> or <code>Bottom</code>
|(empty)
|-
|Shapes to draw
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ElemShape</code>
|Shapes that are drawn (one or more elements)
|(empty)
|(empty)
|}
|}
<code><ShapeDefinition></code>
<code>    <ElemShape Kind="Line" Color="$00FF0000" LineWidth="0.25"></code>
<code>      <Pt1 X="0" Y="0" /></code>
<code>      <Pt2 X="12.0" Y="1.0" /></code>
<code>    </ElemShape></code>
<code>    <ElemShape Kind="Polygon" Color="$00FF0000" FillColor="$00FFC0C0" LineWidth="0.25"></code>
<code>      <Pt X="12.0" Y="0.0" /></code>
<code>      <Pt X="13.0" Y="10.0" /></code>
<code>      <Pt X="6.0" Y="1.0" /></code>
<code>    </ElemShape></code>
<code></ShapeDefinition></code>
'''ElemShape'''


====== Color[edit | edit source] ======
Element of shape.
Following elements are drawn with given color.
{| class="wikitable"
{| class="wikitable"
!Property
!Property
Line 106: Line 217:
!Description
!Description
!Default
!Default
|-
|Element type
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Kind</code>
|Type of element defined as <code>Line</code>, <code>Polygon</code>, <code>Polyline</code> or <code>Circle</code>
|(empty)
|-
|-
|Color
|Color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|[[Colors|Color]] of following elements
|Color of element
|(empty)
|}
'''Line'''
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Start point
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Pt1</code>
|Start point of line, the coordinates are in [mm]
|(empty)
|-
|End point
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Pt2</code>
|End point of line, the coordinates are in [mm]
|(empty)
|-
|Line width
|<sup>[[Legend of XML elements|[A]]]</sup> <code>LineWidth</code>
|Thickness of pen in [mm]
|(empty)
|(empty)
|}
|}
<code><ElemShape Kind="Line" Color="$00FF0000" LineWidth="0.2" Mirror="true"></code>


====== Move[edit | edit source] ======
<code>  <Pt1 X="0" Y="0" /></code>
Move to next position.


<code><Elem Kind="Move" DX="2" DY="0" /></code>
<code>  <Pt2 X="0.5" Y="0" /></code>


====== Line[edit | edit source] ======
<code></ElemShape></code>
Draw line to next position.
 
<code><Elem Kind="Line" DX="2" DY="0" /></code>


====== Point[edit | edit source] ======
'''Polygon/Polyline'''
Draw point.


====== Circle[edit | edit source] ======
Polygon is closed and Polyline is open. The parameters are same
Draw circle.
{| class="wikitable"
{| class="wikitable"
!Property
!Property
Line 134: Line 267:
!Default
!Default
|-
|-
|Radius
|Line width
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Radius</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>LineWidth</code>
|Radius of circle [mm]
|Thickness of pen in [mm]
|(empty)
|-
|Fill color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>FillColor</code>
|[[Colors|Color]] of elements fill, <code>clNone</code> for no fill
|(empty)
|(empty)
|-
|-
|Fill
|Points
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ShapeFilled</code>
|<sup>[[Legend of XML elements|[E]]]</sup> <code>Pt</code>
|Draw filled
|Two or more points, the coordinates are in [mm]
|(empty)
|(empty)
|}
|}
<code><Elem Kind="Circle" Radius="1" ShapeFilled="false" /></code>
'''Circle'''
 
====== RegularPolygon[edit | edit source] ======
Draw regular polygon.
{| class="wikitable"
{| class="wikitable"
!Property
!Property
Line 154: Line 289:
!Default
!Default
|-
|-
|Radius
|Line width
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Radius</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>LineWidth</code>
|Radius of regular polygon
|Thickness of pen in [mm]
|(empty)
|(empty)
|-
|-
|Fill
|Center
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ShapeFilled</code>
|<sup>[[Legend of XML elements|[E]]]</sup> <code>Center</code>
|Draw filled
|Center of circle, the coordinates are in [mm]
|(empty)
|(empty)
|-
|-
|Vertices count
|Radius
|<sup>[[Legend of XML elements|[A]]]</sup> <code>PolygonN</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Radius</code>
|Number of vertices of regular polygon
|Radius of circle in [mm]
|(empty)
|(empty)
|-
|-
|Polygon orientation
|Fill color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>PolygonAngle</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>FillColor</code>
|Orientation of regular polygon
|[[Colors|Color]] of elements fill, <code>clNone</code> for no fill
|(empty)
|(empty)
|}
|}
<code><Elem Kind="RegularPolygon" Radius="0.5" ShapeFilled="true" PolygonN="4" PolygonAngle="0.785398163397448" /></code>
==== Picture ====

Latest revision as of 15:08, 23 June 2022

Definition of shape drawn. There are two types of shape: Sample and Picture

Sample


Data XML definition

Property XML Description Default
Vertical alignment [A] VertAlign Alignment of insertion point: Top, Center or Bottom (empty)
Shapes to draw [A] ElemShape Shapes that are drawn (one or more elements) (empty)

<ShapeDefinition VertAlign="Center">

    <ElemShape Kind="Line" Color="$00FF0000" LineWidth="nan" Mirror="true">

      <Pt1 X="0" Y="0" />

      <Pt2 X="0.5" Y="0" />

    </ElemShape>

    <ElemShape Kind="Polygon" Color="$00FF0000" FillColor="$00FFC0C0" LineWidth="nan" Mirror="false">

      <Pt X="0.5" Y="0" />

      <Pt X="0.75" Y="1" />

      <Pt X="0.25" Y="1" />

    </ElemShape>

</ShapeDefinition>

ElemShape

Element of shape.

Property XML Description Default
Element type [A] Kind Type of element defined as Line, Polygon, Polyline, Circle or Text (empty)
Color [A] Color Color of element (empty)
Mirror [A] Mirror Boolean value. If true, the shape is mirrored if user selects align to right in column definition (empty)

Line

Property XML Description Default
Start point [A] Pt1 Start point of line, the coordinates are relative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner (empty)
End point [A] Pt2 End point of line, the coordinates are relative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner (empty)
Line width [A] LineWidth Thickness of pen as multiplier of default pen width nan or 1.0 for default width, 0.5 fot thin line and 2.0 for thick line (empty)

<ElemShape Kind="Line" Color="$00FF0000" LineWidth="0.2" Mirror="true">

  <Pt1 X="0" Y="0" />

  <Pt2 X="0.5" Y="0" />

</ElemShape>

Polygon/Polyline

Polygon is closed and Polyline is open. The parameters are same

Property XML Description Default
Line width [A] LineWidth Thickness of pen as multiplier of default pen width nan or 1.0 for default width, 0.5 fot thin line and 2.0 for thick line (empty)
Fill color [A] FillColor Color of elements fill, clNone for no fill (empty)
Points [E] Pt Two or more points, the coordinates are relative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner (empty)

Circle

Property XML Description Default
Line width [A] LineWidth Thickness of pen as multiplier of default pen width nan or 1.0 for default width, 0.5 fot thin line and 2.0 for thick line (empty)
Center [E] Center Center of circle, the coordinates are relative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner (empty)
Radius [A] Radius Radius of circle, in range (0, 0.5>, where 0.5 is circle of diameter same as height of input rectangle (empty)
Fill color [A] FillColor Color of elements fill, clNone for no fill (empty)

Text

Property XML Description Default
Text [A] Text Text of element (empty)
Horizontal position [A] PtX Horizontal position of text, in range <0, 1>, where 0 is left and 1 is right (empty)
Horizontal alignment [A] AlignHorz Horizontal alignment of text: Left, Center or Right (empty)

Picture


Data XML definition

Property XML Description Default
Vertical alignment [A] VertAlign Alignment of insertion point: Top, Center or Bottom (empty)
Shapes to draw [A] ElemShape Shapes that are drawn (one or more elements) (empty)

<ShapeDefinition>

    <ElemShape Kind="Line" Color="$00FF0000" LineWidth="0.25">

      <Pt1 X="0" Y="0" />

      <Pt2 X="12.0" Y="1.0" />

    </ElemShape>

    <ElemShape Kind="Polygon" Color="$00FF0000" FillColor="$00FFC0C0" LineWidth="0.25">

      <Pt X="12.0" Y="0.0" />

      <Pt X="13.0" Y="10.0" />

      <Pt X="6.0" Y="1.0" />

    </ElemShape>

</ShapeDefinition>

ElemShape

Element of shape.

Property XML Description Default
Element type [A] Kind Type of element defined as Line, Polygon, Polyline or Circle (empty)
Color [A] Color Color of element (empty)

Line

Property XML Description Default
Start point [A] Pt1 Start point of line, the coordinates are in [mm] (empty)
End point [A] Pt2 End point of line, the coordinates are in [mm] (empty)
Line width [A] LineWidth Thickness of pen in [mm] (empty)

<ElemShape Kind="Line" Color="$00FF0000" LineWidth="0.2" Mirror="true">

  <Pt1 X="0" Y="0" />

  <Pt2 X="0.5" Y="0" />

</ElemShape>

Polygon/Polyline

Polygon is closed and Polyline is open. The parameters are same

Property XML Description Default
Line width [A] LineWidth Thickness of pen in [mm] (empty)
Fill color [A] FillColor Color of elements fill, clNone for no fill (empty)
Points [E] Pt Two or more points, the coordinates are in [mm] (empty)

Circle

Property XML Description Default
Line width [A] LineWidth Thickness of pen in [mm] (empty)
Center [E] Center Center of circle, the coordinates are in [mm] (empty)
Radius [A] Radius Radius of circle in [mm] (empty)
Fill color [A] FillColor Color of elements fill, clNone for no fill (empty)