DisplayPipelineDraw2dText Method (String, Color, Point3d, TextHorizontalAlignment, TextVerticalAlignment, Single, String, Boolean, Boolean, Boolean, Boolean, Boolean) |
Draws 2D text on the viewport.
Namespace:
Rhino.Display
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntaxpublic void Draw2dText(
string text,
Color color,
Point3d worldCoordinate,
TextHorizontalAlignment horizontalAlignment,
TextVerticalAlignment verticalAlignment,
float height,
string fontface,
bool bold,
bool italic,
bool underline,
bool strikethrough,
bool applyKerning
)
Public Sub Draw2dText (
text As String,
color As Color,
worldCoordinate As Point3d,
horizontalAlignment As TextHorizontalAlignment,
verticalAlignment As TextVerticalAlignment,
height As Single,
fontface As String,
bold As Boolean,
italic As Boolean,
underline As Boolean,
strikethrough As Boolean,
applyKerning As Boolean
)
Parameters
- text
- Type: SystemString
The string to draw. - color
- Type: System.DrawingColor
Text color. - worldCoordinate
- Type: Rhino.GeometryPoint3d
Definition point in world coordinates. The alignment attaches to this point. - horizontalAlignment
- Type: Rhino.DocObjectsTextHorizontalAlignment
Where the definition point sits across the text's horizontal advance. - verticalAlignment
- Type: Rhino.DocObjectsTextVerticalAlignment
Where the definition point sits down the text's lines. BottomOfTop puts the first line's baseline on the point; Top puts the top of a capital there, which is what the middleJustified=false overloads draw. - height
- Type: SystemSingle
Height in pixels (good default is 12). - fontface
- Type: SystemString
Font name (good default is "Arial"). - bold
- Type: SystemBoolean
If true, the bold face of the font family is used. - italic
- Type: SystemBoolean
If true, the italic face of the font family is used. - underline
- Type: SystemBoolean
If true, the text is underlined. - strikethrough
- Type: SystemBoolean
If true, the text is struck through. - applyKerning
- Type: SystemBoolean
If true, the font's kerning pairs are used to space the glyphs.
See Also