.\"## .\" $XConsortium: p299,v 5.2 94/04/17 20:57:54 rws Exp $ .\"## .\"## $XMCOPY .\"## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. .\"## .\"## All Rights Reserved .\"## .\"## Permission to use, copy, modify, and distribute this software and its .\"## documentation for any purpose and without fee is hereby granted, .\"## provided that the above copyright notice appear in all copies and that .\"## both that copyright notice and this permission notice appear in .\"## supporting documentation, and that the name of Sun Microsystems, .\"## not be used in advertising or publicity .\"## pertaining to distribution of the software without specific, written .\"## prior permission. .\"## .\"## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, .\"## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO .\"## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR .\"## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF .\"## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR .\"## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR .\"## PERFORMANCE OF THIS SOFTWARE. .TH "SET COLOUR MODEL" 3P "29 February 1991" .SH NAME SET COLOUR MODEL \- select colour model for workstation colour table .IX "Colour" "SET COLOUR MODEL" .SH SYNOPSIS .SS C Syntax .ft B .ta 1.25i 3i .nf void pset_colr_model ( ws, model ) Pint ws; \fIworkstation identifier\fP Pint model; \fIcolour model\fP .fi .ft R .SS Required PHIGS Operating States (PHOP, WSOP, *, *) .SH DESCRIPTION .SS Purpose \s-2SET COLOUR MODEL\s+2 selects the colour model used to represent colours in the workstation's table of defined colour representations, which is used to specify a primitive's colour attribute. .LP .\"PHIGS+: when the appropriate CSF (\s-2POLYLINE, POLYMARKER, TEXT, .\"PHIGS+: NTERIOR,\s+2 or \s-2EDGE\s+2) is set to \s-2INDEXED\s+2. .SS C Input Parameters .IP \fIws\fP Set the colour model for the workstation with identifier \fIws\fP. .IP \fImodel\fP Use this colour model to interpret the colour values in the workstation colour table. Values defined in phigs.h are: .nf .ta .5i +.5i +1.5i .nf .sp .2 0 PINDIRECT 1 PMODEL_RGB \fIRed, Green, Blue\fP 2 PMODEL_CIELUV \fICIE universal colour definition system\fP 3 PMODEL_HSV \fIHue, saturation, value\fP 4 PMODEL_HLS \fIHue, lightness, saturation\fP .fi .SS Execution When \s-2SET COLOUR MODEL\s+2 is called, the current colour model entry in the workstation state list is set to colour model, which selects a method of interpreting the colour bundles in the workstation table of defined colour representations. Each entry on the colour table contains three colour values. When the current colour model is set to \fIRed, Green, Blue\fP, these values are interpreted as the red, green and blue components, respectively, of the colour in \s-2RGB\s+2 colour space. .\"PHIGS+ .LP .\"PHIGS+ When the Colour Source Flag (CSF) for \s-2POLYLINE, POLYMARKER, .\"PHIGS+ TEXT, INTERIOR,\s+2or \s-2EDGE\s+2 is set to \s-2INDEXED\s+2, the .\"PHIGS+ colour for the corresponding primitive is specified as an index .\"PHIGS+ into this colour table. When the primitive's CSF \(eq .\"PHIGS+ \s-2INDEXED\s+2, the primitive's colour Aspect Source Flag (ASF) .\"PHIGS+ determines whether the current colour index value is taken from .\"PHIGS+ the current defined representation for that primitive (ASF \(eq .\"PHIGS+ \s-2BUNDLED\s+2), or from the current individual colour setting .\"PHIGS+ for the primitive (ASF \(eq \s-2INDIVIDUAL\s+2). .\" .LP .\" See the \fI\s-2PEX-SI\s0 Programming Guide\fP for more information on .\" specifying colours and colour models. .SH ERRORS .IP 003 Ignoring function, function requires state (\s-2PHOP\s+2, \s-2WSOP\s+2, \s-2*\s+2, \s-2*\s+2) .IP 054 Ignoring function, the specified workstation is not open .IP 059 Ignoring function, the specified workstation does not have output capability (in other words, the workstation category is neither \s-2OUTPUT\s+2, \s-2OUTIN\s+2, nor \s-2MO\s+2) .IP 110 Ignoring function, the specified colour model is not available on the workstation. .SH SEE ALSO .nf .IP .ta 0.5i .SM "INQUIRE COLOUR MODEL FACILITIES (3P)" .SM "INQUIRE COLOUR MODEL (3P)" .fi