1. palette: why doesn't this work?

include get.e
include graphics.e
object x
integer g, key
clear_screen()
g = graphics_mode(261)
x = palette(GREEN, {63, 53, 0}) -- gold color
bk_color(GREEN)
key = wait_key()
g = graphics_mode(-1)

The background should be the color of the palette, not the original.
What's going on?  So how am I supposed to create custom colored
backgrounds?  Draw a square that covers the whole screen?

Alan

new topic     » topic index » view message » categorize

2. Re: palette: why doesn't this work?

>The background should be the color of the palette, not the original.
>What's going on?  So how am I supposed to create custom colored
>backgrounds?  Draw a square that covers the whole screen?


The backcolor is used in two situations:
1) As a border when we are in 'cut off mode' .. sometimes your video mode
has space over along the edges, it will be this color.
2) As background color in text-mode.


Other than that background colors simply dont exist in graphics modes.
Think about it, every point has a color, and wether or not that is
background, foregroud, or whatever color that is, that is not stored at
all.. (would take way too much memory)

Why are pixel modes so different from text modes ? Because you can
see-through a character most of the time, what color do you see ? That is
the background color, however, can one see through a pixel ?

So, yes, you need to draw a big block in a certain color to get do what you
wanted..

Good luck...

Ralf

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

3. Re: palette: why doesn't this work?

>>>>>
Other than that background colors simply dont exist in graphics modes.
Think about it, every point has a color, and wether or not that is
background, foregroud, or whatever color that is, that is not stored at
all.. (would take way too much memory)
<<<<<

Great explanation!  Thanks.

Alan

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

Search



Quick Links

User menu

Not signed in.

Misc Menu