Command: hatchstyle

Syntax

hatchstyle <name> {
    <stroke_def>
    ...
}

or

hatchstyle <name> = <ident>

Description

Create or redefine a hatchstyle identifier.

Parameters

Switches

None

Block

The data block containing multiple <stroke_def> phrases. Available phrases are as follows:

Phrases apply only to the stroke definition of which they are a part. They do not apply to other strokes unless included in those stroke definitions.

Notes

Multiple stroke definitions create a hatchstyle identifier array, but the identifier <name> should not be declared as an array. The array creation is performed automatically.

If no color is provided in a stroke, a default foreground color (usually black) is used.

Hatchstyle identifiers can have global or application scope, but cannot have local scope. When local hatchstyle identifiers are required, string identifiers should be used to reference the hatchstyles by name.

Examples

Simple single stroke pattern.

hatchstyle hatch_45 { a=45, g=50 }

Simple cross-hatch pattern.

hatchstyle cross_hatch {
    a=45, g=100
    a=135, g=100
}

Multi-colored tartan pattern (four- strokes).

hatchstyle macduff {
    col=blue, a=45, g=125
    col=blue, a=45, o=25, g=125
    col=green, a=135, g=50
    col=green, a=135, o=10, g=50
}

A three-stroke pattern.

hatchstyle my_hatch {
    a=0, g=100; # Continuous.
    a=0, o=50, g=100, ls=dot_dash; # Dot-Dash.
    a=90, g=200; # Thick vertical bars.
}

A general hatch pattern for screen display only with gaps of 20 pixels

hatchstyle screen_20 {
    su=p, a=45, g=20
    su=p, a=135, g=20; # Note: p in both lines.
}

Make a copy of a hatchstyle.

hatchstyle new_hatch = cross_hatch

See Also

Commands:

color, fillstyle, list, tile

Identifiers:

scope (atable)

Structures:

fillstyle, hatchstyle