1. Mysterious green line
- Posted by simulat <simulat at INTERGATE.BC.CA> Aug 15, 1999
- 401 views
Hi When I make my own palette, I get a green line at the top of my monitor. This line doesn't appear if I accept the system palette. The line doesn't get saved if the screen is saved to disk as a bitmap file. This is a mystery for me- not a problem. Though it would be a problem if I actually needed to make the green line go away. Does anyone know what's going on? Thanks Martin <<<<<START OF EUPHORIA CODE>>>> -- When I try to make my own palette, I get a green line at the top of the -- screen. Why is it there? include misc.e include graphics.e include image.e include get.e function InitGraphics(atom grafmode) atom gr gr=graphics_mode(grafmode) return video_config() end function constant degtorad=PI/180 --constant radtodeg=180/PI global constant vidok=1 global constant vidmode=2 global constant vidwide=5 global constant vidhigh=6 global constant vidcolrs=7 global constant yes=1 global constant no=0 sequence videoconfig -- Set up the screen graphic mode videoconfig=InitGraphics(261)-- I'm using video mode 261 global constant numcolours=videoconfig[vidcolrs]-1 global constant sw=videoconfig[vidwide] global constant sh=videoconfig[vidhigh] function Radian(atom i) return degtorad*i end function procedure wait() atom a a=wait_key() end procedure global procedure prinseq(sequence label, sequence string) printf(1, "%s", {label&" "}) printf(1, "%s \n", {string}) end procedure -- This is the palette making routine that makes the green line global procedure browns1colourit(atom cn) -- Makes a palette of colours atom red, green, blue, t1, t2 sequence colours colours={{0,0,0}} for colour=2 to cn do t1=colour/cn*180 t2=colour/cn*89.09 red=63*sin(Radian(t1-10)) green=63*cos(Radian(t1+30)) blue=tan(Radian(t2)) colours=append(colours,{red, green, blue}) end for all_palette(colours) end procedure atom sav --with trace trace(1) browns1colourit(256) -- This line calls the palette making routine prinseq("","Do you see a green line at the top of the screen?") prinseq("","Why is it there?") prinseq("","It only occurs when I make up my own palette.") prinseq("","Press any key twice to exit") sav=save_screen(0,"e:\\pictures\\new\\test.bmp") wait() --clear_screen() <<<<END OF EUPHORIA CODE
2. Re: Mysterious green line
- Posted by Bernie Ryan <bwryan at PCOM.NET> Aug 15, 1999
- 381 views
- Last edited Aug 16, 1999
On Sun, 15 Aug 1999 17:56:56 -0700, simulat <simulat at INTERGATE.BC.CA> wrote: >This is a mystery for me- not a problem. Though it would be a problem if I >actually needed to make the green line go away. > >Does anyone know what's going on? It looks like it happens when you use more than 16 colours >>browns1colourit(256) -- This line calls the palette making routine If you change the above to browns1colourit(16) then the line is gone Change browns1colourit(17) then the line is there. mode 261 is 1024 x 768 - 256 colors If you change to mode 260 1024 x 768 - 16 colors then the line is gone. It looks like something to do with 16 colors or more. Maybe someone else can help you that knows how Euphoria handles the graphic modes. Bernie
3. Re: Mysterious green line
- Posted by Greg Phillips <i.shoot at REDNECKS.COM> Aug 15, 1999
- 375 views
- Last edited Aug 16, 1999
My best guess is that it is a hardware issue. My older 120, with an ATI svga card, wouldn't NOT display euphoria graphics properly in hi resolution modes. Strangely enough, a very similar system with the exact same card, but older drivers, displayed them properly. Sorry I can't be of more help, Greg Phillips simulat wrote: > Hi > When I make my own palette, I get a green line at the top of my monitor. > This line doesn't appear if I accept the system palette. The line doesn't > get saved if the screen is saved to disk as a bitmap file. > > This is a mystery for me- not a problem. Though it would be a problem if I > actually needed to make the green line go away. > > Does anyone know what's going on? > > Thanks > > Martin > > <<<<<START OF EUPHORIA CODE>>>> > -- When I try to make my own palette, I get a green line at the top of the > -- screen. Why is it there? > > include misc.e > include graphics.e > include image.e > include get.e > > function InitGraphics(atom grafmode) > atom gr > gr=graphics_mode(grafmode) > return video_config() > end function > > constant degtorad=PI/180 > --constant radtodeg=180/PI > > global constant vidok=1 > global constant vidmode=2 > global constant vidwide=5 > global constant vidhigh=6 > global constant vidcolrs=7 > global constant yes=1 > global constant no=0 > > sequence videoconfig -- Set up the screen graphic mode > videoconfig=InitGraphics(261)-- I'm using video mode 261 > > global constant numcolours=videoconfig[vidcolrs]-1 > global constant sw=videoconfig[vidwide] > global constant sh=videoconfig[vidhigh] > > function Radian(atom i) return degtorad*i end function > > procedure wait() > atom a > a=wait_key() > end procedure > > global procedure prinseq(sequence label, sequence string) > printf(1, "%s", {label&" "}) > printf(1, "%s \n", {string}) > end procedure > > -- This is the palette making routine that makes the green line > global procedure browns1colourit(atom cn) -- Makes a palette of colours > atom red, green, blue, t1, t2 > sequence colours > > colours={{0,0,0}} > > for colour=2 to cn do > t1=colour/cn*180 > t2=colour/cn*89.09 > red=63*sin(Radian(t1-10)) green=63*cos(Radian(t1+30)) > blue=tan(Radian(t2)) > colours=append(colours,{red, green, blue}) > end for > all_palette(colours) > end procedure > > atom sav > > --with trace trace(1) > > browns1colourit(256) -- This line calls the palette making routine > prinseq("","Do you see a green line at the top of the screen?") > prinseq("","Why is it there?") > prinseq("","It only occurs when I make up my own palette.") > prinseq("","Press any key twice to exit") > > sav=save_screen(0,"e:\\pictures\\new\\test.bmp") > > wait() > --clear_screen() > > <<<<END OF EUPHORIA CODE
4. Re: Mysterious green line
- Posted by "Matt A. Arriola" <Prog_Matt at YAHOO.COM> Aug 30, 1999
- 389 views
You must be setting the border color - color 16.