Interface ICropSelfComponent
Adds the ability to crop the shown image (only show part of the image).
Inherited Members
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface ICropSelfComponent : IComponent, IDisposable, INotifyPropertyChanged
Properties
| Improve this Doc View SourceCropArea
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 |
CropEnabled
Gets or sets a value indicating whether this ICropSelfComponent crop is enabled.
Declaration
bool CropEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
LastCrop
The information on the last crop.
Declaration
AGSCropInfo LastCrop { get; }
Property Value
Type | Description |
---|---|
AGSCropInfo | The last crop. |
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 |
|
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 SourceCrop(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. |
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 |
|