Show / Hide Table of Contents

    Interface ICropSelfComponent

    Adds the ability to crop the shown image (only show part of the image).

    Inherited Members
    IComponent.Name
    IComponent.Entity
    IComponent.RegistrationType
    IComponent.Init(IEntity, Type)
    IComponent.AfterInit()
    System.IDisposable.Dispose()
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public interface ICropSelfComponent : IComponent, IDisposable, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    CropArea

    The visible area (everything else will be cropped), where (0,0) is the bottom-left corner.

    Declaration
    RectangleF CropArea { get; set; }
    Property Value
    Type Description
    RectangleF
    | Improve this Doc View Source

    CropEnabled

    Gets or sets a value indicating whether this ICropSelfComponent crop is enabled.

    Declaration
    bool CropEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if crop enabled; otherwise, false.

    | Improve this Doc View Source

    LastCrop

    The information on the last crop.

    Declaration
    AGSCropInfo LastCrop { get; }
    Property Value
    Type Description
    AGSCropInfo

    The last crop.

    | Improve this Doc View Source

    NeverGuaranteedToFullyCrop

    Gets or sets a value indicating whether this ICropSelfComponent is never guaranteed to fully crop (so calling IsGuaranteedToFullyCrop() will always return true, ensuring bounding box calculations are always performed on this entity (even if it's outside a scrolling panel).

    Declaration
    bool NeverGuaranteedToFullyCrop { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if never guaranteed to fully crop; otherwise, false.

    | Improve this Doc View Source

    OnBeforeCrop

    An event which fires before cropping the area, allows to change the crop configuration.

    Declaration
    IBlockingEvent<BeforeCropEventArgs> OnBeforeCrop { get; }
    Property Value
    Type Description
    IBlockingEvent<BeforeCropEventArgs>

    The on before crop.

    Methods

    | Improve this Doc View Source

    Crop(ref AGSBoundingBox, BoundingBoxType, PointF)

    Calculates and crops both the texture and the bounding box (used by the engine).

    Declaration
    AGSCropInfo Crop(ref AGSBoundingBox box, BoundingBoxType boundingBoxType, PointF adjustedScale)
    Parameters
    Type Name Description
    AGSBoundingBox box

    The bounding box to crop.

    BoundingBoxType boundingBoxType

    Which type of bounding box is to be cropped.

    PointF adjustedScale

    Adjusted scale.

    Returns
    Type Description
    AGSCropInfo

    The crop info.

    | Improve this Doc View Source

    IsGuaranteedToFullyCrop()

    Is the entity guaranteed to be fully cropped? In specific scenario we can know for certain that the entity will be fully cropped from the scene, which can be used for optimizations in the engine. For example: if the entity is part of a vertical stack layout and the previous item was cropped from the top we know that this item will also be fully cropped.

    Declaration
    bool IsGuaranteedToFullyCrop()
    Returns
    Type Description
    System.Boolean

    true, if guaranteed to fully crop, false otherwise.

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