Hi Andrzej,

> From:  <vszak...@users.sourceforge.net>
> Sent: Monday, February 15, 2010 12:14 PM
> Subject: [Harbour] SF.net SVN: harbour-project:[13878] trunk/harbour
> 
>> Revision: 13878
> [...]
>>  * contrib/hbwin/hbwin.ch
>>    * Changed to use full (0xFF) color components for RGB presets.
> 
> Viktor, this change is incompatible with Clipper. Previous colours were too
> dark, but 0xFF should stand for BRIGHT colours. Clipper uses RGBI palette,
> see here:
> * 4-bit RGBI palettes for explanation:
> http://en.wikipedia.org/wiki/List_of_monochrome_and_RGB_palettes#4-bit_RGBI
> * EGA colour palette for hex values in implementation:
> http://en.wikipedia.org/wiki/Enhanced_Graphics_Adapter#The_EGA_color_palette

Clipper had no graphical printing, nor any special color 
printing support for that matter, nor did it determine the 
actual colors that appeared on screen, so it's by no means 
a Clipper compatibility issue. 

If you mean to mimic MS-DOS (or rather VGA/EGA) screen colors 
in Windows printing, I can't see strong reason why this would 
be desired. WIN_PRN class is meant to (sort of) emulate line 
printers on GUI printers, so if anything, these colors should 
mimic color selection of color printers. Maybe this was the 
original intent, but it's still very difficult to tell, but 
even in this case I have some doubts that color printers 
had chosen just these exact color components for these specific 
colors as a standard:

--- (from old hbwin.ch)
#define RGB_BLACK              RGB( 0x00, 0x00, 0x00 )
#define RGB_BLUE               RGB( 0x00, 0x00, 0x85 )
#define RGB_GREEN              RGB( 0x00, 0x85, 0x00 )
#define RGB_CYAN               RGB( 0x00, 0x85, 0x85 )
#define RGB_RED                RGB( 0x85, 0x00, 0x00 )
#define RGB_MAGENTA            RGB( 0x85, 0x00, 0x85 )
#define RGB_BROWN              RGB( 0x85, 0x85, 0x00 )
#define RGB_WHITE              RGB( 0xC6, 0xC6, 0xC6 )
---

F.e. why isn't "white" 0x85/0x85/0x85 to be consistent 
with other colors, or even more, why isn't it pure white: 
0xFF/0xFF/0xFF, instead of being grey? :)

Please also notice these color macros in hbwin.ch are not 
printing specific ones, but generic color constants, and 
current colors are the most generic, pure versions of 
the base colors:

--- (current hbwin.ch)
/* Color constants for convenience */
#define HB_WIN_RGB_BLACK            WIN_RGB( 0x00, 0x00, 0x00 )
#define HB_WIN_RGB_BLUE             WIN_RGB( 0x00, 0x00, 0xFF )
#define HB_WIN_RGB_GREEN            WIN_RGB( 0x00, 0xFF, 0x00 )
#define HB_WIN_RGB_CYAN             WIN_RGB( 0x00, 0xFF, 0xFF )
#define HB_WIN_RGB_RED              WIN_RGB( 0xFF, 0x00, 0x00 )
#define HB_WIN_RGB_MAGENTA          WIN_RGB( 0xFF, 0x00, 0xFF )
#define HB_WIN_RGB_BROWN            WIN_RGB( 0xFF, 0xFF, 0x00 )
#define HB_WIN_RGB_WHITE            WIN_RGB( 0xFF, 0xFF, 0xFF )
---

Brgds,
Viktor

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

Reply via email to