[dos] trouble with image.e

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

Am I overlooking something really obvious or is my computer
somehow different?

I was working on a little program and wanted to change a letter without
changing the screen colors. This trivial program snatch shows the
problem. This code always gives me the error "slice ends past end".
In this example it would be easy to manually reset the colors, but in
my program there are too many colors to keep track of. I should be
able to just get the colors off the screen.

include graphics.e
include image.e
global sequence s s={0,0}
if graphics_mode(3) then abort(1) end if
--put a letter using text and background colors
position(10,10) text_color(12) bk_color(2)  puts(1,'A')
--now put another letter but without changing the existing colors
s=get_screen_char(10,10)
s[1]='B'       --s[2] should still have the colors
put_screen_char(10,10,s)
--why does slice end past end of sequence?

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

Search



Quick Links

User menu

Not signed in.

Misc Menu