******************************************************************************
  HEXMAP COMPONENT  version 1.0

  This component implements a Hexagonal Grid, similer to grids used in
  various wargames.

  All source copyright 1997  Patrick Kemp ( Cynewulf@qadas.com )

  Last modified - 1/21/97
  modified by Patrick Kemp


  NOTES:  Hexagons drawn by this unit are NOT perfect Hexagons.  When I
          was designing this, I used graph paper to draw the Hexagons and
          Hexgrids in order to see the relationships.  Because of the graph
          paper, the Hexagons were elongated slightly.  This didn't bother
          me all that much as it made the Math easier.

          Hit testing is done similar to the technique of finding a mouse
          hit whithin a grid (dividing mouse x/y by number of rows/cols -
          except in this case every other col is lower by half a hex .)
          Basicly, it's like overlaying each hex with a rectangle....
               ______        ______
             /|    \ |     /|    \ |
            / |     \|____/_|     \|
            \ |     /|    \ |     /|
             \|____/_|     \|____/_|
             /|    \ |     /|    \ |
            / |     \|____/_|     \|
            \ |     /|    \ |     /|
             \|____/_|     \|____/_|
             /|    \ |     /|    \ |
            / |     \|____/_|     \|

          I added a 1/8 hex offset to the x in order to center the rects
          better over each hex.  There is still some places where the mouse
          will return a wrong row/col but these are only at the extreme
          left / right corners.  I feel that the error is small enough
          not to be an issue as most hits will be close to a hexes center.
          Take a look at the demo program to see how unsignificant the problem
          is...

          I was planning to add a couple more features before releasing this,
          but decided it was functional enough to distribute as is.  I will
          add the other features in a later version if there is an interest.

          KNOWN ISSUES
            So Far the only known issue is a problem changing font attributes.
          To see this, run the demo and change the font.  You will
          notice that nothing happens until you change some other property
          of the hex grid... I'm working on this, If anyone has any Ideas or
          a fix...PLEASE let me know!


          This component is being Released as freeware.  If you find it
          usefull all I ask is you let me know.  If you modify it I ask
          you share any changes with me.

*******************************************************************************
INSTALLATION
(NOTE! See your delphi documentation for detailed Help on installing components)

Place Hexmap.pas and Hexmap.dcr into the Directory you place your component sources.
Select <Options>-<Install Componants> from the menu.  Select <Add> and enter path to
the componant.  Select <OK> to accept then <OK> to rebuild library.

*******************************************************************************

The demo's executable is included so there is no need to complile it from the
source.  However, I have included the source in case you decide you want to go
that route.

********************************************************************************

Comments are welcome.  I can be reached by e-mail at

Cynewulf@qadas.com


Hope you find this component usefull! :)