Class AreaOfInterest
Describes an rectangle area of interest in an asset
Inheritance
Namespace: ImageVault.Common.Data
Assembly: ImageVault.Common.dll
Syntax
public class AreaOfInterest : Object
Constructors
AreaOfInterest()
Default constructor
Declaration
public AreaOfInterest()
AreaOfInterest(AreaOfInterest)
Copy constructor
Declaration
public AreaOfInterest(AreaOfInterest aoi)
Parameters
Type | Name | Description |
---|---|---|
AreaOfInterest | aoi |
AreaOfInterest(Double, Double, Double, Double)
Creates an area of interest where all parameters describing the area are in percentages of the assets width and height
Declaration
public AreaOfInterest(double x, double y, double width, double height)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | |
System.Double | y | |
System.Double | width | |
System.Double | height |
AreaOfInterest(Int32, Int32, Int32, Int32, Int32, Int32)
Creates an area of interest by supplying the area of interest in pixels
Declaration
public AreaOfInterest(int x, int y, int width, int height, int assetWidth, int assetHeight)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | |
System.Int32 | y | |
System.Int32 | width | |
System.Int32 | height | |
System.Int32 | assetWidth | |
System.Int32 | assetHeight |
Properties
Height
The height of the area of interest in percentage of the asset height
Declaration
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Width
The width of the area of interest in percentage of the asset width
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
X
The X coordinate the area of interest in percentage of the asset width
Declaration
public double X { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Y
The y coordinate the area of interest in percentage of the asset height
Declaration
public double Y { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
AdjustForCrop(Size, Rectangle)
Adjusts the area of interest after a crop has been performed
Declaration
public void AdjustForCrop(Size startSize, Rectangle rect)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Size | startSize | Size of original image |
System.Drawing.Rectangle | rect | Crop rectangle |
AdjustForCrop(Int32, Int32, Rectangle)
Adjusts the area of interest after a crop has been performed
Declaration
public void AdjustForCrop(int startWidth, int startHeight, Rectangle rect)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | startWidth | Width of the original image |
System.Int32 | startHeight | Height of the original image |
System.Drawing.Rectangle | rect | Crop rectangle |
AdjustForCrop(Int32, Int32, Int32, Int32, Int32, Int32)
Adjusts the area of interest after a crop has been performed
Declaration
public void AdjustForCrop(int startWidth, int startHeight, int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | startWidth | Width of the original image |
System.Int32 | startHeight | Height of the original image |
System.Int32 | x | crop x coordinate |
System.Int32 | y | crop y coordinate |
System.Int32 | width | crop width |
System.Int32 | height | crop height |
Equals(AreaOfInterest)
Declaration
protected bool Equals(AreaOfInterest other)
Parameters
Type | Name | Description |
---|---|---|
AreaOfInterest | other |
Returns
Type | Description |
---|---|
System.Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Operators
Equality(AreaOfInterest, AreaOfInterest)
Declaration
public static bool operator ==(AreaOfInterest left, AreaOfInterest right)
Parameters
Type | Name | Description |
---|---|---|
AreaOfInterest | left | |
AreaOfInterest | right |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(AreaOfInterest, AreaOfInterest)
Declaration
public static bool operator !=(AreaOfInterest left, AreaOfInterest right)
Parameters
Type | Name | Description |
---|---|---|
AreaOfInterest | left | |
AreaOfInterest | right |
Returns
Type | Description |
---|---|
System.Boolean |