100 likes | 194 Views
CGMB314. Character Attributes & Antialiasing. Character Attributes. We control the appearance of displayed character with attributes such as Font size Color Orientation. Character Attributes. Text-display option Typeface – choice of font Set of character with a particular design
E N D
CGMB314 Character Attributes & Antialiasing
Character Attributes • We control the appearance of displayed character with attributes such as • Font size • Color • Orientation
Character Attributes • 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
Character Attributes • 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
Character Attributes • Text size • By scaling the overall dimensions of character • Height • Width • Or scaling the height only • Or scaling the width only
Character Attributes • Orientation • Set according to the direction of a character up vector • Orientation of character from baseline to capline is in the direction of up vector • Set using text-path orientation • Arrange the character strings vertically or horizontally or forward or backward • Adjust the position of the individual characters in the frame buffer according to the option selected • Combination of up-vector and text-path to produce slanted text
Character Attributes • Other attributes • Character spacing • Spacing between character • Alignment • How text is to be displayed with respect to a reference position • Align according to the base line • Align according to the character center • Text-precision attribute (in some graphics packages) • Specify the amount of detail and the particular processing options that are to be used with the text string • Special character
Antialiasing • A methods that compensate for the undersampling process (aliasing) • Aliasing • Is a distortion of information due to low-frequency sampling (under-sampling) • The sampling process digitizes coordinate points on an object to discrete integer pixel position • Resulting • A jagged, or stair-step appearance
Antialiasing • One way to increase sampling rate with raster system • Simply to display objects at higher resolution • Even with highest resolution, the jaggies still apparent to some extent • So it is not a complete solution • Other antialising method may be applied
Antialiasing Methods • Supersampling (postfiltering) • Sampling object characteristic at a high resolution and displaying the results at a lower resolution • Involve computing intensities at subpixel grid position, then combine the results to obtain the pixel intensities • Area sampling (prefiltering) • Determine pixel intensity by calculating the areas of overlap of each pixel with the object to be displayed • Pixel phasing • Shifting the display location of pixel areas • Applied by “micropositioning” the electron beam in relation to object geometry • Filtering techniques • More accurate method for antialiasing lines • Methods similar to applying a weighted pixel mask, but now we imagine a continuous weighting surface covering the pixel • Antialiasing Area Boundary • Applying an antialiasing concepts for boundaries area