Interface IBitmapTextDraw
This interface allows drawing text on a bitmap.
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface IBitmapTextDraw
Methods
| Improve this Doc View SourceCreateContext()
Creates the drawing context which should be disposed after drawing the text.
Declaration
IDisposable CreateContext()
Returns
Type | Description |
---|---|
System.IDisposable | The context. |
DrawText(String, ITextConfig, SizeF, SizeF, Int32, Int32, Single)
Draws the text on the bitmap.
Declaration
void DrawText(string text, ITextConfig config, SizeF textSize, SizeF baseSize, int maxWidth, int height, float xOffset)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text to draw. |
ITextConfig | config | Configuration to apply when drawing the text. |
SizeF | textSize | The expected text size. |
SizeF | baseSize | The size of the text container, based on which the text should be aligned. |
System.Int32 | maxWidth | The maximum width allowed for the text (use int.MaxValue for unlimited width). |
System.Int32 | height | The expected height of the text after adding padding and outline. |
System.Single | xOffset | An optional x pixels to offset the drawn text. |