Difference between revisions of "Hatch drawing definition"

From wiki.fine.cz
Jump to navigation Jump to search
Line 1: Line 1:
Used to store hatch definition.
Used to store hatch definition.  


==== Data XML definition[edit | edit source] ====
==== Data XML definition[edit | edit source] ====
Line 8: Line 8:
!Default
!Default
|-
|-
|Hatch pattern
|Line direction
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Hatch</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Direction</code>
|Text identifier of Hatch pattern
|Direction of line [deg]
|(empty)
|(empty)
|-
|-
|Hatch color
|Line origin
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Color</code>
|<sup>[[Legend of XML elements|[E]]]</sup> <code>Origin</code>
|[[Colors|Color]] of the lines of the Hatch pattern
|Origin of line X, Y value in [mm]
|<code>clNone</code>
|0, 0
|-
|-
|Background color
|Line distance
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Background</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Background</code>
|Background [[Colors|color]] used to fill area (<code>clNone</code> without fill, <code>clDefault</code> filled with color calculated from Hatch color by saturation)
|Distance of parallel lines [mm]
|<code>clDefault</code>
|(empty)
|-
|-
|Background saturation
|Line shift
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Saturation</code>
|<sup>[[Legend of XML elements|[A]]]</sup> <code>Shift</code>
|Saturation of the background color for <code>clDefault</code>, range 10% to 90%
|Shift of next line (in direction of line) [mm]
|50
|(empty)
|-
|-
|Hatch definition
|Line definition
|<sup>[[Legend of XML elements|[E]]]</sup> <code>HatchDefinition</code>
|<sup>[[Legend of XML elements|[E]]]</sup> <code>Line</code>
|Definition of the [[Hatch drawing definition|hatch pattern drawing]], if ommited, hatch will be prepared using <code>Hatch</code> property
|Definition of the [[Hatch drawing definition|line]], if there is more than 1 line definition, lines are drawn in sequence Line1->Distance->Line2->Distance->...->Line1->...
|(empty)
|(empty)
|}
|}
'''Example of Data XML'''
'''Example of Data XML'''


<code><Item ID="{331AD61E-8263-4C60-B19D-B937B125F1A6}" Hatch="GEO_GRANITE" Color="$00000000" Background="clDefault" Saturation="50"></code>
<code><HatchDefinition Direction="0" Distance="2" Shift="4"></code>
 
<code>  <Line Type="ElemLine"></code>
 
<code>    <Elem Kind="Line" DX="2" DY="0" /></code>
 
<code>    <Elem Kind="Move" DX="-1" DY="1" /></code>
 
<code>    <Elem Kind="Line" DX="0" DY="-2" /></code>
 
<code>    <Elem Kind="Move" DX="7" DY="0" /></code>
 
<code>  </Line></code>


<code>  <HatchDefinition Direction="0" Distance="2" Shift="4"></code>
<code></HatchDefinition></code>


<code>    <Line Type="ElemLine"></code>


<code>      <Elem Kind="Line" DX="2" DY="0" /></code>
    FDirection         : Double;                         // smer vedeni car


<code>      <Elem Kind="Move" DX="-1" DY="1" /></code>
    FOrigin            : TUnitsPt;                       // pocatek prvni cary


<code>      <Elem Kind="Line" DX="0" DY="-2" /></code>
    FDistance          : TE2RandomUnitsSize;             // vzdalenost mezi carami


<code>      <Elem Kind="Move" DX="7" DY="0" /></code>
    FShift             : TE2RandomUnitsSize;             // posun pocatku car


<code>    </Line></code>
    FLines             : TBsFastObjectList;              // seznam car


<code>  </HatchDefinition></code>
    FWidth             : PUnitsSize;                     // tloustka car vyplne (NIL = pouziti DefaultPen)


<code></Item></code>
    FColor             : TColor;                         // barva carove vyplne (clDefault = pouziti DefaultPen/DefaultBrush)

Revision as of 15:45, 31 May 2022

Used to store hatch definition.

Data XML definition[edit | edit source]

Property XML Description Default
Line direction [A] Direction Direction of line [deg] (empty)
Line origin [E] Origin Origin of line X, Y value in [mm] 0, 0
Line distance [A] Background 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)

Example of Data XML

<HatchDefinition 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>

</HatchDefinition>


    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)