Board index » delphi » Can't change the background colour of a Tbitmap palette

Can't change the background colour of a Tbitmap palette

Quote
<keith.cl...@which.net> wrote in message news:38ADE9F9.58BF8238@which.net...
> I'm using a 4bit bitmap to create a font editor, the problem is that
> when I create a new palette (16 colours) I cannot change the colour
> represented by a 0 (the background), changing palette colour 0 actually
> changes colour 1.  The background colour is black, and I need to change
> it to grey as the fonts have black outlines these cannot bee seen.

Take a look at the Pf4bit Lab Report and Danny Thorpe's comments there:
http://www.efg2.com/Lab/Graphics/Colors/CombinePf4bit.htm

The short answer is you get the standard windows 16 colors, and that's
all, with the pf4bit bitmaps.

--
efg

Earl F. Glynn     E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

efg's Computer Lab:  http://www.efg2.com/Lab

 

Re:Can't change the background colour of a Tbitmap palette


But I can change the palette, just not the colour represented by 0 (the
background), if I make the bitmaps transparent colour black the the fonts
outlines are also used as transparent.  Is there a way of telling delhpi to
igonre a specific colour in the palette (i.e. colour 0) rather than just a
specific colour value? (i.e color black)

KC

Quote
"Earl F. Glynn" wrote:
> <keith.cl...@which.net> wrote in message news:38ADE9F9.58BF8238@which.net...
> > I'm using a 4bit bitmap to create a font editor, the problem is that
> > when I create a new palette (16 colours) I cannot change the colour
> > represented by a 0 (the background), changing palette colour 0 actually
> > changes colour 1.  The background colour is black, and I need to change
> > it to grey as the fonts have black outlines these cannot bee seen.

> Take a look at the Pf4bit Lab Report and Danny Thorpe's comments there:
> http://www.efg2.com/Lab/Graphics/Colors/CombinePf4bit.htm

> The short answer is you get the standard windows 16 colors, and that's
> all, with the pf4bit bitmaps.

> --
> efg

> Earl F. Glynn     E-Mail:  EarlGl...@att.net
> Overland Park, KS  USA

> efg's Computer Lab:  http://www.efg2.com/Lab

Re:Can't change the background colour of a Tbitmap palette


Quote
<keith.cl...@which.net> wrote in message news:38AE9A30.B6296B49@which.net...
> But I can change the palette, just not the colour represented by 0 (the
> background

If you can't change the color represent by 0, then you really haven't
changed the palette.  All I know is I gave up trying to define my
own palette for pf4bit bitmaps as described in the Lab Report I
mentioned in my last post.

--
efg

Earl F. Glynn     E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

efg's Computer Lab:  http://www.efg2.com/Lab

Other Threads