Fill Pattern() sets the pattern for filled areas.
Specify a mask (a matrix of values between 0 and 1) or an image. Each value in the matrix creates a pixel.
win = New Window( "Example",
Graph Box(
Fill Pattern(
[1 0.5 0 0, 0.5 0 0 1, 0 0 1 0.5, 0 1 0.5 0]
);
Polygon( [10 30 90], [88 22 44] );
)
);
Specify a name in quotation marks that corresponds to a pattern shown in Fill Patterns.
win = New Window( "Named Pattern Example",
Graph Box(
Fill Pattern( "vertical light" );
Polygon( [10 30 90], [88 22 44] );
)
);
Specify an image in quotation marks. If the image is not installed on the viewer’s computer, question marks appear in the shape.
win = New Window( "Graphic Example",
Graph Box(
Fill Pattern( Open( "$SAMPLE_IMAGES/pi.gif", "gif" ) );
Polygon( [10 30 90], [88 22 44] );
)
);
Pattern Name |
Pattern |
---|---|
left slant light |
|
right slant light |
|
vertical light |
|
horizontal light |
|
grid light |
|
hatch light |
|
h wave light |
|
v wave light |
|
hollow circle |
|
left slant medium |
|
right slant medium |
|
vertical medium |
|
horizontal medium |
|
grid medium |
|
hatch medium |
|
h wave medium |
|
v wave medium |
|
filled circle |
|
left slant heavy |
|
right slant heavy |
|
vertical heavy |
|
horizontal heavy |
|
grid heavy |
|
hatch heavy |
|
h wave heavy |
|
v wave heavy |
|
diamond |
|
left slant heavy b |
|
right slant heavy b |
|
random |
|
square |
|
square offset |
|
wide |
|
tall |
|
checkerboard |
|
grid dots |
|
triangle up |
|
triangle down |
|
triangle left |
|
triangle right |
|
weave light |
|
weave heavy |
|
honeycomb |