gestalt.texture.bitmap
Class ByteBitmap
java.lang.Object
gestalt.texture.bitmap.ByteBitmap
- All Implemented Interfaces:
- Bitmap, java.lang.Cloneable
public class ByteBitmap
- extends java.lang.Object
- implements Bitmap
- To do:
- the pixel operations only work for BITMAP_COMPONENT_ORDER_RGBA
|
Constructor Summary |
ByteBitmap(byte[] thePixels,
int theWidth,
int theHeight,
int theComponentOrder)
|
|
Method Summary |
void |
blend(Bitmap theBitmap,
int theX,
int theY,
int theSourceFactorType,
int theDestinationFactorType)
|
java.lang.Object |
clone()
|
void |
combine(Bitmap theBitmap,
int theX,
int theY,
int theBlendmode)
|
void |
combine(Bitmap theBitmap,
int theX,
int theY,
int theBlendmode,
float theSource,
float theDestination)
|
void |
copyPixels(Bitmap theBitmap,
int theX,
int theY)
|
ByteBitmap |
duplicate()
|
void |
fill(Color theColor)
|
void |
flipX()
|
void |
flipY()
|
float |
getAf(int x,
int y)
|
float |
getBf(int x,
int y)
|
byte[] |
getByteDataRef()
|
int |
getComponentOrder()
|
java.lang.Object |
getDataRef()
|
static ByteBitmap |
getDefaultImageBitmap(int theWidth,
int theHeight)
|
float |
getGf(int x,
int y)
|
int |
getHeight()
|
Color |
getPixel(int x,
int y)
|
void |
getPixel(int x,
int y,
byte[] thePixel)
|
void |
getPixel(int x,
int y,
Color thePixel)
|
int |
getProportionType()
|
float |
getRf(int x,
int y)
|
int |
getWidth()
|
void |
invert()
|
static ByteBitmap |
load(java.io.InputStream theStream)
|
void |
setAf(int x,
int y,
float theValue)
|
void |
setAfs(int x,
int y,
float theValue)
|
void |
setBf(int x,
int y,
float theValue)
|
void |
setBfs(int x,
int y,
float theValue)
|
void |
setByteDataRef(byte[] theDataRef)
|
void |
setDataRef(java.lang.Object theDataRef)
|
void |
setGf(int x,
int y,
float theValue)
|
void |
setGfs(int x,
int y,
float theValue)
|
void |
setPixel(int x,
int y,
byte[] thePixel)
|
void |
setPixel(int x,
int y,
Color thePixel)
|
void |
setPixelComponent(int x,
int y,
int thePixelComponent,
byte thePixelComponentValue)
|
void |
setRf(int x,
int y,
float theValue)
|
void |
setRfs(int x,
int y,
float theValue)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NUMBER_OF_PIXEL_COMPONENTS
public static final int NUMBER_OF_PIXEL_COMPONENTS
- See Also:
- Constant Field Values
ByteBitmap
public ByteBitmap(byte[] thePixels,
int theWidth,
int theHeight,
int theComponentOrder)
getDefaultImageBitmap
public static ByteBitmap getDefaultImageBitmap(int theWidth,
int theHeight)
getWidth
public int getWidth()
- Specified by:
getWidth in interface Bitmap
getHeight
public int getHeight()
- Specified by:
getHeight in interface Bitmap
getComponentOrder
public int getComponentOrder()
- Specified by:
getComponentOrder in interface Bitmap
getProportionType
public int getProportionType()
- Specified by:
getProportionType in interface Bitmap
getDataRef
public java.lang.Object getDataRef()
- Specified by:
getDataRef in interface Bitmap
setDataRef
public void setDataRef(java.lang.Object theDataRef)
- Specified by:
setDataRef in interface Bitmap
getByteDataRef
public byte[] getByteDataRef()
setByteDataRef
public void setByteDataRef(byte[] theDataRef)
load
public static ByteBitmap load(java.io.InputStream theStream)
combine
public void combine(Bitmap theBitmap,
int theX,
int theY,
int theBlendmode)
combine
public void combine(Bitmap theBitmap,
int theX,
int theY,
int theBlendmode,
float theSource,
float theDestination)
copyPixels
public void copyPixels(Bitmap theBitmap,
int theX,
int theY)
fill
public void fill(Color theColor)
invert
public void invert()
flipY
public void flipY()
flipX
public void flipX()
blend
public void blend(Bitmap theBitmap,
int theX,
int theY,
int theSourceFactorType,
int theDestinationFactorType)
getPixel
public Color getPixel(int x,
int y)
- Specified by:
getPixel in interface Bitmap
getPixel
public void getPixel(int x,
int y,
Color thePixel)
- Specified by:
getPixel in interface Bitmap
setPixel
public void setPixel(int x,
int y,
Color thePixel)
- Specified by:
setPixel in interface Bitmap
getRf
public float getRf(int x,
int y)
getGf
public float getGf(int x,
int y)
getBf
public float getBf(int x,
int y)
getAf
public float getAf(int x,
int y)
setRf
public void setRf(int x,
int y,
float theValue)
setGf
public void setGf(int x,
int y,
float theValue)
setBf
public void setBf(int x,
int y,
float theValue)
setAf
public void setAf(int x,
int y,
float theValue)
setRfs
public void setRfs(int x,
int y,
float theValue)
setGfs
public void setGfs(int x,
int y,
float theValue)
setBfs
public void setBfs(int x,
int y,
float theValue)
setAfs
public void setAfs(int x,
int y,
float theValue)
getPixel
public void getPixel(int x,
int y,
byte[] thePixel)
- To do:
- in order to remove the dependency on byte[] data the methods below
need to be moved to a more specific type of 'Bitmap'.
'ByteBitmap' for example.
setPixel
public void setPixel(int x,
int y,
byte[] thePixel)
setPixelComponent
public void setPixelComponent(int x,
int y,
int thePixelComponent,
byte thePixelComponentValue)
duplicate
public ByteBitmap duplicate()
clone
public java.lang.Object clone()
- Overrides:
clone in class java.lang.Object
processing library gestalt_p5 by Patrick Kochlik + Dennis Paul. (c) 2009