[]
        
(Showing Draft Content)

GrapeCity.Drawing.IDrawingContext.DrawText

DrawText Method

DrawText(string, Font, Rectangle, DrawingTextFormat, double)

Draws the specified text string in the specified rectangle with the specified Brush and GrapeCity.Spreadsheet.Font objects.

Declaration
void DrawText(string value, Font font, Rectangle rect, DrawingTextFormat drawingTextFormat = DrawingTextFormat.None, double rotation = 0)
Sub DrawText(value As String, font As Font, rect As Rectangle, Optional drawingTextFormat As DrawingTextFormat = DrawingTextFormat.None, Optional rotation As Double = 0)
Parameters
Type Name Description
string value

String to draw.

Font font

GrapeCity.Spreadsheet.Font that defines the text format of the string.

Rectangle rect

Rectangle structure that specifies the boundary of the drawn text.

DrawingTextFormat drawingTextFormat

DrawingTextFormat structure that specifies the drawing text format.

double rotation

DrawText(RichText, Rectangle, DrawingTextFormat)

Draws the specified text string in the specified rectangle with the specified Brush and GrapeCity.Spreadsheet.Font objects.

Declaration
void DrawText(RichText richText, Rectangle rect, DrawingTextFormat drawingTextFormat = DrawingTextFormat.None)
Sub DrawText(richText As RichText, rect As Rectangle, Optional drawingTextFormat As DrawingTextFormat = DrawingTextFormat.None)
Parameters
Type Name Description
RichText richText

The text to draw.

Rectangle rect

Rectangle structure that specifies the boundary of the drawn text.

DrawingTextFormat drawingTextFormat

DrawingTextFormat structure that specifies the drawing text format.

DrawText(TextDocument, Rectangle)

Draws the specified text string in the specified rectangle with the specified Brush and GrapeCity.Spreadsheet.Font objects.

Declaration
void DrawText(TextDocument text, Rectangle rect)
Sub DrawText(text As TextDocument, rect As Rectangle)
Parameters
Type Name Description
TextDocument text

The text to draw.

Rectangle rect

Rectangle structure that specifies the boundary of the drawn text.