* Add ImageRaster.getWidth() and getHeight()
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9874 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
7ee0f9e07c
commit
4d01146519
@ -59,6 +59,16 @@ public class AndroidImageInfo extends ImageRaster {
|
||||
return format;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWidth() {
|
||||
return getBitmap().getWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return getBitmap().getHeight();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPixel(int x, int y, ColorRGBA color) {
|
||||
getBitmap().setPixel(x, y, color.asIntARGB());
|
||||
|
@ -65,6 +65,16 @@ public class DefaultImageRaster extends ImageRaster {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPixel(int x, int y, ColorRGBA color) {
|
||||
rangeCheck(x, y);
|
||||
|
@ -91,6 +91,20 @@ public abstract class ImageRaster {
|
||||
public ImageRaster() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pixel width of the underlying image.
|
||||
*
|
||||
* @return the pixel width of the underlying image.
|
||||
*/
|
||||
public abstract int getWidth();
|
||||
|
||||
/**
|
||||
* Returns the pixel height of the underlying image.
|
||||
*
|
||||
* @return the pixel height of the underlying image.
|
||||
*/
|
||||
public abstract int getHeight();
|
||||
|
||||
/**
|
||||
* Sets the pixel at the given coordinate to the given color.
|
||||
* <p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user