Difference between revisions of "Shape drawing definition"

From wiki.fine.cz
Jump to navigation Jump to search
Line 53: Line 53:
|<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> or <code>Text</code>
|(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 63: Line 67:
!Description
!Description
!Default
!Default
|-
|Start point
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Pt1</code>
|Start point of line, the coordinates are ralative 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 ralative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner
|(empty)
|-
|-
|Color
|Color
Line 71: Line 85:
|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 96:
<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
 
====== Width[edit | edit source] ======
Following elements are drawn with given width.
{| class="wikitable"
{| class="wikitable"
!Property
!Property
Line 93: Line 104:
!Default
!Default
|-
|-
|Width
|Color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ToolWidth</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|Thickness of following elements [mm], if folowed by *, means multiple of default width
|Color of element
|(empty)
|-
|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)
|-
|Points
|<sup>[[Legend of XML elements|[E]]]</sup> <code>Pt</code>
|Two or more points, the coordinates are ralative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner
|(empty)
|(empty)
|}
|}
 
====== Circle ======
====== Color[edit | edit source] ======
Following elements are drawn with given color.
{| class="wikitable"
{| class="wikitable"
!Property
!Property
Line 109: Line 128:
|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)
|(empty)
|}
====== Move[edit | edit source] ======
Move to next position.
<code><Elem Kind="Move" DX="2" DY="0" /></code>
====== Line[edit | edit source] ======
Draw line to next position.
<code><Elem Kind="Line" DX="2" DY="0" /></code>
====== Point[edit | edit source] ======
Draw point.
====== Circle[edit | edit source] ======
Draw circle.
{| class="wikitable"
!Property
!XML
!Description
!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 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)
|-
|-
|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 ralative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner
|(empty)
|(empty)
|}
|}
<code><Elem Kind="Circle" Radius="1" ShapeFilled="false" /></code>
====== Text ======
 
====== RegularPolygon[edit | edit source] ======
Draw regular polygon.
{| class="wikitable"
{| class="wikitable"
!Property
!Property
Line 154: Line 148:
!Default
!Default
|-
|-
|Radius
|Color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Radius</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|Radius of regular polygon
|[[Colors|Color]] of following elements
|(empty)
|-
|Fill
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ShapeFilled</code>
|Draw filled
|(empty)
|-
|Vertices count
|<sup>[[Legend of XML elements|[A]]]</sup> <code>PolygonN</code>
|Number of vertices of regular polygon
|(empty)
|-
|Polygon orientation
|<sup>[[Legend of XML elements|[A]]]</sup> <code>PolygonAngle</code>
|Orientation of regular polygon
|(empty)
|(empty)
|}
|}
<code><Elem Kind="RegularPolygon" Radius="0.5" ShapeFilled="true" PolygonN="4" PolygonAngle="0.785398163397448" /></code>


==== Picture ====
==== Picture ====

Revision as of 14:08, 7 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] AlignVErt Alignment of insertion point: Top, Center or Bottom (empty)
Shapes to draw [A] ElemShape Shapes that are drawn (one or more elements) (empty)

<ShapeDefinition AlignVert="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 or Text (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 ralative 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 ralative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner (empty)
Color [A] Color Color of element (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
Color [A] Color Color of element (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)
Points [E] Pt Two or more points, the coordinates are ralative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner (empty)
Circle
Property XML Description Default
Color [A] Color Color of element (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)
Points [E] Pt Two or more points, the coordinates are ralative to drawing area [0, 0] is bottom left corner, [1, 1] is right top corner (empty)
Text
Property XML Description Default
Color [A] Color Color of following elements (empty)

Picture