D3DX8.CreateText
Creates a mesh containing the specified text using the font associated with the device context.
object.CreateText( _
D3DDevice As Direct3DDevice8, _
HDC As Long, _
Text As String, _
Deviation As Single, _
Extrusion As Single, _
RetMesh As D3DXMesh, _
GlyphMetrics As Any)
Parts
- object
- Object expression that resolves to a D3DX8 object.
- D3DDevice
- Direct3DDevice8 object to be associated with the created text.
- HDC
- Device context, containing the font for output. The font selected by the device context must be a TrueType font.
- Text
- A string, specifying the text to generate.
- Deviation
- Maximum chordal deviation from true font outlines.
- Extrusion
- Amount to extrude text in the negative Z direction.
- RetMesh
- The output shape, a D3DXMesh object.
- GlyphMetrics
- First element of an array of GLYPHMETRICSFLOAT types to receive the glyph metric data. Each GLYPHMETRICSFLOAT type in the array contains information about the placement and orientation of the corresponding glyph in the string. The number of elements in the array should be equal to the number of characters in the string. Note that the origin in each type is not relative to the entire string, but rather is relative to that character cell. To compute the entire bounding box, add the increment for each glyph while traversing the string.
If you are not concerned with the glyph sizes, you can pass ByVal 0 to GlyphMetrics
Error Codes
If the method fails, an error is raised and Err.Number can be set to one of the following values.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.