comp.sys.sun help
Ranadeva Peries
rana at cs.uwa.oz.au
Wed Jun 5 04:40:00 AEST 1991
I would like to submi the following article to comp.sys.sun or
any other relevent newsgroups. I am not sure whether I should be
posting it to you. However I need this information in a hurry and
this seems to be the only choice.
Here is a simple C program (from the SunCore Manual). I have modified
it to create a new View Surface and draw a glass. This works under
SunOS 4.0.3 but does not create a New View Surface under SunOS 4.1.1.
User SunOS 4.1.1 it creates the drawing and the view surface on the
window it's running.
static float glassdx[] = { -10.0, 9.0, 0.0, -14.0, 30.0,
-14.0, 0.0, 9.0, -10.0 };
static float glassdy[] = { 0.0, 1.0, 19.0, 15.0, 0.0,
-15.0, -19,0, -1.0, 0.0 };
int cgpixwindd();
struct vwsurf vwsurf = DEFAULT_VWSURF(cgpixwindd);
main(argc, argv)
int argc;
char **argv;
{
struct vwsurf *surf = &vwsurf;
initialize_core(BASIC, NOINPUT, TWOD);
surf->flags = 1;
initialize_view_surface(surf, FALSE);
select_view_surface(surf);
set_viewport_2(0.125, 0.875, 0.125, 0.75);
set_window(-50.0, 50.0, -10.0, 80.0);
create_temporary_segment();
move_abs_2(0.0, 0.0);
polyline_rel_2(glassdx, glassdy, 9);
move_rel_2(-12.0, 33.0);
line_rel_2(24.0, 0.0);
close_temporary_segment();
sleep(10);
deselect_view_surface(surf);
terminate_core();
}
Rana Peries ( rana at cs.uwa.oz.au )
Department of Computer Science
University of Western Australia
Nedlands 6009.
W Australia.
More information about the Comp.sys.sun
mailing list