You are here: Start » FIL.NET » Function Reference » Image » Image Drawing » FIL.DrawString
Draws a string on an image.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void DrawString ( FilNet.Image ioImage, string inString, FilNet.Location inLocation, FilNet.Anchor2D inLocationAnchor, FilNet.Pixel inColor, FilNet.DrawingStyle inDrawingStyle, float inSize, float inOrientationAngle )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
ioImage | FilNet.Image | ||||
![]() | inString | string | |||
![]() | inLocation | FilNet.Location | |||
![]() | inLocationAnchor | FilNet.Anchor2D | MiddleCenter | Default value: MiddleCenter. | |
![]() | inColor | FilNet.Pixel | |||
![]() | inDrawingStyle | FilNet.DrawingStyle | |||
![]() | inSize | float | 12.0f | Height of a character. Default value: 12.0f. | |
![]() | inOrientationAngle | float | 0.0f | Default value: 0.0f. |
Description
The operation draws a string on the ioImage aligning the inLocationAnchor location of the text at the inLocation of the ioImage. The height of the font is fixed and equals 16 pixels.

Usage of DrawString with various settings.
Examples
Following example draws appropriate message when no object is found in template matching-like inspection. It is a part of the bigger Basic Template Matching Example.
FIL.DrawString( inspectingImage, "No object found", new Location(inspectingImage.Width / 2, inspectingImage.Height / 2), Anchor2D.MiddleCenter, new Pixel(255.0f, 0.0f, 0.0f, 255.0f), style, 40.0f, 0.0f);