Difference between revisions of "Shape drawing definition"

From wiki.fine.cz
Jump to navigation Jump to search
Line 10: Line 10:
!Default
!Default
|-
|-
|Sample size ratio
|VErtical alignment
|<sup>[[Legend of XML elements|[A]]]</sup> <code>WidthToHeightRatio</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>AlignVErt</code>
|Must be set to 2
|Alignment of insertion point: <code>Top</code>, <code>Center</code> or <code>Bottom</code>
|(empty)
|(empty)
|-
|
|
|
|
|-
|-
|Shapes to draw
|Shapes to draw
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ElemShapes</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>ElemShape</code>
|Shapes, that are drawn
|Shapes that are drawn (one or more elements)
|(empty)
|(empty)
|}
|}
<code><ShapeDefinition VerticalAlign="Center"></code>
<code><ShapeDefinition AlignVert="Center"></code>


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


<code>      <Pt1 X="0" Y="0" /></code>
<code>      <Pt1 X="0" Y="0" /></code>
Line 35: Line 30:
<code>    </ElemShape></code>
<code>    </ElemShape></code>


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


<code>      <Pt X="0.5" Y="0" /></code>
<code>      <Pt X="0.5" Y="0" /></code>
Line 48: Line 43:


===== ElemShape =====
===== ElemShape =====
Element of shape
Element of shape.
{| class="wikitable"
{| class="wikitable"
!Property
!Property

Revision as of 13:07, 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)
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="$00FF0000" LineWidth="0.2" 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