HTBasic Help
×
Menu
Index

Crosshatching

 
By default, areas are filled with shades of gray or color (if the COLOR option has been specified). However, you can crosshatch fill areas with the following statements:
 
INTEGER Param(1:2)            ! an array for the command
Param(1) = 1                  ! set fill type
Param(2) = state              ! turn solid filling on or off
GESCAPE CRT,104,Param(*)      ! send command 
 
State is 0 to use crosshatching and any other value to use solid filling.
When crosshatching is turned on, the following sets of statements can be used to control the crosshatch parameters.
If these statements are not executed, crosshatching is done with solid horizontal lines spaced 0.01 in. (0.4 mm) apart.
 
INTEGER Param(1:2)            ! an array for the command
Param(1) = 2                  ! set crosshatch type
Param(2) = type
GESCAPE CRT,104,Param(*)      ! send command
 
Type is 1 for single hatching, 2 for crosshatching.
 
INTEGER Param(1:2)            ! an array for the command
Param(1) = 3                  ! set hatch angle
Param(2) = angle              ! desired angle, degrees
GESCAPE CRT,104,Param(*)      ! send command  
 
Angle is the angle in degrees (regardless of the HTBasic RAD or DEG setting) for hatching. Angle is rounded to the nearest multiple of 45 degrees.
 
INTEGER Param(1:2)            ! an array for the command
Param(1) = 4                  ! set line spacing
Param(2) = spacing            ! desired spacing (in 1/100 GDU’s)
GESCAPE CRT,104,Param(*)      ! send command
INTEGER Param(1:2)            ! an array for the command
Param(1) = 5                  ! set line spacing
Param(2) = spacing            ! desired spacing (in 1/100 mm)
GESCAPE CRT,104,Param(*)      ! send command 
 
The above commands are equivalent except that in the first command, spacing is expressed in 1/100 GDU and in the second in 1/100 mm.
 
INTEGER Param(1:3)            ! an array for the command
Param(1) = 6                  ! set line type for hatching
Param(2) = type               ! desired line type for crosshatching
Param(3) = size               ! desired pattern repetition size
GESCAPE CRT,104,Param(*)      ! send command 
 
Type is the type of line, as listed in the LINE TYPE section of the HTBasic Reference Manual. Size is the pattern repetition length in 1/100 GDU’s. This would be 100 times the pattern repetition length specified in a LINE TYPE statement.