DXBitmap Class
A bitmap image.
Declaration
public class DXBitmap extends DXImage
Inherited Members
Inheritance
DXBitmap(int width, int height)
Initializes a new instance of the DXBitmap class with specified settings.
Declaration
public DXBitmap(int width, int height)
Parameters
| Name | Type | Description |
|---|---|---|
| width | int | The bitmap width, in pixels. |
| height | int | The bitmap height, in pixels. |
Methods
clone() Method
Creates a copy of this bitmap.
Declaration
public DXImage clone()
Returns
| Type | Description |
|---|---|
| DXImage | The cloned |
crop(Rectangle rectangle) Method
Returns a cropped bitmap for the specified rectangle.
Declaration
public DXBitmap crop(Rectangle rectangle)
Parameters
| Name | Type | Description |
|---|---|---|
| rectangle | Rectangle | The crop rectangle. |
Returns
| Type | Description |
|---|---|
DXBitmap |
The cropped |
crop(RectangleF rectangle) Method
Returns a cropped bitmap for the specified rectangle.
Declaration
public DXBitmap crop(RectangleF rectangle)
Parameters
| Name | Type | Description |
|---|---|---|
| rectangle | RectangleF | The crop rectangle. |
Returns
| Type | Description |
|---|---|
DXBitmap |
The cropped |
equals(DXBitmap other) Method
Checks whether this bitmap equals the specified bitmap.
Declaration
public boolean equals(DXBitmap other)
Parameters
| Name | Type | Description |
|---|---|---|
| other | DXBitmap |
The bitmap to compare with this bitmap. |
Returns
| Type | Description |
|---|---|
| boolean |
|
equals(Object obj) Method
Checks whether this bitmap equals the specified object.
Declaration
public boolean equals(Object obj)
Parameters
| Name | Type | Description |
|---|---|---|
| obj | Object | The object to compare with this bitmap. |
Returns
| Type | Description |
|---|---|
| boolean |
|
getPixel(int x, int y) Method
Returns the color of the specified pixel.
Declaration
public Color getPixel(int x, int y)
Parameters
| Name | Type | Description |
|---|---|---|
| x | int | The X-coordinate, in pixels. |
| y | int | The Y-coordinate, in pixels. |
Returns
| Type | Description |
|---|---|
| Color | The color of the specified pixel. |
hashCode() Method
Returns a hash code value for this object.
Declaration
public int hashCode()
Returns
| Type | Description |
|---|---|
| int | The hash code. |
rotateFlip(DXRotateFlipType rotateFlipType) Method
Rotates and flips this bitmap.
Declaration
public void rotateFlip(DXRotateFlipType rotateFlipType)
Parameters
| Name | Type | Description |
|---|---|---|
| rotateFlipType | DXRotateFlipType | A |
setPixel(int x, int y, Color color) Method
Sets the color of the specified pixel.
Declaration
public void setPixel(int x, int y, Color color)
Parameters
| Name | Type | Description |
|---|---|---|
| x | int | The X-coordinate, in pixels. |
| y | int | The Y-coordinate, in pixels. |
| color | Color | The pixel color. |
setResolution(float horizontalResolution, float verticalResolution) Method
Specifies the bitmap resolution.
Declaration
public void setResolution(float horizontalResolution, float verticalResolution)
Parameters
| Name | Type | Description |
|---|---|---|
| horizontalResolution | float | The horizontal resolution, in dots per inch. |
| verticalResolution | float | The vertical resolution, in dots per inch. |