Show / Hide Table of Contents

    Interface IMaskLoader

    Allows loading a mask from an image.

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

    Methods

    | Improve this Doc View Source

    Load(Boolean[,], String, Boolean, Nullable<Color>, String)

    Load the mask from the specified 2d array.

    Declaration
    IMask Load(bool[, ] mask, string id, bool inverseMask = false, Color? debugDrawColor = default(Color? ), string saveMaskToFile = null)
    Parameters
    Type Name Description
    System.Boolean[,] mask

    Mask.

    System.String id

    Identifier.

    System.Boolean inverseMask

    If set to true inverse mask.

    System.Nullable<Color> debugDrawColor

    Debug draw color.

    System.String saveMaskToFile

    Save mask to file.

    Returns
    Type Description
    IMask

    The load.

    | Improve this Doc View Source

    Load(String, IBitmap, Boolean, Nullable<Color>, String)

    Load the mask from the specified image.

    Declaration
    IMask Load(string id, IBitmap image, bool transparentMeansMasked = false, Color? debugDrawColor = default(Color? ), string saveMaskToFile = null)
    Parameters
    Type Name Description
    System.String id

    A unique id which will be given to the mask.

    IBitmap image

    The image to use as the mask.

    System.Boolean transparentMeansMasked

    If set to true then a transparent pixel means a masked value, otherwise a non transparent pixel means a masked value.

    System.Nullable<Color> debugDrawColor

    For debugging purposes you can specify a color, which will then add an object to the mask which can drawn on screen (will use the color to draw the mask).

    System.String saveMaskToFile

    Whether to save the mask to file (for debugging purposes).

    Returns
    Type Description
    IMask

    The mask.

    | Improve this Doc View Source

    Load(String, Boolean, Nullable<Color>, String, String)

    Load the mask from the specified resource/file path (IResourceLoader).

    Declaration
    IMask Load(string path, bool transparentMeansMasked = false, Color? debugDrawColor = default(Color? ), string saveMaskToFile = null, string id = null)
    Parameters
    Type Name Description
    System.String path

    The resource/file path.

    System.Boolean transparentMeansMasked

    If set to true then a transparent pixel means a masked value, otherwise a non transparent pixel means a masked value.

    System.Nullable<Color> debugDrawColor

    For debugging purposes you can specify a color, which will then add an object to the mask which can drawn on screen (will use the color to draw the mask).

    System.String saveMaskToFile

    Whether to save the mask to file (for debugging purposes).

    System.String id

    A unique identifier for the mask (the path will be used as id if an id is not specified).

    Returns
    Type Description
    IMask

    The mask.

    | Improve this Doc View Source

    LoadAsync(String, Boolean, Nullable<Color>, String, String)

    Load the mask asynchronously from the specified resource/file path (IResourceLoader).

    Declaration
    Task<IMask> LoadAsync(string path, bool transparentMeansMasked = false, Color? debugDrawColor = default(Color? ), string saveMaskToFile = null, string id = null)
    Parameters
    Type Name Description
    System.String path

    The resource/file path.

    System.Boolean transparentMeansMasked

    If set to true then a transparent pixel means a masked value, otherwise a non transparent pixel means a masked value.

    System.Nullable<Color> debugDrawColor

    For debugging purposes you can specify a color, which will then add an object to the mask which can drawn on screen (will use the color to draw the mask).

    System.String saveMaskToFile

    Whether to save the mask to file (for debugging purposes).

    System.String id

    A unique identifier for the mask (the path will be used as id if an id is not specified).

    Returns
    Type Description
    System.Threading.Tasks.Task<IMask>

    The mask.

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