Article View: comp.windows.x.pex
Article #27Re: PEX-SI color models
From: Timothy Powell
Date: Thu, 06 Aug 1992 15:32
Date: Thu, 06 Aug 1992 15:32
53 lines
1984 bytes
1984 bytes
> Open Phigs
>
> Open Workstation (phigs_ws_type_x_drawable)
>
> Set Workstation color model to RGB
The first three steps appear to be correct.
> Allocate (using pset_colr_rep) all colors currently
> residing in the X colormap
>
> ....
>
> Set polyline list colors with RGB values
>
> Display the polyline
It's difficult to see what you're doing here. A correct example of how to
display a red polyline after the initial steps would be:
#define WID 1
#define RED 2
.
.
Pcolr_rep rep;
Ppoint_list3 list;
Ppoint3 pts[2];
rep.rgb.red = 1.0;
rep.rgb.green = 0.0;
rep.rgb.blue = 0.0;
pset_colr_rep(WID, RED, &rep);
pset_line_colr_ind(RED);
list.num_points = 2;
list.points = pts;
pts[0].x = 0.0;
pts[0].y = 0.0;
pts[0].z = 1.0;
pts[1].x = 1.0;
pts[1].y = 0.0;
pts[1].z = 0.0;
ppolyline3(&list);
.
.
Hope this helps. In porting applications to various machine types and
servers, I have noticed that some of the lower-end 8 bit displays do not
always display colors correctly, which I presume is due to the way color
is supported by the servers.
Tim
tpowell@convex.com
Technical Details
Message-ID:
<1992Aug6.153219.20740@news.eng.convex.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!mips!darwin.sura.net!convex!convex!tpowellReferences:
<686@trwacs.fp.trw.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!mips!darwin.sura.net!convex!convex!tpowell
From: tpowell@convex.com (Timothy Powell)
Newsgroups: comp.windows.x.pex
Subject: Re: PEX-SI color models
Keywords: Colors, Visuals
Message-ID: <1992Aug6.153219.20740@news.eng.convex.com>
Date: 6 Aug 92 15:32:19 GMT
References: <686@trwacs.fp.trw.com>
Sender: usenet@news.eng.convex.com (news access account)
Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
Lines: 53
Nntp-Posting-Host: pixel.convex.com
X-Disclaimer: This message was written by a user at CONVEX Computer
Corp. The opinions expressed are those of the user and
not necessarily those of CONVEX.