Difference between revisions of "Shape drawing definition"

From wiki.fine.cz
Jump to navigation Jump to search
Line 1: Line 1:
Definition of shape drawn
Definition of shape drawn. There are two types of shape: <code>Sample</code> and <code>Picture</code>
 
==== Sample ====


==== Data XML definition ====
==== Data XML definition ====
Line 8: Line 10:
!Default
!Default
|-
|-
|Line type
|Sample size ratio
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Type</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>WidthToHeightRatio</code>
|Type of line defined as <code>StandardLine</code> or <code>ElemeLine</code>
|Must be set to 2
|(empty)
|-
|
|
|
|
|-
|Shapes to draw
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ElemShapes</code>
|Shapes, that are drawn
|(empty)
|(empty)
|}
|}
<code><ShapeDefinition WidthToHeightRatio="2" DefaultAlign="Center" DefaultColor="$00FF0000"></code>
<code><ShapeDefinition DefaultAlign="Center"></code>
 
<code>  <ElemShapes></code>


<code>    <ElemShape Kind="Line" Color="clDefault" LineWidth="nan" Mirror="true"></code>
<code>    <ElemShape Kind="Line" Color="clDefault" LineWidth="nan" Mirror="true"></code>
Line 39: Line 49:
<code>    </ElemShape></code>
<code>    </ElemShape></code>


<code>  </ElemShapes></code>
<code></ShapeDefinition></code>
 
===== ElemShape =====
Element of shape
{| class="wikitable"
!Property
!XML
!Description
!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>Text</code>
|(empty)
|}
 
====== Line ======
Following elements are drawn with default width.
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|Color of element
|(empty)
|-
|Line width
|<sup>[[Legend of XML elements|[A]]]</sup> <code>LineWidth</code>
|Thickness of pen [mm], if folowed by *, means multiple of default width
|(empty)
|}
<code><ElemShape Kind="Line" Color="clDefault" LineWidth="nan" Mirror="true"></code>
 
<code>  <Pt1 X="0" Y="0" /></code>
 
<code>  <Pt2 X="0.5" Y="0" /></code>
 
<code></ElemShape></code>
 
====== Polygon ======
Following elements are drawn with default color.
 
====== Width[edit | edit source] ======
Following elements are drawn with given width.
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Width
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ToolWidth</code>
|Thickness of following elements [mm], if folowed by *, means multiple of default width
|(empty)
|}
 
====== Color[edit | edit source] ======
Following elements are drawn with given color.
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Color
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|[[Colors|Color]] of following elements
|(empty)
|}
 
====== Move[edit | edit source] ======
Move to next position.
 
<code><Elem Kind="Move" DX="2" DY="0" /></code>


<code>  <DefaultLineWidth Size="0.2" /></code>
====== Line[edit | edit source] ======
Draw line to next position.


<code>  <DefaultTextHeight Size="3" /></code>
<code><Elem Kind="Line" DX="2" DY="0" /></code>


<code></ShapeDefinition></code>
====== Point[edit | edit source] ======
Draw point.
 
====== Circle[edit | edit source] ======
Draw circle.
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Radius
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Radius</code>
|Radius of circle [mm]
|(empty)
|-
|Fill
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ShapeFilled</code>
|Draw filled
|(empty)
|}
<code><Elem Kind="Circle" Radius="1" ShapeFilled="false" /></code>
 
====== RegularPolygon[edit | edit source] ======
Draw regular polygon.
{| class="wikitable"
!Property
!XML
!Description
!Default
|-
|Radius
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Radius</code>
|Radius of regular polygon
|(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)
|}
<code><Elem Kind="RegularPolygon" Radius="0.5" ShapeFilled="true" PolygonN="4" PolygonAngle="0.785398163397448" /></code>
 
==== Picture ====

Revision as of 14:54, 6 June 2022

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

Sample

Data XML definition

Property XML Description Default
Sample size ratio [A] WidthToHeightRatio Must be set to 2 (empty)
Shapes to draw [A] ElemShapes Shapes, that are drawn (empty)

<ShapeDefinition DefaultAlign="Center">

    <ElemShape Kind="Line" Color="clDefault" LineWidth="nan" Mirror="true">

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

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

    </ElemShape>

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

      <Points>

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

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

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

      </Points>

    </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)
Line

Following elements are drawn with default width.

Property XML Description Default
Color [A] Color Color of element (empty)
Line width [A] LineWidth Thickness of pen [mm], if folowed by *, means multiple of default width (empty)

<ElemShape Kind="Line" Color="clDefault" LineWidth="nan" Mirror="true">

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

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

</ElemShape>

Polygon

Following elements are drawn with default color.

Width[edit | edit source]

Following elements are drawn with given width.

Property XML Description Default
Width [A] ToolWidth Thickness of following elements [mm], if folowed by *, means multiple of default width (empty)
Color[edit | edit source]

Following elements are drawn with given color.

Property XML Description Default
Color [A] Color Color of following elements (empty)
Move[edit | edit source]

Move to next position.

<Elem Kind="Move" DX="2" DY="0" />

Line[edit | edit source]

Draw line to next position.

<Elem Kind="Line" DX="2" DY="0" />

Point[edit | edit source]

Draw point.

Circle[edit | edit source]

Draw circle.

Property XML Description Default
Radius [A] Radius Radius of circle [mm] (empty)
Fill [A] ShapeFilled Draw filled (empty)

<Elem Kind="Circle" Radius="1" ShapeFilled="false" />

RegularPolygon[edit | edit source]

Draw regular polygon.

Property XML Description Default
Radius [A] Radius Radius of regular polygon (empty)
Fill [A] ShapeFilled Draw filled (empty)
Vertices count [A] PolygonN Number of vertices of regular polygon (empty)
Polygon orientation [A] PolygonAngle Orientation of regular polygon (empty)

<Elem Kind="RegularPolygon" Radius="0.5" ShapeFilled="true" PolygonN="4" PolygonAngle="0.785398163397448" />

Picture