Skip to main content

DXBitmap Class

A bitmap image.

Declaration

public class DXBitmap extends DXImage

Inherited Members

com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject
DXImage
DXBitmap

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 DXBitmap object.

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 DXBitmap object.

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 DXBitmap object.

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

true if the bitmaps are equal; otherwise, false.

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

true if the object equals this bitmap; otherwise, false.

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 DXRotateFlipType object that specifies the rotation and flip operation.

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.