srccontrols/matrix/iupmat_draw.c
static unsigned long iMatrixDrawSetBgColor(Ihandle* ih, int lin, int col, int marked, int active)
{
  unsigned char r = 255, g = 255, b = 255;
  iupMatrixGetBgRGB(ih, lin, col, &r, &g, &b, marked, active);
  return cdCanvasForeground(ih->data->cd_canvas, cdEncodeColor(r, g, b));
}
/* Change the CD foreground color, for the selected color to draw a cell with
   its BACKGROUND COLOR. This involves checking if there is a color attribute
   that cell.  If no, uses a color attribute for the line, else if no for the
   column,  else if no  for the entire matrix.   Finally,  if not find any of
   these, use the default color.
   -> lin, col - cell coordinates, in IUP format - i.e., l,l represents the left
   top cell of the matrix; lin and col values = 0 represents the
   title lines and columns.
   -> marked - indicate if a cell is marked. If yes, its color is attenuated.
   */
Change the CD foreground color, for the selected color to draw a cell with
its BACKGROUND COLOR. This involves checking if there is a color attribute
that cell.  If no, uses a color attribute for the line, else if no for the
column,  else if no  for the entire matrix.   Finally,  if not find any of
these, use the default color.
> lin, col - cell coordinates, in IUP format - i.e., l,l represents the left
top cell of the matrix; lin and col values = 0 represents the
title lines and columns.
> marked - indicate if a cell is marked. If yes, its color is attenuated.
Change the CD foreground color for the selected color to draw a cell with its BACKGROUND COLOR . This involves checking if there is a color attribute that cell . If no uses a color attribute for the line else if no for the column else if no for the entire matrix . Finally if not find any of these use the default color . > lin col - cell coordinates in IUP format - i . e . l l represents the left top cell of the matrix ; lin and col values = 0 represents the title lines and columns . > marked - indicate if a cell is marked . If yes its color is attenuated .
static unsigned long iMatrixDrawSetBgColor(Ihandle* ih, int lin, int col, int marked, int active)
{
  unsigned char r = 255, g = 255, b = 255;
  iupMatrixGetBgRGB(ih, lin, col, &r, &g, &b, marked, active);
  return cdCanvasForeground(ih->data->cd_canvas, cdEncodeColor(r, g, b));
}
static unsigned long iMatrixDrawSetBgColor ( Ihandle * ih , int lin , int col , int marked , int active ) { unsigned char r = 255 , g = 255 , b = 255 ; iupMatrixGetBgRGB ( ih , lin , col , & r , & g , & b , marked , active ) ; return cdCanvasForeground ( ih -> data -> cd_canvas , cdEncodeColor ( r , g , b ) ) ; }
Change the CD foreground color, for the selected color to draw a cell with
its BACKGROUND COLOR.
Change the CD foreground color for the selected color to draw a cell with its BACKGROUND COLOR .