Text Methods

The following methods are used to display text dynamically in a window area and to modify the state of a device context. See GetWindowDC, GetDC, and GetButtonDC for information on how to retrieve a device context.

Write

>>-aDialogControl~Write(--xPos--,--yPos--,--text---------------->

>--+--------------------------------------+--------------------->
   |    +-"SYSTEM"-+                      |
   +-,--+----------+--+-----------------+-+
        +-fontName-+  |    +-10-------+ |
                      +-,--+----------+-+
                           +-fontSize-+

>--+--------------------------------------------------------------------------+--)-><
   +-+----------------------------------------------------------------------+-+
     +-+------------------------------------------------------------------+-+
       |       +-----------------+                                        |
       |       V +-OPAQUE------+ |                                        |
       +-,--"----+-THIN--------+-+--"--+--------------------------------+-+
                 +-EXTRALIGHT--+       +-,--+---------+--+------------+-+
                 +-LIGHT-------+            +-fgColor-+  +-,--bkColor-+
                 +-MEDIUM------+
                 +-SEMIBOLD----+
                 +-EXTRABOLD---+
                 +-BOLD--------+
                 +-HEAVY-------+
                 +-UNDERLINE---+
                 +-ITALIC------+
                 +-STRIKEOUT---+
                 +-TRANSPARENT-+
                 +-CLIENT------+


The Write method writes the specified text to the device context associated with the dialog or dialog control in the given font, style, and color at the given position.

Arguments:

The arguments are:

xPos, yPos

The starting position of the text, in pixels.

text

The string that you want to write to the dialog or dialog control.

fontName

The name of a font. If omitted, the SYSTEM font is used.

fontSize

The size of the font. If omitted, the standard size (10) is used.

fontStyle

One or more of the keywords listed in the syntax diagram, separated by blanks:

TRANSPARENT

This style writes the text without clearing the background.

OPAQUE

This style, which is the default, clears the background with the given background color, or with white if the background color is omitted, before writing the text.

CLIENT

The device context of the client area of the dialog or dialog control is used instead of the device context of the entire dialog or dialog control.

fgcolor

The color index of the text color.

bkColor

The color index of the background color. The background color is not used in transparent mode.

Example:

The following example writes the string "Hello world!" to the dialog using a blue 24pt Arial font in bold and transparent, italic style:

MyDialog~Write(5, 5, "Hello world!", "Arial", 24, ,
"BOLD ITALIC TRANSPARENT CLIENT", 4)

WriteDirect

>>-aDialogControl~WriteDirect(--dc--,--xPos--,--yPos--,--text--)-><


The WriteDirect method enables you to write text to a device context at a given position.

Arguments:

The arguments are:

dc

A device context.

xPos, yPos

The position where the text is placed, in pixels.

text

The string you want to write to the dialog or dialog control.

TransparentText

>>-aDialogControl~TransparentText(--dc--)----------------------><


The TransparentText method enables you to write text to a device context using WriteDirect in transparent mode, that is, without a white background behind the text. Restore the default mode using OpaqueText.

Arguments:

The only argument is:

dc

A device context.

OpaqueText

>>-aDialogControl~OpaqueText(--dc--)---------------------------><


The OpaqueText method restores the default text mode, that is, with a white background behind the text, which overlays whatever is at that position in the dialog or dialog control. Use this method after transparent mode was set using TransparentText.

Arguments:

The only argument is:

dc

A device context.

WriteToWindow

>>-aDialogControl~WriteToWindow(--hwnd--,--xPos--,--yPos--,--text-->

>--+--------------------------------------+--------------------->
   |    +-"SYSTEM"-+                      |
   +-,--+----------+--+-----------------+-+
        +-fontName-+  |    +-10-------+ |
                      +-,--+----------+-+
                           +-fontSize-+

>--+--------------------------------------------------------------------------+--)-><
   +-+----------------------------------------------------------------------+-+
     +-+------------------------------------------------------------------+-+
       |       +-----------------+                                        |
       |       V +-OPAQUE------+ |                                        |
       +-,--"----+-THIN--------+-+--"--+--------------------------------+-+
                 +-EXTRALIGHT--+       +-,--+---------+--+------------+-+
                 +-LIGHT-------+            +-fgColor-+  +-,--bkColor-+
                 +-MEDIUM------+
                 +-SEMIBOLD----+
                 +-EXTRABOLD---+
                 +-BOLD--------+
                 +-HEAVY-------+
                 +-UNDERLINE---+
                 +-ITALIC------+
                 +-STRIKEOUT---+
                 +-TRANSPARENT-+
                 +-CLIENT------+


