Version 21 of Hatch Patterns

Updated 2011-11-21 13:54:38 by VH

General

Hatch patterns are commonly used in graphics software to highlight distinct areas of a map or drawing. There are three general techniques for filling in polygonal areas on a software canvas:

  • flood with a single defined colour - currently this method is supported by the Tk canvas.
  • fill with tiled raster image (the wiki page discussing bitmap indicates that this is possible in tk also) and
  • fill with repeated vector pattern

This page is dedicated to the discussion of the repeated vector pattern. There is an interesting article on wikipedia.org on the origins of hatching in heraldry. Hatching provided a way to distinguish drawn features on uncoloured surfaces such as stone. This was still true right up through the period before coloured plotters, printers and photocopiers allowed large plans to be printed and reproduced in full colour. It is arguably true that hatch patterns still have a place in modern graphics.

Hatch Definitions

Hatch pattern definitions are generally defined in ASCII text .pat file. The official http://docs.autodesk.com/ACD/2010/ENU/AutoCAD%202010%20User%20documentation/index.html?url=WS73099cc142f4875513fb5cd10c4aa30d6b-7e57.htm,topicNumber=d0e368209%|%documentation%|% from the Autodesk website for the popular commercial hatch definition format. There are many free definition files available at various places (here , for example) around the web, though there doesn't seem to be as many free libraries as there used to, and in particular, there doesn't seem to be any truly "open source" .pat files available.

Manipulating Hatch Definition File

Rendering Hatch Patterns

Examples of hatch patterns, rendered with tcl and pdf4tcl .