COMPUTER GRAPHICS Bundled attributes and inquiry function Submitted By Mrs.R.CHINTHAMANI , ASSISTANT pROFESSOR , Department of Computer Science E.M.G.Yadava Women’s College, Madurai-14 .
BUNDLED ATTRIBUTES
When each function reference a single attributes that specify exactly how primitives to be displayed. It is called individual (unbundled attributes).
Bundled attributes is where a set of attributes value can be chosen by specifying the appropriate index table. The table for each primitive that defines group of attribute value is called bundled table.
Attributes that can be bundled are:
Bundled line attributes Bundled area fill attributes Bundled text attributes Bundled marker attributes
BUNDLED LINE ATTRIBUTES Entries in the bundle table for line attributes on a specified workstation are set with function SetpolylineRepresentation(ws, li, lt, lw, lc)
Parameter ws is the workstation identifier, and line li defines the position. Parameter lt, lw, lc are then bundled and assigned values to set the line type, line width and line color for the designated table index.
EXAMPLE
BUNDLED AREA FILL ATTRIBUTES
Table entries for bundled area fill attributes are set with SetInteriorRepresentation(ws, fi, fs, pi, fc) It defines the attribute list corresponding to fill index fi on workstation ws. Parameters fs, pi, fc are assigned values for the fill style, patter index and fill color.
BUNDLED TEXT ATTRIBUTES The function SetTextRepresentation(ws, to, tf, to, te, ts, tc)
Bundled values for text font, precision, expansion factor, size and color in a table position for workstation ws that is specified by the value assigned to text index parameter to.
BUNDLED MARKER ATTRIBUTES
Table entries for bundled marker attributes are set up with SetPolymarkerRepresentation(ws, mi, mt, ms, mc) This defines the marker type, marker scale factor and marker color for index mi on workstation ws. Bundle table selection are then made with the function SetPolymarkerIndex(mi)
INQUIRY FUNCTION
Current settings for attributes and other parameters, such as workstation types and status, in the system lists can be retrieved with inquiry function. Copy the current values for line index and fill color into lastli and lastfc.
Copy the current values for line index and fill color into lastli and lastfc.