The WriteToWindow method enables you to write text to a dialog or dialog control in the given font and size to the given position.

Arguments:

The arguments are:

hwnd

The handle of the dialog or dialog control. See Get for how to get a valid handle.

xPos, yPos

The starting position of the text, in pixels.

text

The string you want to write to the dialog or dialog control.

fontName

The name of a font. If omitted, the SYSTEM font is used.

fontSize

The size of the font. If omitted, the standard size (10) is used.

fontStyle

One or more of the keywords listed in the syntax diagram, separated by blanks:

TRANSPARENT

This style writes the text without clearing the background.

OPAQUE

This style, which is the default, clears the background with the given background color, or with white if the background color is omitted, before writing the text.

CLIENT

The device context of the dialog's client area is used instead of the device context of the entire dialog.

Example:

This example writes the string "Hello world!" to the dialog window using a 24pt Arial font in bold and italic style:

hwnd=MyDialog~Get
MyDialog~WriteToWindow(hwnd, 23, 15, "Hello world!", ,
                       "Arial", 24, "BOLD ITALIC")

WriteToButton

>>-aDialogControl~WriteToButton(--id--,--xPos--,--yPos--,--text-->

>--+--------------------------------------+--------------------->
   |    +-"SYSTEM"-+                      |
   +-,--+----------+--+-----------------+-+
        +-fontName-+  |    +-10-------+ |
                      +-,--+----------+-+
                           +-fontSize-+

>--+--------------------------------------------------------------------------+--)-><
   +-+----------------------------------------------------------------------+-+
     +-+------------------------------------------------------------------+-+
       |       +-----------------+                                        |
       |       V +-OPAQUE------+ |                                        |
       +-,--"----+-THIN--------+-+--"--+--------------------------------+-+
                 +-EXTRALIGHT--+       +-,--+---------+--+------------+-+
                 +-LIGHT-------+            +-fgColor-+  +-,--bkColor-+
                 +-MEDIUM------+
                 +-SEMIBOLD----+
                 +-EXTRABOLD---+
                 +-BOLD--------+
                 +-HEAVY-------+
                 +-UNDERLINE---+
                 +-ITALIC------+
                 +-STRIKEOUT---+
                 +-TRANSPARENT-+
                 +-CLIENT------+


The WriteToButton method enables you to write text to a button in the given font and size to the given position.

Arguments:

The arguments are:

id

The ID of a button.

See WriteToWindow for a description of the other arguments.

getTextSizeScreen

>>--getTextSizeScreen(-text--+---------+--+------------+--+-------------+-)----><
                             +-,-type--+  +-,-fontSrc--+  +-,-fontSize--+

Gets the size, width and height, in pixels, needed to display a string in a specific font. To calculate the size in dialog units use the getTextSizeDlg() method.

Note: This method can only be used after the underlying Windows dialog has been created. In general this means in the initDialog() method or later in the life cycle of the dialog. If this method is invoked prior to the creation of the underlying dialog, a syntax error is rasised.

Arguments:

The arguments are:

text

The string whose size is desired. If none of the optional arguments are specified then the font in use by this object (dialog or dialog control object) is used to calculate the size.

type

Optional. However, if any of the optional arguments are used this argument is required. It signals what fontSrc is. The allowed types are:

Indirect

fontSrc is a font name and fontSize is the size of the font. The calculation is done indirectly by temporarily obtaining a logical font using these parameters.

DC

fontSrc is a handle to a device context. The correct font for the calculation must already be selected into this device context. fontSize is ignored. See the getDC() and fontToDC() methods for information on obtaining a device context and selecting a font into it.

Font

fontSrc is a handle to a font. fontSize is ignored.

Only the first letter of type is needed and case is not significant.

fontSrc

Optional. The source of the font to use in calculating the size. This argument object must match the type specification. It can be either a string, (a font name,) a hand to a device context, or a handle to a font.

fontSize

Optional. The size of the font. This argument is always ignored unless the type argument is Indirect. If type is Indirect and this argument is omitted then the defualt font size is used. (Currently the default size is 8.)

Return value:

The size needed for the string is returned in a Size object. The size is specified in pixels.

Example:

This example uses 2 static controls to display two strings. The static controls are positioned so that the second string immediately follows the first string. The size calculated is based on the font currently in use by the controls. The calculation is correct no matter what font is in use by the controls, even if the two controls use different fonts. (This is a contrived example, it was used for testing. Instead of having a space character in between the 2 strings, the ending "t" and the beginning "a" are positioned with no space between them.)

stFont1 = self~getStaticControl(IDC_ST_FONT1)
stFont2 = self~getStaticControl(IDC_ST_FONT2)

size = stFont1~getTextSizeScreen("San Diego is great")
stFont1~setText("San Diego is great")
stFont1~setRect(1, 1, size~width, size~height)

nextX = 1 + size~width + 1
size = stFont2~getTextSizeScreen("and ooRexx is the best")
stFont2~setText("and ooRexx is the best")
stFont2~setRect(nextX, 1, size~width, size~height)

setFont

>>--setFont(--fontHandle--+---------+--)-------------------------><
                          +-,redraw-+


The setFont method assigns another font to be used for the text in a dialog or dialog control.

Arguments:

The arguments are:

fontHandle

The handle to the font that is to be used by the dialog or dialog control. There are several methods to get the font handle, including createFontEx() or getFont().

redraw

Optional, .true or .false. If you specify .true, the message sent to the underlying dialog or dialog control tells it to redraw itself. If you specify .false, the dialog or dialog control is not told to redraw itself. The default is .true.

Return value:

This method always returns 0.

Example:

The following example creates the font Arial with a size of 14 and assigns it to the tree view control FILES, which is forced to be redrawn.

hfnt = Mydialog~createFontEx("Arial", 14)
MyDialog~getTreeControl("FILES")~setFont(hfnt, .true)

getFont

>>--getFont----------------------------------------------------><

Retrieves a handle to the font currently being used by the dialog or dialog control.

Arguments:

There are no arguments for this method

Return value:

This method returns a handle to the font for text used by the dialog or dialog control.

Example:

This is an example from a fictious program where a custom font is used to emphasis the text in two static controls. When the user does some action, the text in one control is emphasised and the other is de-emphsised. One way to do this is to just swap the fonts.

::method onToggle private
  static1 = self~getStaticControl(IDC_ST_OUTSTANDING_BLANCE)
  static2 = self~getStaticControl(IDC_ST_LASTPAYMENT)

  font1 = static1~getFont
  font2 = static2~getFont
  static1~setFont(font2)
  static2~setFont(font1)

createFont

>>--createFont(--+----------+-+------------+-+---------+-+-------------+--)----><
                 +-fontName-+ +-,-fontSize-+ +-,-style-+ +-,-fontWidth-+

The createFont method creates a font and returns its handle.

Note the implementation of this method is incorrect. It does not return the font specified. The correct method to use is createFontEx(). createFont() is maintained for program compatibility. Some existing programs may rely on using the (incorrect) font returned.

Arguments:

The arguments are:

fontName

Optional. The name of the font. the default is System.

fontSize

Optional. The size of the font. The default is 10.

style

Optional. One or more of the following keyword, separated by blanks.

THIN EXTRALIGHTLIGHT
MEDIUM SEMIBOLD EXTRABOLD
BOLD HEAVY UNDERLINE
ITALIC STRIKEOUT 

fontWidth

Optional. The average width of the characters in the font. If omitted, the width is set to the value of fontSize.

createFontEx

>>--createFontEx(--fontName-+--------------+--+---------------+--)-------------><
                            +-,-pointSize--+  +-,-additional--+

Creates a logical font with the characteristics requested. This should be the preferred method to create fonts in ooDialog. The createFont() method does not properly create the font requested.

The returned font can be used in any method that takes a font, such as, setFont(), setItemFont(), or fontToDC(). When the programmer is done with the font, the operating system resources used by the font can be released with the deleteFont() method.

