Presentation is loading. Please wait.

Presentation is loading. Please wait.

ATTRIBUTE OF OUTPUT PRIMITIVES. Attribute of Output Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 2 Definition Line Attribute Curve Attribute.

Similar presentations


Presentation on theme: "ATTRIBUTE OF OUTPUT PRIMITIVES. Attribute of Output Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 2 Definition Line Attribute Curve Attribute."— Presentation transcript:

1 ATTRIBUTE OF OUTPUT PRIMITIVES

2 Attribute of Output Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 2 Definition Line Attribute Curve Attribute Color And Gray Scale Level Area Filled Attribute Text and Characters Bundled Attributes

3 Attributes of Output Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 3 Definition Parameter that affects the way a primitive will be displayed Line Attribute Line Type Line Width Pen and Brush Options Line Color

4 Line Attribute 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 4 Type :setLinetype (lt). Solid. Dotted – very short dash with spacing equal to or greater than dash itself. Dashed – displayed by generating an interdash spacing

5 Line Attribute 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 5 Width : setLinewidthScaleFactor(lw). Specify in pixels and proportion of a standard line width.. Thicker line can be produced by.. Adding extra pixel vertically when |m| < 1. Adding extra pixel horizontally when |m| > 1. Issues:. Line have different thickness on the slope. Problem with. End of the line. Joining the two lines (polygon)

6 Line Caps 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 6

7 Line Joins 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 7

8 Pen and Brush option 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 8. The selected “pen” or “brush” determine the way a line will be drawn.. Pens and brushes have size, shape, color and pattern attribute.. Pixel mask is applied in both of them.

9 Curve Attribute 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 9 Similar to line : type + width Thicker curves can be produced by: 1. Plotting additional pixel 2. Filling the space between two concentric circles. 3. Using thicker pen or brush

10 Line color 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 10 setPolylineColourIndex (lc)

11 COLOR AND GRAY SCALE LEVEL 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 11 Color  Colors are represented by colors codes which are positive integers.  Color information is stored in frame buffer or in separate table and use pixel values as index to the color table.  Two ways to store color information : 1. Direct 2. Indirect

12 COLOR Direct : color codes directly in the frame buffer 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 12

13 COLOR Indirect : color codes in a separate table and use pixel values as an index into this table 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 13

14 COLOR Lookup Table 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 14 EIGHT COLOUR CODE FOR THREE BIT PER PIXEL FRAME BUFFER ColorStored Color values in frame BufferDisplayed Color 0000Black 1001Blue 2010Green 3011Cyan 4100Red 5101Magenta 6110Yellow 7111White

15 COLOR Lookup Table 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 15 setColourRepresentation (ws, ci, colorptr)

16 GRAY SCALE LEVEL 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 16 INTENSITY CODES FOR A FOUR LEVEL GRAYSCALE SYSTEM Intensity codes Stored intensity values in frame Buffer Displayed Grayscale 0.0000Black 0.33101Dark Gray 0.67210Light Gray 1.0311White

17 AREA FILLED ATTRIBUTE 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 17. Option for filling a defined region is whether solid, pattern and colors. Fill Styles. Three basic fill styles are:. hollow with color border.. interior color is same with background

18 AREA FILLED ATTRIBUTE 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 18. filled with a solid color.. color up to and including the border pattern.. control by other table

19 Filled-Area Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 19

20 Filled-Area Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 20

21 Filled-Area Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 21

22 Filled-Area Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 22

23 Filled-Area Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 23

24 Text and Characters 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 24 Controlled by attributes such as font, size, color and orientation. Text Attributes setTextFont(tf) setTextColourIndex(tc) SetCharacterHeight (ch) SetCharacterExpansionFactor(cw) setCharacterSpacing(cs) setCharacterUpVector(upvect) setTextPath (tp) setTextPrecision (tpr) setTextAlignment (h,v)

25 MARKER ATTRIBUTES setMarkerSizeScaleFactor(ms) setPolymarkerColourIndex(mc) 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 25

26 Bundled Attributes 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 26 When each function reference a single attribute that specify exactly how primitive to be displayed ; then its called individual (unbundled attribute)..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 values is called bundled table..Attribute that can be bundled are:. Bundled Line Attribute. Bundled Area-Fill Attribute. Bundled Text Attribute. Bundled Marker Attribute

27 Bundled line attributes setPolylineRepresentation (ws, li, lt, lw, lc) Parameter ws is the workstation identifier and line index parameter li defines the bundle table position. Parameter lt, lw, lc are then bundled and assigned values to set the line type, line width, and line color specifications for designated table index. 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 27

28 Bundle area fill Attributes setInteriorRepresentation (ws, fi, fs, pi, fc) Which defines the attributes list corresponding to fill index fi on workstation ws. Parameter fs, pi and fc are assigned values for the fill style pattern index and fill color. 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 28

29 Bundled Text Attributes and marker Attributes setTextRepresentation (ws, ti, tf, tp, te, ts, tc) bundles values for text font, precision, expansion,factor size and color in a table position for work station ws that is specified by value assigned to text index parameter ti. setPolymarkerRepresentation (ws, mi, mt, ms, mc) 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 29

30 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 30 Output Primitive Type Associated Attribute Attribute Setting Function Bundled Attribute Function Line Type Width Color setLinetype setLineWidthScaleFactor set PolylineColourIndex set PolylineIndex set PolylineRepresentation Fill Area Fill Style Fill Color Pattern setInteriorStyle setInteriorColorIndex setInteriorStyleIndex setPatternRepresentation setpatternsize setPatternReferencePoint setInteriorIndex setInteriorRepresentation

31 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 31 Output Primitive Type Associated Attribute Attribute Setting Function Bundled Attribute Function Text Font Color Size Orientation setTextFonr setTextCo1ourIndex setcharacterHeight setCharacterExpansionFactor setCharaccerUpVector setTextPath setTextAlignment setTextIndex setTextRepresentation Marker Type Size Color setMarkeirype setMarkerSizeScalePactor setPolyrnarkerColourIndex setPolyrnarkerIndex setPolyrnarkerRepresentati on


Download ppt "ATTRIBUTE OF OUTPUT PRIMITIVES. Attribute of Output Primitives 30/9/2008 A.Aruna/Assistant professor/IT/SNSCE 2 Definition Line Attribute Curve Attribute."

Similar presentations


Ads by Google