Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> fillpattern fill graphic rectangle with pattern pp 175</b> http://www.X-Hacker.org [<<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

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson