Difference between revisions of "Hatch drawing definition"
Jan.Gajdosik (talk | contribs) |
Jan.Gajdosik (talk | contribs) |
||
Line 1: | Line 1: | ||
Used to store hatch definition. | Used to store hatch definition. Hatch contains serie (one or more) of fills. There are three types of fills. | ||
==== Data XML definition ==== | ==== Data XML definition ==== | ||
Line 29: | Line 29: | ||
'''Example of Data XML''' | '''Example of Data XML''' | ||
<code>< | <code><Fill Type="StandardFill" Color="clFill"></code> | ||
===== LineFill ===== | ===== LineFill ===== | ||
Line 50: | Line 50: | ||
|- | |- | ||
|Line distance | |Line distance | ||
|<sup>[[Legend of XML elements|[A]]]</sup> <code> | |<sup>[[Legend of XML elements|[A]]]</sup> <code>Distance</code> | ||
|Distance of parallel lines [mm] | |Distance of parallel lines [mm] | ||
|(empty) | |(empty) | ||
Line 71: | Line 71: | ||
'''Example of Data XML''' | '''Example of Data XML''' | ||
<code>< | <code><Fill Direction="0" Distance="2" Shift="4"></code> | ||
<code> <Line Type="ElemLine"></code> | <code> <Line Type="ElemLine"></code> | ||
Line 85: | Line 85: | ||
<code> </Line></code> | <code> </Line></code> | ||
<code></ | <code></Fill></code> | ||
===== CompositeFill ===== | ===== CompositeFill ===== | ||
Line 103: | Line 103: | ||
'''Example of Data XML - Multiple line hatch''' | '''Example of Data XML - Multiple line hatch''' | ||
<code>< | <code><Fill Type="CompositeFill"></code> | ||
<code> <Fill Type="StandardFill" /></code> | <code> <Fill Type="StandardFill" /></code> | ||
Line 349: | Line 349: | ||
<code> </Fill></code> | <code> </Fill></code> | ||
<code></ | <code></Fill></code> | ||
Revision as of 06:32, 6 June 2022
Used to store hatch definition. Hatch contains serie (one or more) of fills. There are three types of fills.
Data XML definition
Property | XML | Description | Default |
---|---|---|---|
Type | [A] Type
|
Type of hatch, possible values StandardFill , LineFill or CompositeFill
|
(empty) |
StandardFill
Area filled with solid color.
Property | XML | Description | Default |
---|---|---|---|
Color | [A] Color
|
Color of fill | clDefault
|
Example of Data XML
<Fill Type="StandardFill" Color="clFill">
LineFill
Area filled with sequence of lines separated by distance. All lines are oriented in one direction.
Property | XML | Description | Default |
---|---|---|---|
Line direction | [A] Direction
|
Direction of line [rad] | (empty) |
Line origin | [E] Origin
|
Point defining origin of the line [mm] | 0, 0 |
Line distance | [A] Distance
|
Distance of parallel lines [mm] | (empty) |
Line shift | [A] Shift
|
Shift of next line (in direction of line) [mm] | (empty) |
Line definition | [E] Line
|
Definition of the line, if there is more than 1 line definition, lines are drawn in sequence Line1->Distance->Line2->Distance->...->Line1->... | (empty) |
Color | [A] Color
|
Color of fill | clDefault
|
Example of Data XML
<Fill Direction="0" Distance="2" Shift="4">
<Line Type="ElemLine">
<Elem Kind="Line" DX="2" DY="0" />
<Elem Kind="Move" DX="-1" DY="1" />
<Elem Kind="Line" DX="0" DY="-2" />
<Elem Kind="Move" DX="7" DY="0" />
</Line>
</Fill>
CompositeFill
this type is aggregate for drawing multiple fill in same area.
Property | XML | Description | Default |
---|---|---|---|
Fill | [E] Fill
|
Definition of child hatch. May contain one or more fills. | (empty) |
Example of Data XML - Multiple line hatch
<Fill Type="CompositeFill">
<Fill Type="StandardFill" />
<Fill Type="CompositeFill">
<Fill Type="LineFill" Direction="0" Distance="9" Color="clFill">
<Line Type="ElemLine">
<Elem Kind="Move" DX="1.5" DY="0" />
<Elem Kind="Polygon" ShapeFilled="true">
<Pt X="0" Y="0" />
<Pt X="-0.75" Y="1.25" />
<Pt X="-0.75" Y="2.25" />
<Pt X="-0.25" Y="2.5" />
<Pt X="1.75" Y="2.25" />
<Pt X="2" Y="1" />
<Pt X="2.25" Y="0.75" />
<Pt X="1.5" Y="0" />
</Elem>
<Elem Kind="Move" DX="3.75" DY="0" />
<Elem Kind="Polygon" ShapeFilled="true">
<Pt X="0" Y="0.25" />
<Pt X="-0.25" Y="1.25" />
<Pt X="0.5" Y="1.5" />
<Pt X="0.75" Y="1.25" />
<Pt X="0.75" Y="0.5" />
<Pt X="0.5" Y="0.25" />
</Elem>
<Elem Kind="Move" DX="1.25" DY="0" />
<Elem Kind="Polygon" ShapeFilled="true">
<Pt X="0" Y="2" />
<Pt X="0.25" Y="2.75" />
<Pt X="1" Y="3" />
<Pt X="1.75" Y="2.75" />
<Pt X="2.25" Y="2" />
<Pt X="2.25" Y="1.25" />
<Pt X="1.5" Y="0.75" />
<Pt X="1" Y="0.75" />
<Pt X="0.25" Y="1.25" />
</Elem>
<Elem Kind="Move" DX="2.5" DY="0" />
</Line>
</Fill>
<Fill Type="LineFill" Direction="0" Distance="9" Color="clFill">
<Origin X="0" Y="3.25" />
<Line Type="ElemLine">
<Elem Kind="Polygon" ShapeFilled="true">
<Pt X="0" Y="0.25" />
<Pt X="0" Y="1.75" />
<Pt X="1" Y="1.25" />
<Pt X="1.25" Y="0.5" />
<Pt X="0.5" Y="0" />
</Elem>
<Elem Kind="Move" DX="1.5" DY="0" />
<Elem Kind="Polygon" ShapeFilled="true">
<Pt X="0" Y="2.75" />
<Pt X="0" Y="3.5" />
<Pt X="1" Y="4" />
<Pt X="1.75" Y="3.75" />
<Pt X="2.5" Y="3.75" />
<Pt X="4" Y="3" />
<Pt X="4.5" Y="2.25" />
<Pt X="4" Y="1.5" />
<Pt X="2.5" Y="1" />
<Pt X="1.75" Y="1.25" />
<Pt X="1.5" Y="1.75" />
<Pt X="0.5" Y="2.25" />
</Elem>
<Elem Kind="Move" DX="4" DY="0" />
<Elem Kind="Polygon" ShapeFilled="true">
<Pt X="0" Y="0.25" />
<Pt X="0.125" Y="1" />
<Pt X="1.25" Y="1.25" />
<Pt X="1.75" Y="0.75" />
<Pt X="1.25" Y="0.375" />
<Pt X="0.75" Y="0" />
</Elem>
<Elem Kind="Move" DX="3.5" DY="0" />
</Line>
</Fill>
<Fill Type="LineFill" Direction="0" Distance="9" Color="clFill">
<Origin X="0" Y="6.25" />
<Line Type="ElemLine">
<Elem Kind="Move" DX="0.25" DY="0" />
<Elem Kind="Polygon" ShapeFilled="true">
<Pt X="0" Y="2" />
<Pt X="0.25" Y="2.5" />
<Pt X="1" Y="2" />
<Pt X="1" Y="1.75" />
<Pt X="0.625" Y="1.5" />
<Pt X="0.25" Y="1.75" />
</Elem>
<Elem Kind="Move" DX="3.75" DY="0" />
<Elem Kind="Polygon" ShapeFilled="true">
<Pt X="0" Y="2" />
<Pt X="0.25" Y="2.25" />
<Pt X="0.75" Y="2" />
<Pt X="0.75" Y="1.5" />
<Pt X="0.25" Y="1.5" />
</Elem>
<Elem Kind="Move" DX="1.25" DY="0" />
<Elem Kind="Polygon" ShapeFilled="true">
<Pt X="0" Y="1" />
<Pt X="0" Y="1.5" />
<Pt X="0.25" Y="1.75" />
<Pt X="0.75" Y="1.75" />
<Pt X="0.75" Y="1.25" />
<Pt X="0.75" Y="1" />
<Pt X="0.375" Y="0.75" />
</Elem>
<Elem Kind="Move" DX="1.75" DY="0" />
<Elem Kind="Polygon" ShapeFilled="true">
<Pt X="0" Y="0.5" />
<Pt X="0" Y="2.5" />
<Pt X="0.5" Y="3" />
<Pt X="1.5" Y="2.75" />
<Pt X="1.75" Y="1.5" />
<Pt X="2.25" Y="1" />
<Pt X="1.75" Y="0.25" />
<Pt X="1" Y="0" />
<Pt X="0.5" Y="0.25" />
</Elem>
<Elem Kind="Move" DX="2" DY="0" />
</Line>
</Fill>
</Fill>
</Fill>
FDirection : Double; // smer vedeni car
FOrigin : TUnitsPt; // pocatek prvni cary
FDistance : TE2RandomUnitsSize; // vzdalenost mezi carami
FShift : TE2RandomUnitsSize; // posun pocatku car
FLines : TBsFastObjectList; // seznam car
FWidth : PUnitsSize; // tloustka car vyplne (NIL = pouziti DefaultPen)
FColor : TColor; // barva carove vyplne (clDefault = pouziti DefaultPen/DefaultBrush)