drawing in subwindows
Thant Tessman
thant at horus.esd.sgi.com
Thu Aug 16 03:11:53 AEST 1990
In article <1990Aug14.100020.5096 at hellgate.utah.edu>,
margaret at cs.utah.edu (Malgorzata Sturgill) writes:
>
> Hi,
> I am trying to draw in subwindows ( open with swinopen ). I finally
> managed to persuade my code to draw, but unfortunately it does not
draw where
> I expect. I have included a piece of code to ilustrate. All this
program does
> it opens a 300x300 parent window (black) and then opens a white
200x200 white
> subwindow. the program is then supposed to draw the diagonals of the
subwindow
> in red. Well it does not. It does draw a cross, but it does not fill
the whole
> window. Am I just doing something stupid?
> #include <device.h>
I'm not sure what the default behavior of subwindows is supposed to be,
but you could just add an ortho2 to your redr to get what you want:
redr(){
winset(child);
reshapeviewport();
ortho2(0.0, 200.0, 0.0, 200.0); /* like this */
color(WHITE);
clear();
color(RED);
move2(0,0);
draw2(199,199);
move2(0,199);
draw2(199,0);
}
> Malgorzata Marek Sturgill margaret at cs.utah.edu
> margaret at ms.uky.edu
>
thant
More information about the Comp.sys.sgi
mailing list