Class Size
Defines a class which allows to specify 2D size of object in pixels
Inherited Members
Namespace:
Assembly: .dll
Syntax
public final class Size
Constructors
Size(int width, int height)
Createa a new Size instance
Declaration
public Size(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
int | width | The width value in pixels |
int | height | The height value in pixels |
Fields
Empty
Constant with empty size (0, 0)
Declaration
public static final Size Empty
Field Value
Type | Description |
---|---|
OnePixelSize
Constant with one pixel size (1, 1)
Declaration
public static final Size OnePixelSize
Field Value
Type | Description |
---|---|
height
The height value in pixels
Declaration
public final int height
Field Value
Type | Description |
---|---|
int |
width
The width value in pixels
Declaration
public final int width
Field Value
Type | Description |
---|---|
int |
Methods
equals(Object o)
Declaration
public boolean equals(Object o)
Parameters
Type | Name | Description |
---|---|---|
Object | o |
Returns
Type | Description |
---|---|
boolean |
Overrides
hashCode()
Declaration
public int hashCode()
Returns
Type | Description |
---|---|
int |
Overrides
isEmpty()
Gets value indicating whether this size is empty
Declaration
public boolean isEmpty()
Returns
Type | Description |
---|---|
boolean | True if this size is empty |
isOnePixelSize()
Gets the value indicating whether this size is one pixel size
Declaration
public boolean isOnePixelSize()
Returns
Type | Description |
---|---|
boolean | True if this size is one pixel size |
toString()
Declaration
public String toString()
Returns
Type | Description |
---|---|
String |