[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
COLORTABLE Define Color Translation Table pp 172
Syntax: ColorTable (C1,C2,C3,C4) ;
Type: Integer, Byte
Form: Extended Graphics Procedure
Purpose: ColorTable supplements PALETTE by defining a color translation
table which allows the current color of any given point to set
the new color of that point when it is written again.
Notes: Requires {$I Graph.P} include file in the source file.
ColorTable supports Arc, Circle, FullScreen, PutPic Procedures.
The default color table value is (0,1,2,3) which means that when
a point is written on the screen, it won't deviate from the
color that's already there.
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.
(*
Color 0 becomes color 3
Color 1 remains color 1
Color 2 becomes color 0
Color 3 becomes color 2
*)
See Also:
Arc
Circle
FillScreen
PutPic
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson