Interface IHasImage
A container for an image.
Inherited Members
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface IHasImage : INotifyPropertyChanged
Properties
| Improve this Doc View SourceBrightness
Gets or sets the brightness of the object. This is an additional modifier to the tint (Tint), which allows you to reach brighter colors than the original image. The brightness has 4 components to allow modifying each of the 4 RGBA components of the original color. By default it's (1,1,1,1), meaning no changes to the original image. To make the object twice as bright, set Brightness = new Vector4(2,2,2,2), or simply: new Vector4(2).
Declaration
Vector4 Brightness { get; set; }
Property Value
Type | Description |
---|---|
Vector4 | The brightness. |
Image
Gets or sets the image.
Declaration
IImage Image { get; set; }
Property Value
Type | Description |
---|---|
IImage | The image. |
Opacity
Gets or sets the opacity of the object. 0 for fully transparent, 255 for fully opaque.
Declaration
byte Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Byte | The opacity. |
Pivot
Gets or sets the pivot point from which the position, scale and rotation are determined. For example, rotating an image from its center point will rotate it in place, while rotating it from its bottom-left point will rotate the entire image around the bottom-left. It might help to think of the pivot as the point on an image on which you place your finger on before rotating.
The units of the pivot point is in relation to the image size, where (0f,0f) is the bottom-left corner, and (1f,1f) is the top-right corner. The default is (0.5f, 0f), which means the bottom-center point of the image.
Declaration
PointF Pivot { get; set; }
Property Value
Type | Description |
---|---|
PointF | The pivot. |
Examples
image.Pivot = new PointF(0.5f, 0.5f); //placing the pivot point in the middle of the image
|
Improve this Doc
View Source
Tint
Gets or sets the tinting color for the object.
cHero.Tint = Colors.Red; //will give our here a red tint.
Declaration
Color Tint { get; set; }
Property Value
Type | Description |
---|---|
Color | The tint. |