PROGRAM   GetPixe_ ;
USES   Graph ;

VAR
   G_GraphDriver : Integer ;
   G_GraphMode   : Integer ;
BEGIN
   G_GraphDriver := Detect ;
   G_GraphMode   := Detect ;
   InitGraph ( G_GraphDriver , G_GraphMode , 'C:\Lib\BGI' );

   SetFillStyle ( SolidFill , Green );
   Bar ( 0,0  ,  90,50 );
   SetFillStyle ( SolidFill , Blue );
   Bar ( 100,0  ,  190,50 );

   {----- Get color from previous bars }
   SetFillStyle ( SolidFill , GetPixel(10,10) );
   Bar ( 0,100  ,  90,150 );
   SetFillStyle ( SolidFill , GetPixel(110,10) );
   Bar ( 100,100  ,  190,150 );

   ReadLn ;
   CloseGraph ;
END.