The Windows operating system uses a font mapper to map a logical font to the characteristics of the font requested. Because available fonts can vary from system to system, the returned font is not always the same as the requested font. For example, if a font named Palatino is requested, but no such font is available on the system, the font mapper will substitute a font that has similar attributes but a different name.

The interface to the font mapper takes a wide range of arguments to specify many different attributes of the requested font. The additional argument gives the ooRexx programmer the ability to use any, or all, of these arguments. On the other hand, The createFontEx() method has good defaults for each of the arguments, allowing the programmer to use the method with a minimum of effort.

If an application will run on different systems, where the programmer does not know in advance what fonts will be available on each system, carefully specifying the font characteristics will help give the application the same look on each system. The font mapper will pick a font on each system that most closely matches the requested attributes.

Details

This method provides an interface to the Win32 API: CreateFont(). Use the MSDN library documentation to get more information on the arguments to this method.

Sets the .SystemErrorCode variable.

Raises syntax errors when incorrect arguments are detected.

Arguments:

The arguments are:

fontName

The typeface name of the requested font. The fonts folder, accessed from the Control Panel, on Windows lists the typeface names of all fonts installed on the system.

As noted above, the font mapper will try to substitute a similar font if the typeface name does not match any of the installed fonts.

pointSize

Optional. The point size of the requested font. The default is 8.

additional

Optional. A .Directory object whose indexes define additional characteristics of the requested font. For any missing index, the default value is used for that characteristic. If this argument is omitted then the default value for all characteristics is used.

The indexes are listed below. Each index maps to an argument of the Win32 API, CreateFont(). As suggested above, the programmer should consult the MSDN library documentation to get complete information on the individual arguments. The value for each index must be either numeric or logical, depending on the index.

The indexes below are listed in the same order as the arguments to CreateFont() from nWidth to fdwPitchAndFamily. Where an index has a link, the link provides some more information on the possible values for index. The valid indexes are:

IndexMeaningDefault
WIDTHThe average width of the characters in the requested font0
ESCARPMENTThe angle between the escapement vector and the x-axis of the device0
ORIENTATIONThe angle between each character's base line and the x-axis of the device0
WEIGHTThe weight of the fontFW_NORMAL
ITALICTrue for an italic fontfalse
UNDERLINETrue for an uderlined fontfalse
STRIKEOUTTrue for a strikeout fontfalse
CHARSETSpecifies the character setDEFAULT_CHARSET
OUTPUTPRECISIONSpecifies the output precisionOUT_TT_PRECIS
CLIPPRECISIONSpecifies the clipping precisionCLIP_DEFAULT_PRECIS
QUALITYSpecifies the output qualityDEFAULT_QUALITY
PITCHANDFAMILYSpecifies the pitch and family of the fontFF_DONTCARE

Return value:

The return is a handle to a font that can be used in any ooDialog method that requires a font handle. Because of the way the font mapper works, it is hard to conceive of a circustance where this method would fail. However, if it were to fail, the .SystemErrorCode variable would be non-zero.

Example:

This example creates a 16 point, italic, underlined, Ariel font and then uses the font for a static control.


additional = .directory~new
additional~italic = .true
additional~underline = .true

hFont = self~createFontEx("Arial", 16, additional)
hOldFont = self~getStaticControl(IDC_ST_ALERT)~setFont(hFont)
...

This example creates a 14 point, bold, italic, Times New Roman font and instructs the font mapper to only choose from true type fonts. If there are no true type fonts installed on the system, then the font mapper returns to its default behavior.


FW_BOLD = 700
OUT_TT_ONLY_PRECIS = 7

additional = .directory~new
additional~italic = .true
additional~weight = FW_BOLD
additional~outputPrecison = OUT_TT_ONLY_PRECIS

hFont = self~createFontEx("Times New Roman", 14, additional)

createFontEx Argument Values

The following list is the indexes of the .Directory object that can be used for the third argument of the createFontEx() method. The list provides additional information on the meaning of values that can be assigned to each index.

width Must be an integer.

Specifies the average width, in logical units, of the characters in the requested font. The default value of zero, tells the font mapper to choose a closest match value. This is likely to produce the best results, unless the programmer has some need that requires specifying the character width.

The closest match value is determined by comparing the absolute values of the difference between the current device's aspect ratio and the digitized aspect ratio of available fonts.

escarpment Must be an integer.

