Hatch drawing definition

From wiki.fine.cz
Revision as of 06:37, 1 June 2022 by Jan.Gajdosik (talk | contribs)
Jump to navigation Jump to search

Used to store hatch definition.

Data XML definition [edit | edit source]

Property XML Description Default
Type [A] Type Type of hatch, possible values StandardFill, LineFill, CompositeFill (empty)
Line origin [E] Origin Origin of line X, Y value in [mm] 0, 0
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 - Single line hatch

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

Example of Data XML - Multiple line hatch

<HatchDefinition>

<Fill Type="LineFill" Direction="45" Distance="6" Shift="3">

<Line Type="ElemLine">

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

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

</Line>

</Fill>

<Fill Type="LineFill" Direction="45" Distance="6" Shift="1.2">

<Line Type="ElemLine">

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

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

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

</Line>

</Fill>

</HatchDefinition>

<Hatch ID="GINT_BLDRCBBL" Number="4">                                                                                   

  <Fill Type="StandardFill" Style="Solid" />                                                                           

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

</Hatch>                                                                                                               


    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)