Show / Hide Table of Contents

    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 Source

    CreateContext()

    Creates the drawing context which should be disposed after drawing the text.

    Declaration
    IDisposable CreateContext()
    Returns
    Type Description
    System.IDisposable

    The context.

    | Improve this Doc View Source

    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.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX