Show / Hide Table of Contents

    Interface IMask

    A mask is basically a 2D array of booleans, usually representing an area on the screen.

    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public interface IMask

    Properties

    | Improve this Doc View Source

    DebugDraw

    When loading the mask there's an option for drawing the mask on the screen, for debugging purposes.

    Declaration
    IObject DebugDraw { get; }
    Property Value
    Type Description
    IObject

    The debug draw.

    | Improve this Doc View Source

    Height

    Gets the height.

    Declaration
    int Height { get; }
    Property Value
    Type Description
    System.Int32

    The height.

    | Improve this Doc View Source

    MaxX

    The maximum X with a "masked" (i.e a true) value.

    Declaration
    float MaxX { get; }
    Property Value
    Type Description
    System.Single

    The max x.

    | Improve this Doc View Source

    MaxY

    The maximum Y with a "masked" (i.e a true) value.

    Declaration
    float MaxY { get; }
    Property Value
    Type Description
    System.Single

    The max y.

    | Improve this Doc View Source

    MinX

    The minimum X with a "masked" (i.e a true) value.

    Declaration
    float MinX { get; }
    Property Value
    Type Description
    System.Single

    The minimum x.

    | Improve this Doc View Source

    MinY

    The minimum Y with a "masked" (i.e a true) value.

    Declaration
    float MinY { get; }
    Property Value
    Type Description
    System.Single

    The minimum y.

    | Improve this Doc View Source

    Width

    Gets the width.

    Declaration
    int Width { get; }
    Property Value
    Type Description
    System.Int32

    The width.

    Methods

    | Improve this Doc View Source

    ApplyToMask(Boolean[][], Point)

    Adds the current mask to the target specified mask (i.e all true values in the current mask will be set to true in the target mask).

    Declaration
    void ApplyToMask(bool[][] mask, Point offset)
    Parameters
    Type Name Description
    System.Boolean[][] mask

    Mask.

    Point offset

    The offset of the mask from the (0,0) co-ordinate

    | Improve this Doc View Source

    AsJaggedArray()

    Returns the mask as a jagged array (https://msdn.microsoft.com/en-us/library/2s05feca.aspx).

    Declaration
    bool[][] AsJaggedArray()
    Returns
    Type Description
    System.Boolean[][]

    The jagged array.

    | Improve this Doc View Source

    DebugString()

    Returns a display string with the mask contents as asterisks, for debugging purposes.

    Declaration
    string DebugString()
    Returns
    Type Description
    System.String

    The string.

    | Improve this Doc View Source

    IsMasked(PointF)

    Is the specific point masked (i.e has a true value in the 2D array)?

    Declaration
    bool IsMasked(PointF point)
    Parameters
    Type Name Description
    PointF point

    Point.

    Returns
    Type Description
    System.Boolean

    true, if masked, false otherwise.

    | Improve this Doc View Source

    IsMasked(PointF, AGSBoundingBox, Single, Single)

    Is the specific point masked after projecting the mask on the specified square?

    Declaration
    bool IsMasked(PointF point, AGSBoundingBox projectionBox, float scaleX, float scaleY)
    Parameters
    Type Name Description
    PointF point

    Point.

    AGSBoundingBox projectionBox

    Projection box.

    System.Single scaleX

    The projection box x scaling (is only needed to know if the projection box is flipped horizontally).

    System.Single scaleY

    The projection box y scaling (is only need to know if the projection box is flipped vertically).

    Returns
    Type Description
    System.Boolean

    true, if masked, false otherwise.

    | Improve this Doc View Source

    To2DArray()

    Copies the mask to a 2D array and returns it.

    Declaration
    bool[, ] To2DArray()
    Returns
    Type Description
    System.Boolean[,]

    The DA rray.

    | Improve this Doc View Source

    Transform(Matrix4)

    Transform the mask (by moving and/or rotating it).

    Declaration
    void Transform(Matrix4 matrix)
    Parameters
    Type Name Description
    Matrix4 matrix

    The transform matrix.

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