Specifies the angle, in tenths of degrees, between the escapement vector and the x-axis of the device. The escapement vector is parallel to the base line of a row of text. Windows has no predefined values for this argument.

orientation Must be an integer.

Specifies the angle, in tenths of degrees, between each character's base line and the x-axis of the device. Windows has no predefined values for this argument.

weight Must be an integer.

Specifies the weight of the font in the range 0 through 1000. For example, 400 is normal and 700 is bold. If this value is zero, a default weight is used. The following table shows Windows predefined values for this argument:

ValueWeight
FW_DONTCARE 0
FW_THIN 100
FW_EXTRALIGHT200
FW_ULTRALIGHT200
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_HEAVY 900
FW_BLACK 900

italic Must be a logical.

Set this index to .true to request an italic font. The default is .false.

underline Must be a logical.

Set this index to .true to request an underlined font. The default is .false.

strikeout Must be a logical.

Set this index to .true to request a strike out font. The default is .false.

charset Must be an integer.

Specifies the character set. The following values are predefined in Windows:

SymbolValue
ANSI_CHARSET 0
BALTIC_CHARSET 186
CHINESEBIG5_CHARSET136
DEFAULT_CHARSET 1
EASTEUROPE_CHARSET 238
GB2312_CHARSET 134
GREEK_CHARSET 161
HANGUL_CHARSET 129
MAC_CHARSET 77
OEM_CHARSET 255
RUSSIAN_CHARSET 204
SHIFTJIS_CHARSET 128
SYMBOL_CHARSET 2
TURKISH_CHARSET 162
VIETNAMESE_CHARSET 163

outputPrecsion Must be an integer.

The output precision defines how closely the output must match the requested font's height, width, character orientation, escapement, pitch, and font type.

Applications can use the OUT_DEVICE_PRECIS, OUT_RASTER_PRECIS, OUT_TT_PRECIS, and OUT_PS_ONLY_PRECIS values to control how the font mapper chooses a font when the operating system contains more than one font with a specified name. For example, if an operating system contains a font named Symbol in raster and TrueType form, specifying OUT_TT_PRECIS forces the font mapper to choose the TrueType version. Specifying OUT_TT_ONLY_PRECIS forces the font mapper to choose a TrueType font, even if it must substitute a TrueType font of another name.

It can be one of the following values:

SymbolMeaningValue
OUT_CHARACTER_PRECISNot used.2
OUT_DEFAULT_PRECIS Specifies the default font mapper behavior. 0
OUT_DEVICE_PRECIS Instructs the font mapper to choose a Device font when the system contains multiple fonts with the same name. 5
OUT_OUTLINE_PRECIS This value instructs the font mapper to choose from TrueType and other outline-based fonts. 8
OUT_PS_ONLY_PRECIS Instructs the font mapper to choose from only PostScript fonts. If there are no PostScript fonts installed in the system, the font mapper returns to default behavior. 10
OUT_RASTER_PRECIS Instructs the font mapper to choose a raster font when the system contains multiple fonts with the same name. 6
OUT_STRING_PRECIS Not used.1
OUT_STROKE_PRECIS Not used.3
OUT_TT_ONLY_PRECIS Instructs the font mapper to choose from only TrueType fonts. If there are no TrueType fonts installed in the system, the font mapper returns to default behavior. 7
OUT_TT_PRECIS Instructs the font mapper to choose a TrueType font when the system contains multiple fonts with the same name. 4

clipPrecision Must be an integer.

The clipping precision defines how to clip characters that are partially outside the clipping region. It can be one or more of the following values. Use .DlgUtil~or to combine values.

SymbolMeaningValue
CLIP_CHARACTER_PRECIS Not used.1 (0x01)
CLIP_DEFAULT_PRECISSpecifies default clipping behavior.0 (0x00)
CLIP_DFA_DISABLE Windows XP SP1: Turns off font association for the font. Note that this flag is not guaranteed to have any effect on any platform after Windows Server 2003. 64 (0x40)
CLIP_EMBEDDED You must specify this flag to use an embedded read-only font. 128 (0x80)
CLIP_LH_ANGLES When this value is used, the rotation for all fonts depends on whether the orientation of the coordinate system is left-handed or right-handed. If not used, device fonts always rotate counterclockwise, but the rotation of other fonts is dependent on the orientation of the coordinate system. For more information about the orientation of coordinate systems, see the description of the orientation parameter. 16 (0x10)
CLIP_MASKNot used.15 (0x0f)
CLIP_STROKE_PRECISNot used.2 (0x02)
CLIP_TT_ALWAYSNot used.32 (0x20)

quality Must be an integer.

The output quality defines how carefully the font mapper must attempt to match the logical-font attributes to those of an actual physical font.

Note that if neither ANTIALIASED_QUALITY nor NONANTIALIASED_QUALITY is selected, the font is antialiased only if the user chooses "smooth screen fonts" in Control Panel. Quality can be one of the following values:

SymbolMeaningValue
ANTIALIASED_QUALITY Font is antialiased, or smoothed, if the font supports it and the size of the font is not too small or too large. 4
CLEARTYPE_QUALITY If set, text is rendered (when possible) using ClearType antialiasing method. See Remarks for more information. 6
DEFAULT_QUALITY Appearance of the font does not matter. 0
DRAFT_QUALITY Appearance of the font is less important than when the PROOF_QUALITY value is used. For GDI raster fonts, scaling is enabled, which means that more font sizes are available, but the quality may be lower. Bold, italic, underline, and strikeout fonts are synthesized, if necessary. 1
NONANTIALIASED_QUALITY Font is never antialiased, that is, font smoothing is not done. 3
PROOF_QUALITY Character quality of the font is more important than exact matching of the logical-font attributes. For GDI raster fonts, scaling is disabled and the font closest in size is chosen. Although the chosen font size may not be mapped exactly when PROOF_QUALITY is used, the quality of the font is high and there is no distortion of appearance. Bold, italic, underline, and strikeout fonts are synthesized, if necessary. 2

pitchAndFamily Must be an integer.

Specifies the pitch and family of the font. Font families describe the look of a font in a general way. They are intended for specifying fonts when the exact typeface requested is not available.

Combine one pitch value with one family value. The values are combined using a boolean or, but in this case they could simply be added. The programmer can also use .DlgUtil~or to combine values.

SymbolMeaningValue
Pitch  
DEFAULT_PITCH  0
FIXED_PITCH  1
VARIABLE_PITCH 2
Family  
FF_DECORATIVE Novelty fonts. Old English is an example. 128 (0x80)
FF_DONTCARE Use default font. 4 (0x04)
FF_MODERN Fonts with constant stroke width, with or without serifs. Pica, Elite, and Courier New are examples. 32 (0x20)
FF_ROMAN Fonts with variable stroke width and with serifs. MS Serif is an example. 8 (10x08)
FF_SCRIPT Fonts designed to look like handwriting. Script and Cursive are examples. 64 (0x40)
FF_SWISS Fonts with variable stroke width and without serifs. MS Sans Serif is an example. 16 (0x10)

deleteFont

>>-aDialogControl~deleteFont(--hFont--)------------------------><


The deleteFont method deletes a font. This method is to be used to delete a font created with the createFontEx() method.

Arguments:

The only argument is:

hFont

The handle of a font.

FontToDC

>>-aDialogControl~FontToDC(--dc--,hFont--)---------------------><


The FontToDC method loads a font into a device context and returns the handle of the previous font. Use the GetWindowDC, GetDC, or GetButtonDC method to retrieve a device context, and the createFontEx() method to get a font handle. To reset the font to the original state, use another FontToDC call with the handle of the previous font. To release the device context, use the FreeWindowDC, FreeDC, or FreeButtonDC method.

Arguments:

The arguments are:

dc

The device context of a dialog or button.

hFont

The handle of a font.

Example:

This example loads an Arial font into the current dialog window:

additional = .directory~new
additional~italic = .true
hfnt = MyDialog~createFontEx("Arial", 16, additional)
dc   = MyDialog~GetDC
oldf = MyDialog~FontToDC(dc,hfnt)  /* activate font */
...
MyDialog~FontToDC(dc,oldf)         /* restore previous font */
MyDialog~FreeDC(dc)

FontColor

>>-aDialogControl~FontColor(--color--,dc--)--------------------><


The FontColor method sets the font color for a device context.

Arguments:

The arguments are:

color

The index of a color in the system's color palette.

dc

The device context.