Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Chapter 8 GDI Orientation and Transformations Visual C++ and MFC Fundamentals


BYTE nCharSet,
BYTE nOutPrecision,
BYTE nClipPrecision,
BYTE nQuality,
BYTE nPitchAndFamily,
LPCTSTR lpszFacename);

The nHeight argument is the height applied to the text.
The nWidth value is the desired width that will be applied on the text.
The nEscapement is the angle used to orient the text. The angle is calculated as a multiple
of 0.1 and oriented counterclockwise.
The nOrientation is the angular orientation of the text with regards to the horizontal axis.
The nWeight is used to attempt to control the font weight of the text because it is affected
by the characteristics of the font as set by the designer. It holds values that displays text
from thin heavy bold. The possible values are:

Constant Value Constant Value
FW_DONTCARE 0 FW_THIN 100
FW_EXTRALIGHT 200 FW_ULTRALIGHT 200
FW_LIGHT 300
FW_NORMAL 400 FW_REGULAR 400
FW_MEDIUM 500
FW_SEMIBOLD 600 FW_DEMIBOLD 600
FW_BOLD 700
FW_EXTRABOLD 800 FW_ULTRABOLD 800
FW_BLACK 900 FW_HEAVY 900

The bItalic specifies whether the font will be italicized (TRUE) or not (FALSE).
The bUnderline is used to underline (TRUE) or not underline (FALSE) the text.
The cStrikeOut is specifies whether the text should be stroke out (TRUE) or not (FALSE)
with a line.
The nCharSet, specifies the character set used. The possible values are:

Constant Value
ANSI_CHARSET 0
DEFAULT_CHARSET 1
SYMBOL_CHARSET 2
SHIFTJIS_CHARSET 128
OEM_CHARSET 255

The nOutPrecision controls the amount precision used to evaluate the numeric values
used on this function for the height, the width, and angles. It can have one of the
following values: OUT_CHARACTER_PRECIS, OUT_STRING_PRECIS,
OUT_DEFAULT_PRECIS, OUT_STROKE_PRECIS, OUT_DEVICE_PRECIS,
OUT_TT_PRECIS, OUT_RASTER_PRECIS

If some characters may be drawn outside of the area in which they are intended, the
nClipPrecision is used to specify how they may be clipped. The possible value used are
CLIP_CHARACTER_PRECIS, CLIP_MASK, CLIP_DEFAULT_PRECIS,
CLIP_STROKE_PRECIS, CLIP_ENCAPSULATE, CLIP_TT_ALWAYS,
CLIP_LH_ANGLES.
Free download pdf