Attributes of
Output Primitives
Main Areas…
2
▪ Character Attributes
▪ Bundled Attributes
▪ Inquiry Functions
▪ Antialiasing
CHARACTER
ATTRIBUTES
CHARACTER ATTRIBUTES
▪ The appearance of displayed characters is
controlled by attributes such as
Font size
Color
Orientation.
▫ Attributes can be set both for entire character
strings (text) and for individual characters
defined as marker symbols.
4
Text Attributes
• There are a great many text options that can be made
available to graphics programmers.
• Typeface –choice of font,
Set of character with a particular design
i.e. courier, Helvetica, times roman etc.
• Assorted underlining styles
• Solid, dotted, double
• Boldface
• Italic
• Emboss
• Shadow style
5
A font and associated style is selected in a PHIGS program
by setting an integer code for the text font parameter tf
in the function
▪ setTextFont (tf)
6
Control of text color(intensity) is managed from an
application program with
▪setTextColourIndex (tc)
Text size
By scaling the overall dimensions of character
Height
Width
Or scaling the height only
Or scaling the width only
7
Text size can be adjusted without changing the
width-to-height ratio of characters with
setCharacterHeight (ch)
Text size
By scaling the overall dimensions of character
Height
Width
Or scaling the height only
Or scaling the width only
8
Height 1
Height 2
Height 3+
9
The width of text can be set with the function
setCharacterExpansionFactor (cw)
where the character width parameter cw is set to a positive real value
that scales the body width of characters.
Spacing between characters is controlled separately with
setCharacterSpacing (cs)
where character spacing parameter cs can be asiigned any real value.
Orientation
10
♦Set according to the direction of a character up vector
setCharacterUpVector ( upvect)
Parameter upvect is assigned two values that specify the x and y vector
components.
Marker Attributes
11
A marker symbol is a single character that can be displayed in
different colors and in different sizes.
We select a particular character to be the marker symbol with
setMarkertype (mt)
where the marker type parameter mt is set to an integer code.
we set the marker size with
setMarkerSizeScalefactor (ms)
ms is assigned a positive number.
12
Marker color is specified with
setPolymarkerColourIndex (mc)
A selected color code for parameter mc is stored in the current
attribute list and used to display subsequently specified
marker primitives.
Bundled Attributes
13
BUNDLED ATTRIBUTES
▪A particular set of attribute values tor a primitive
on each output device is then chosen by specifying
the appropriate table index. Attributes specified in
this manner called bundled attributes
14
15
Bundle Attributes
▪ Bundled Line Attributes
▪ Bundled Area-Fi Attributes
▪ Bundled Text Attributes
▪ Bundled Marker Attributes
16
17
18
Inquiry Function
19
Antialiasing
▪Increase resolution (increase sampling)
▪Supersampling
20
Increase resolution (increase
sampling)
21
Render the image at a higher resolution and downsample.
Really, you are letting your eye do some filtering for you.
Supersampling
▪For each pixel, we would like to figure out what
“percentage” is covered.
22
THANK YOU!!!!!!!
23

Attributes of output Primitive

  • 1.
  • 2.
    Main Areas… 2 ▪ CharacterAttributes ▪ Bundled Attributes ▪ Inquiry Functions ▪ Antialiasing
  • 3.
  • 4.
    CHARACTER ATTRIBUTES ▪ Theappearance of displayed characters is controlled by attributes such as Font size Color Orientation. ▫ Attributes can be set both for entire character strings (text) and for individual characters defined as marker symbols. 4
  • 5.
    Text Attributes • Thereare a great many text options that can be made available to graphics programmers. • Typeface –choice of font, Set of character with a particular design i.e. courier, Helvetica, times roman etc. • Assorted underlining styles • Solid, dotted, double • Boldface • Italic • Emboss • Shadow style 5
  • 6.
    A font andassociated style is selected in a PHIGS program by setting an integer code for the text font parameter tf in the function ▪ setTextFont (tf) 6 Control of text color(intensity) is managed from an application program with ▪setTextColourIndex (tc)
  • 7.
    Text size By scalingthe overall dimensions of character Height Width Or scaling the height only Or scaling the width only 7 Text size can be adjusted without changing the width-to-height ratio of characters with setCharacterHeight (ch)
  • 8.
    Text size By scalingthe overall dimensions of character Height Width Or scaling the height only Or scaling the width only 8 Height 1 Height 2 Height 3+
  • 9.
    9 The width oftext can be set with the function setCharacterExpansionFactor (cw) where the character width parameter cw is set to a positive real value that scales the body width of characters. Spacing between characters is controlled separately with setCharacterSpacing (cs) where character spacing parameter cs can be asiigned any real value.
  • 10.
    Orientation 10 ♦Set according tothe direction of a character up vector setCharacterUpVector ( upvect) Parameter upvect is assigned two values that specify the x and y vector components.
  • 11.
    Marker Attributes 11 A markersymbol is a single character that can be displayed in different colors and in different sizes. We select a particular character to be the marker symbol with setMarkertype (mt) where the marker type parameter mt is set to an integer code. we set the marker size with setMarkerSizeScalefactor (ms) ms is assigned a positive number.
  • 12.
    12 Marker color isspecified with setPolymarkerColourIndex (mc) A selected color code for parameter mc is stored in the current attribute list and used to display subsequently specified marker primitives.
  • 13.
  • 14.
    BUNDLED ATTRIBUTES ▪A particularset of attribute values tor a primitive on each output device is then chosen by specifying the appropriate table index. Attributes specified in this manner called bundled attributes 14
  • 15.
  • 16.
    Bundle Attributes ▪ BundledLine Attributes ▪ Bundled Area-Fi Attributes ▪ Bundled Text Attributes ▪ Bundled Marker Attributes 16
  • 17.
  • 18.
  • 19.
  • 20.
    Antialiasing ▪Increase resolution (increasesampling) ▪Supersampling 20
  • 21.
    Increase resolution (increase sampling) 21 Renderthe image at a higher resolution and downsample. Really, you are letting your eye do some filtering for you.
  • 22.
    Supersampling ▪For each pixel,we would like to figure out what “percentage” is covered. 22
  • 23.