1. bk_color and BLACK

I've asked this question to Robert a while back, but I'm not sure I really
understand this. When I saw Jiri's comment about setting the palette(), the
question returned.

When I'm in graphics mode, the color BLACK is apparently not the color BLACK
at all, but the color of the background. For example, if I do somthing like
the following:

   bk_color( BLUE )
   draw_line( BLACK, { { 1, 1 }, {10, 10} )

My *intent* was to set the background to blue, and draw a black line on it.
Instead, I draw an invisible line, since BLACK really maps to the background
color, and setting the background to BLUE changes the color BLACK to blue.

How does one go about setting the background to another color without
altering the color BLACK? The method should be reasonably fast, as I
currently doing a draw_bitmap() type of call, which is *slow*...

Thanks.

 -- David Cuny

new topic     » topic index » view message » categorize

2. Re: bk_color and BLACK

> How does one go about setting the background to another color without
> altering the color BLACK? The method should be reasonably fast, as I
> currently doing a draw_bitmap() type of call, which is *slow*...
>
> Thanks.

I've never been able to accomplish changing the background to another
colour when I am using a bitmap that has black as one of it's colours. That
was a major headache during the writing of the first tutorial.

The only way I got around it was to write a utility program that converted
a bitmap displayed on the screen into a Euphoria procedure, consisting of a
series of lengthy pixel() statements. I then took that created procedure
and added it to the main body of the program I was working on. After that,
I was able to change the background without any further grief.

David

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu