On Thu, 11 Mar 2010, Pritpal Bedi wrote:

Hi,

> I think we are talking on two different planes.
> There is no concept of 0 base in Clipper code, is there ?

Yes it is. Please read Clipper documentation.
Clipper uses indexes in range 0-15 for foreground and
background colors with the following meaning.
   0-black
   1-blue
   2-green
   3-cyan
   4-red
   5-magenta
   6-brown
   7-light gray
   8-gray
   9-light blue
  10-light green
  11-light cyan
  12-light red
  13-light magenta
  14-yellow
  15-white

You can select colors in Clipper using stringslike:
   "4/1" => red/blue
   "15/2" => white/green

In harbour/tests/gtcolors.prg you have code example which uses
such numeric indexes to select colors. Please be so kind and
comment the line 20 in this file (with HB_GTVERSION() functions)
and compile it using Clipper and check how it works.

Harbour fully respects such numeric indexes so I do not see any
reason why we should create execption for HB_GTI_PALETTE and add
1 to these indexes when in all other places (the numeric color
notation using indexes is accepted by _ALL_ functions using color
strings) we will use Clipper compatible 0 based color values.

If you know such reason then please tell us about them.
If not then IMO GTWVG should be fixed to be compatible with
color indexes used by Clipper.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to