character aatributes

15
By, Aswathy R K TKMCE, Kollam

Upload: aswathy-raveendran-r-k

Post on 13-Jul-2015

43 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Character aatributes

By,

Aswathy R K

TKMCE, Kollam

Page 2: Character aatributes

Character Attributes

♦We control the appearance of displayed character with attributes such as

♦Font size

♦Color

♦Orientation

Page 3: Character aatributes

Text-display option

♦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

Page 4: Character aatributes

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)

Page 5: Character aatributes

Color settings

♦ Can be stored in the system attribute list and used by the procedures that generate character definition in the frame buffer

♦ Current color is used to set pixel values in the frame buffer corresponding to the character shapes and position

♦ Control of text color(intensity) is managed from an application program with

setTextColourIndex (tc)

where text color parameter tc specifies an allowable color code.

Page 6: Character aatributes

Text size

♦By scaling the overall dimensions of character

♦Height

♦Width

♦Or scaling the height only

♦Or scaling the width only

Page 7: Character aatributes

Text size can be adjusted without changing the width-to-height ratio of characters with

setCharacterHeight (ch)

Parameter ch is assigned a real value greater than zero to set the coordinate height of capital letters: the distance between baseline capline in user coordinates.

Page 8: Character aatributes

The effect of different character height settings on displayed text.

Height 1

Height 2

Height 3

Page 9: Character aatributes

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.

Page 10: Character aatributes

Orientation

♦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.

Page 11: Character aatributes

♦Set using text-path orientation

♦Arrange the character strings vertically or horizontally

setTextPath (tp)

tp can be assigned the values right, left,up or down.

♦Combination of up-vector and text-path to produce slanted text.

Page 12: Character aatributes

Alignment

This attribute specifies how text is to be positioned with respect to the start coordinates.

setTextAlignment (h,v)

where parameters h and v control horizontal and vertical alignment.

Page 13: Character aatributes

Marker AttributesA 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.

Page 14: Character aatributes

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.

Page 15: Character aatributes

THANK YOU