RE: question on palette funtion

new topic     » topic index » view thread      » older message » newer message

Hayden,

It's not possible if you draw using the same color.  You'll have to use 
a different color index...

For example:
include graphics.e

sequence old_green
integer error

error = graphics_mode(18)
draw_line(BLUE,{{100,100},{200,100}}) -- draw blue line
old_green = palette(GREEN,{15,14,10}) -- redefine green (color index 2)
print(1,old_green)
-- draw second line using our redefined green 
draw_line(GREEN,{{100,200},{200,200}})

-- Brian

Hayden McKay wrote:
> Is it possible to draw the second line green without the first line 
> (blue) being chaged to green also.
> 
> include graphics.e
> sequence old
> integer error
> error = graphics_mode(18)
> draw_line(1,{{100,100},{200,100}}) -- draw blue line
> old = palette(1,{15,14,10}) -- change blue to green
> print(1,old)
> draw_line(1,{{100,200},{200,200}}) -- draw green line & somehow keep 
> blue line blue?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu