freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] bitmap color


From: David Turner
Subject: Re: [Freetype] bitmap color
Date: Wed, 12 Sep 2001 11:29:15 +0200

Hello Wallace,

> The resulting bitmap is in reverse color (white on black background).  I
> would like it the other way (black on white background).  How can I do
> this?
>

There is no "color" in the bitmap, only bits or "coverage" values.

for monochrome bitmaps:

  a bit value of 0 means "background"
  a bit value of 1 means "foreground" (or "text" color)

for "gray-level" pixmaps (i.e. 8-bit coverage pixels):

  a byte value of 0   means "background"
  a byte value of 255 means "foreground" (or "text" color)

  any intermediate value means an intermediate
  coverage or "gray" or "translucency" level

If you need to invert this, simply xor the bitmap
bytes with 0xFF before drawing it..

Regards,

- David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]