Article View: comp.sys.sun
Article #7854comp.sys.sun help
From: Ranadeva Peries
Date: Tue, 04 Jun 1991 18:40
Date: Tue, 04 Jun 1991 18:40
50 lines
2045 bytes
2045 bytes
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@cs.uwa.oz.au )
Department of Computer Science
University of Western Australia
Nedlands 6009.
W Australia.
Technical Details
Message-ID:
<2944@brchh104.bnr.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: rana@cs.uwa.oz.au (Ranadeva Peries) Newsgroups: comp.sys.sun Subject: comp.sys.sun help Keywords: No Digest Subjects in Unmoderated Mode Message-ID: <2944@brchh104.bnr.ca> Date: 4 Jun 91 18:40:00 GMT Sender: news@brchh104.bnr.ca Organization: Sunspots, Psuedo-Unmoderated Lines: 51 Approved: sun-spots@rice.edu X-Original-Date: Wed, 8 May 91 14:46:51 WST