[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FILLPATTERN Fill Graphic Rectangle With Pattern pp 175
Syntax: FillPattern (X1,Y1,X2,Y2,Color) ;
Type: Integer
Form: Extended Graphics Procedure
Purpose: Fill graphic rectangle with Pattern.
Notes: Requires {$I Graph.P} include file in the source file.
The rectangular graphic shape delineated by the corner coordinates
of X1,Y1 and X2,Y2 is filled with the pattern defined by the
Pattern statement. Color 0..3 is selected from the color
palette. 0 bits in the pattern cause no change to the display
whereas 1 bits cause a dot to be written in the selected color.
----------------------------------------------------------------------------
Usage:
{$I Graph.P} { Extended graphics support }
CONST
Color : Integer = 1 ; { Use color 1 }
X1 : Integer = 0 ; { Upper left corner }
Y1 : Integer = 0 ;
X2 : Integer = 319 ; { Lower right corner }
Y2 : Integer = 199 ;
Lines : Array [0..7] of Byte = ($44,$88,$11,$22,$44,$88,$11,$22);
BEGIN
GraphColorMode ;
Pattern (Lines) ; { Define the pattern from Lines }
FillPattern (X1,Y1,X2,Y2,Color) ; { Fill pattern in green } }
ColorTable (3,2,1,0) ; { Reverse table colors }
FillPattern (X1,Y1,X2,Y2,-1) ; { Fill pattern in red }
END.
See Also:
FillScreen
FillShape
Palette
Pattern
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson