org.xith3d.scenegraph
Class TextureImage2D

java.lang.Object
  extended by org.xith3d.scenegraph.SceneGraphObject
      extended by org.xith3d.scenegraph.NodeComponent
          extended by org.xith3d.scenegraph.TextureImage
              extended by org.xith3d.scenegraph.TextureImage2D
All Implemented Interfaces:
org.jagatoo.datatypes.NamableObject, org.jagatoo.datatypes.NamedObject, org.jagatoo.loaders.textures.AbstractTextureImage

public class TextureImage2D
extends TextureImage

TextureImage2D defines 2D TextureImage as part of a Texture2D. Application may define internal format hint for OpenGL that determines how image data should be stored in texture memory. If both format and hint designate uncompressed formats, image will be transferred and stored in uncompressed form. If both format and hint designate compressed formats, image will be transferred and stored compressed form. If format designates uncompressed format and hint designates compressed format, image will be transferred in uncompressed form, compressed by OpenGL driver and stored in texture memory in compressed form.


Field Summary
 
Fields inherited from class org.xith3d.scenegraph.SceneGraphObject
XITH3D_USERDATAKEY_OLDUSERDATA
 
Constructor Summary
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, java.awt.image.BufferedImage image)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, java.awt.image.BufferedImage image, boolean yUp)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, boolean yUp)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, boolean yUp, org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int orgWidth, int orgHeight, java.awt.image.BufferedImage image, boolean yUp)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, byte[] data)
          Constructs a new TextureImage2D object.
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, byte[] data, int dataLength)
          Constructs a new TextureImage2D object.
protected TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, byte[] data, int dataLength, boolean useBuffer, org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, byte[] data, int dataLength, org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, byte[] data, org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, int orgWidth, int orgHeight, boolean yUp)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, int orgWidth, int orgHeight, boolean yUp, org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, int orgWidth, int orgHeight, byte[] data)
          Constructs a new TextureImage2D object.
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, int orgWidth, int orgHeight, byte[] data, int dataLength)
          Constructs a new TextureImage2D object.
protected TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, int orgWidth, int orgHeight, byte[] data, int dataLength, boolean useBuffer, org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, int orgWidth, int orgHeight, byte[] data, int dataLength, org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)
           
  TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format, int width, int height, int orgWidth, int orgHeight, byte[] data, org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)
           
 
Method Summary
 void clear(boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Clears the whole (used part of the) texture with a black-transparent color.
 void clear(org.openmali.vecmath2.Colorf color, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Clears the whole (used part of the) texture with the specified color.
 void clear(org.openmali.vecmath2.Colorf color, int offsetX, int offsetY, int width, int height, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Clears the given rectangle with the specified color.
 void clear(int offsetX, int offsetY, int width, int height, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Clears the given rectangle with a black-transparent color.
 void clear(TextureImage2D srcTI, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Draws the given TextureImage2D onto this one and simply overwrites anything.
 void clear(TextureImage2D srcTI, int trgX, int trgY, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Draws the given TextureImage2D onto this one and simply overwrites anything.
 void clear(TextureImage2D srcTI, int trgX, int trgY, int trgWidth, int trgHeight, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Draws the given TextureImage2D onto this one and simply overwrites anything.
 void clear(TextureImage2D srcTI, int srcX, int srcY, int srcWidth, int srcHeight, int trgX, int trgY, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Draws the given TextureImage2D onto this one and simply overwrites anything.
 void clear(TextureImage2D srcTI, int srcX, int srcY, int srcWidth, int srcHeight, int trgX, int trgY, int trgWidth, int trgHeight, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Draws the given TextureImage2D onto this one and simply overwrites anything.
 void clear(TextureImage2D srcTI, org.openmali.types.twodee.Rect2i srcRect, int trgX, int trgY, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Draws the given TextureImage2D onto this one and simply overwrites anything.
 void clearOutline(java.awt.Color color, int offsetX, int offsetY, int width, int height, int lineWidth, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Clears the given rectangle's outline with the specified color.
 void clearPixelLine(byte[] pixels, int pixelSize, int startX, int startY, int length, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Clears a horizontal line of pixels.
 void clearUpdateList()
           
 TextureImage2D cloneNodeComponent(boolean forceDuplicate)
          
protected  java.awt.Graphics2D createGraphics2D()
           
 void drawImage(TextureImage2D ti, int trgX, int trgY, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Draws the given TextureImage2D onto this one and honors the alpha channels (if any).
 void drawImage(TextureImage2D srcTI, int srcX, int srcY, int srcWidth, int srcHeight, int trgX, int trgY, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Draws the given TextureImage2D onto this one and honors the alpha channels (if any).
 void drawImage(TextureImage2D srcTI, int srcX, int srcY, int srcWidth, int srcHeight, int trgX, int trgY, int trgWidth, int trgHeight, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Draws the given TextureImage2D onto this one and honors the alpha channels (if any).
 void drawImage(TextureImage2D ti, org.openmali.types.twodee.Rect2i srcRect, int trgX, int trgY, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Draws the given TextureImage2D onto this one and honors the alpha channels (if any).
 void drawPixelLine(byte[] pixels, int pixelSize, int startX, int startY, int length, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Fills the complete (used part of the) texture with the specified color and combines alpha channels if necessary.
protected  void duplicateNodeComponent(NodeComponent original, boolean forceDuplicate)
          
 void fillFullRectangle(org.openmali.vecmath2.Colorf color, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
           
 void fillRectangle(org.openmali.vecmath2.Colorf color, int offsetX, int offsetY, int width, int height, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Fills the given rectangle with the specified color and combines alpha channels if necessary.
 void freeLocalData()
           
 java.awt.image.BufferedImage getBufferedImage()
           
<Rect2i_ extends org.openmali.types.twodee.Rect2i>
Rect2i_
getClipRect(Rect2i_ rect)
           
 int getData(byte[] data)
           
 void getData(java.nio.ByteBuffer bb)
           
 java.nio.ByteBuffer getDataBuffer()
           
 int getDataSize()
           
 byte[] getPixel(int x, int y, byte[] data)
           
 byte[] getPixelLine(int offset, int length, byte[] data)
           
 byte[] getPixelLine(int x, int y, int length, byte[] data)
           
 int getPixelSize()
          
<T extends org.openmali.vecmath2.Tuple2f>
T
getTextureCoordinateUR(T tcUR)
           
 org.openmali.vecmath2.TexCoord2f getTextureCoordinateUR(org.openmali.vecmath2.TexCoord2f tcUR)
           
 java.util.ArrayList<org.openmali.types.twodee.Rect2i> getUpdateList()
           
protected  boolean getYUp()
           
 boolean initImageData(boolean allowBiggerTexture, boolean usebuffer)
           
 boolean initImageData(int orgWidth, int orgHeight, boolean allowBiggerTexture)
           
 boolean initImageData(int orgWidth, int orgHeight, boolean allowBiggerTexture, boolean usebuffer)
           
protected  boolean initImageData(int width, int height, int orgWidth, int orgHeight, boolean allowBiggerTexture, boolean usebuffer)
           
 void setClipRect(int x, int y, int width, int height)
           
 void setClipRect(org.openmali.types.twodee.Rect2i clipRect)
           
 void setImageData(java.awt.image.BufferedImage image)
           
protected  void setImageData(java.awt.image.BufferedImage image, boolean useBuffer)
           
 void setImageData(byte[] data)
          Sets the data for the image.
protected  void setImageData(byte[] data, boolean useBuffer)
          Sets the data for the image.
 void setImageData(byte[] data, int dataLength)
          Sets the data for the image.
protected  void setImageData(byte[] data, int dataLength, boolean useBuffer)
          Sets the data for the image.
protected  void setPixel(int offset, byte[] data)
           
 void setPixel(int x, int y, byte[] data, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Sets one pixel.
 void setPixelLine(int trgByteOffset, byte[] data, int srcByteOffset, int length)
           
 void setPixelLine(int x, int y, byte[] data, int srcOffset, int length)
           
 void setPixelLine(int x, int y, int length, byte[] data, int srcByteOffset, boolean markDirty, org.openmali.types.twodee.Rect2i dirtyRect)
          Sets one (part of a) pixel line.
 void update(int x, int y, int width, int height)
          Marks a portion of the image component as dirty.
 void update(org.openmali.types.twodee.Rect2i r)
          Marks a portion of the image component as dirty.
 
Methods inherited from class org.xith3d.scenegraph.TextureImage
calculateNeededImageSize, freeOpenGLResources, getFormat, getHeight, getInternalFormat, getOriginalHeight, getOriginalSize, getOriginalWidth, getSize, getWidth, hasAlpha, hasData, isCompressed, isInternalFormatCompressed, setHasData, setInternalFormat, setOriginalSize, setSize
 
Methods inherited from class org.xith3d.scenegraph.NodeComponent
freeOpenGLResources, getDuplicateOnCloneTree, getModListener, isChanged, isChanged2, setChanged, setDuplicateOnCloneTree, setModListener
 
Methods inherited from class org.xith3d.scenegraph.SceneGraphObject
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      int orgWidth,
                      int orgHeight,
                      boolean yUp,
                      org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      int orgWidth,
                      int orgHeight,
                      boolean yUp)

TextureImage2D

protected TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                         int width,
                         int height,
                         int orgWidth,
                         int orgHeight,
                         byte[] data,
                         int dataLength,
                         boolean useBuffer,
                         org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      int orgWidth,
                      int orgHeight,
                      byte[] data,
                      int dataLength,
                      org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      int orgWidth,
                      int orgHeight,
                      byte[] data,
                      org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      int orgWidth,
                      int orgHeight,
                      byte[] data,
                      int dataLength)
Constructs a new TextureImage2D object.


TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      int orgWidth,
                      int orgHeight,
                      byte[] data)
Constructs a new TextureImage2D object.


TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      boolean yUp,
                      org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      boolean yUp)

TextureImage2D

protected TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                         int width,
                         int height,
                         byte[] data,
                         int dataLength,
                         boolean useBuffer,
                         org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      byte[] data,
                      int dataLength,
                      org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      byte[] data,
                      org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat)

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      byte[] data,
                      int dataLength)
Constructs a new TextureImage2D object.


TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int width,
                      int height,
                      byte[] data)
Constructs a new TextureImage2D object.


TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      int orgWidth,
                      int orgHeight,
                      java.awt.image.BufferedImage image,
                      boolean yUp)

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      java.awt.image.BufferedImage image,
                      boolean yUp)

TextureImage2D

public TextureImage2D(org.jagatoo.opengl.enums.TextureImageFormat format,
                      java.awt.image.BufferedImage image)
Method Detail

getYUp

protected final boolean getYUp()

getTextureCoordinateUR

public final org.openmali.vecmath2.TexCoord2f getTextureCoordinateUR(org.openmali.vecmath2.TexCoord2f tcUR)
Returns:
the texture-coordinate for the upper-right corner according to the size and original-size.

getTextureCoordinateUR

public final <T extends org.openmali.vecmath2.Tuple2f> T getTextureCoordinateUR(T tcUR)
Returns:
the texture-coordinate for the upper-right corner according to the size and original-size.

getPixelSize

public final int getPixelSize()


getDataSize

public final int getDataSize()

getDataBuffer

public final java.nio.ByteBuffer getDataBuffer()

getData

public final void getData(java.nio.ByteBuffer bb)

getData

public final int getData(byte[] data)

freeLocalData

public void freeLocalData()

update

public void update(int x,
                   int y,
                   int width,
                   int height)
Marks a portion of the image component as dirty. The region will be pushed to the graphics card on the next frame. Texture2D.setHasUpdateList(boolean) must be called afterwards.

Parameters:
x -
y -
width -
height -

update

public final void update(org.openmali.types.twodee.Rect2i r)
Marks a portion of the image component as dirty. The region will be pushed to the graphics card on the next frame. Texture2D.setHasUpdateList(boolean) must be called afterwards.

Parameters:
r -

getUpdateList

public final java.util.ArrayList<org.openmali.types.twodee.Rect2i> getUpdateList()

clearUpdateList

public final void clearUpdateList()

getBufferedImage

public java.awt.image.BufferedImage getBufferedImage()

createGraphics2D

protected java.awt.Graphics2D createGraphics2D()

setClipRect

public void setClipRect(int x,
                        int y,
                        int width,
                        int height)

setClipRect

public final void setClipRect(org.openmali.types.twodee.Rect2i clipRect)

getClipRect

public final <Rect2i_ extends org.openmali.types.twodee.Rect2i> Rect2i_ getClipRect(Rect2i_ rect)

setImageData

protected final void setImageData(byte[] data,
                                  int dataLength,
                                  boolean useBuffer)
Sets the data for the image.

Parameters:
data -
dataLength -
useBuffer -

setImageData

public final void setImageData(byte[] data,
                               int dataLength)
Sets the data for the image.

Parameters:
data -
dataLength -

setImageData

protected final void setImageData(byte[] data,
                                  boolean useBuffer)
Sets the data for the image.

Parameters:
data -
useBuffer -

setImageData

public final void setImageData(byte[] data)
Sets the data for the image.

Parameters:
data -

initImageData

protected boolean initImageData(int width,
                                int height,
                                int orgWidth,
                                int orgHeight,
                                boolean allowBiggerTexture,
                                boolean usebuffer)

initImageData

public final boolean initImageData(int orgWidth,
                                   int orgHeight,
                                   boolean allowBiggerTexture,
                                   boolean usebuffer)

initImageData

public final boolean initImageData(int orgWidth,
                                   int orgHeight,
                                   boolean allowBiggerTexture)

initImageData

public final boolean initImageData(boolean allowBiggerTexture,
                                   boolean usebuffer)

setImageData

protected void setImageData(java.awt.image.BufferedImage image,
                            boolean useBuffer)

setImageData

public void setImageData(java.awt.image.BufferedImage image)

setPixel

protected final void setPixel(int offset,
                              byte[] data)

setPixel

public final void setPixel(int x,
                           int y,
                           byte[] data,
                           boolean markDirty,
                           org.openmali.types.twodee.Rect2i dirtyRect)
Sets one pixel.

Parameters:
x - the x-coordinate
y - the y-coordinate
data - the source pixel data
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

getPixel

public final byte[] getPixel(int x,
                             int y,
                             byte[] data)

setPixelLine

public final void setPixelLine(int trgByteOffset,
                               byte[] data,
                               int srcByteOffset,
                               int length)

setPixelLine

public final void setPixelLine(int x,
                               int y,
                               int length,
                               byte[] data,
                               int srcByteOffset,
                               boolean markDirty,
                               org.openmali.types.twodee.Rect2i dirtyRect)
Sets one (part of a) pixel line.

Parameters:
x - the x-cordinate of the starting location
y - the y-cordinate of the starting location
length - the number of pixels to write
data - the source pixel data
srcByteOffset - the offset in the source array
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

setPixelLine

public final void setPixelLine(int x,
                               int y,
                               byte[] data,
                               int srcOffset,
                               int length)

getPixelLine

public final byte[] getPixelLine(int offset,
                                 int length,
                                 byte[] data)

getPixelLine

public final byte[] getPixelLine(int x,
                                 int y,
                                 int length,
                                 byte[] data)

drawImage

public final void drawImage(TextureImage2D srcTI,
                            int srcX,
                            int srcY,
                            int srcWidth,
                            int srcHeight,
                            int trgX,
                            int trgY,
                            int trgWidth,
                            int trgHeight,
                            boolean markDirty,
                            org.openmali.types.twodee.Rect2i dirtyRect)
Draws the given TextureImage2D onto this one and honors the alpha channels (if any).

Parameters:
srcTI - source image
srcX - the rectangle's left to copy from the source TextureImage2D.
srcY - the rectangle's top to copy from the source TextureImage2D.
srcWidth - the rectangle's width to copy from the source TextureImage2D.
srcHeight - the rectangle's height to copy from the source TextureImage2D.
trgX - target x-coordinate
trgY - target y-coordinate
trgWidth - the targetWidth (tiled or clipped if necessary)
trgHeight - the targetHeight (tiled or clipped if necessary)
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

drawImage

public final void drawImage(TextureImage2D srcTI,
                            int srcX,
                            int srcY,
                            int srcWidth,
                            int srcHeight,
                            int trgX,
                            int trgY,
                            boolean markDirty,
                            org.openmali.types.twodee.Rect2i dirtyRect)
Draws the given TextureImage2D onto this one and honors the alpha channels (if any).

Parameters:
srcTI - source image
srcX - the rectangle's left to copy from the source TextureImage2D.
srcY - the rectangle's top to copy from the source TextureImage2D.
srcWidth - the rectangle's width to copy from the source TextureImage2D.
srcHeight - the rectangle's height to copy from the source TextureImage2D.
trgX - target x-coordinate
trgY - target y-coordinate
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

drawImage

public final void drawImage(TextureImage2D ti,
                            org.openmali.types.twodee.Rect2i srcRect,
                            int trgX,
                            int trgY,
                            boolean markDirty,
                            org.openmali.types.twodee.Rect2i dirtyRect)
Draws the given TextureImage2D onto this one and honors the alpha channels (if any).

Parameters:
ti - source image
srcRect - the rectangle to copy from the source TextureImage2D.
trgX - target x-coordinate
trgY - target y-coordinate
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

drawImage

public final void drawImage(TextureImage2D ti,
                            int trgX,
                            int trgY,
                            boolean markDirty,
                            org.openmali.types.twodee.Rect2i dirtyRect)
Draws the given TextureImage2D onto this one and honors the alpha channels (if any).

Parameters:
ti - source image
trgX - target x-coordinate
trgY - target y-coordinate
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

fillRectangle

public void fillRectangle(org.openmali.vecmath2.Colorf color,
                          int offsetX,
                          int offsetY,
                          int width,
                          int height,
                          boolean markDirty,
                          org.openmali.types.twodee.Rect2i dirtyRect)
Fills the given rectangle with the specified color and combines alpha channels if necessary.

Parameters:
color -
offsetX -
offsetY -
width -
height -
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

fillFullRectangle

public final void fillFullRectangle(org.openmali.vecmath2.Colorf color,
                                    boolean markDirty,
                                    org.openmali.types.twodee.Rect2i dirtyRect)

drawPixelLine

public void drawPixelLine(byte[] pixels,
                          int pixelSize,
                          int startX,
                          int startY,
                          int length,
                          boolean markDirty,
                          org.openmali.types.twodee.Rect2i dirtyRect)
Fills the complete (used part of the) texture with the specified color and combines alpha channels if necessary.

Parameters:
color -
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clear

public final void clear(TextureImage2D srcTI,
                        int srcX,
                        int srcY,
                        int srcWidth,
                        int srcHeight,
                        int trgX,
                        int trgY,
                        int trgWidth,
                        int trgHeight,
                        boolean markDirty,
                        org.openmali.types.twodee.Rect2i dirtyRect)
Draws the given TextureImage2D onto this one and simply overwrites anything.

Parameters:
srcTI - source image
srcX - the rectangle's left to copy from the source TextureImage2D.
srcY - the rectangle's top to copy from the source TextureImage2D.
srcWidth - the rectangle's width to copy from the source TextureImage2D.
srcHeight - the rectangle's height to copy from the source TextureImage2D.
trgX - target x-coordinate
trgY - target y-coordinate
trgWidth - the targetWidth (tiled or clipped if necessary)
trgHeight - the targetHeight (tiled or clipped if necessary)
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clear

public final void clear(TextureImage2D srcTI,
                        int trgX,
                        int trgY,
                        int trgWidth,
                        int trgHeight,
                        boolean markDirty,
                        org.openmali.types.twodee.Rect2i dirtyRect)
Draws the given TextureImage2D onto this one and simply overwrites anything.

Parameters:
srcTI - source image
trgX - target x-coordinate
trgY - target y-coordinate
trgWidth - the targetWidth (tiled or clipped if necessary)
trgHeight - the targetHeight (tiled or clipped if necessary)
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clear

public final void clear(TextureImage2D srcTI,
                        int srcX,
                        int srcY,
                        int srcWidth,
                        int srcHeight,
                        int trgX,
                        int trgY,
                        boolean markDirty,
                        org.openmali.types.twodee.Rect2i dirtyRect)
Draws the given TextureImage2D onto this one and simply overwrites anything.

Parameters:
srcTI - source image
srcX - the rectangle's left to copy from the source TextureImage2D.
srcY - the rectangle's top to copy from the source TextureImage2D.
srcWidth - the rectangle's width to copy from the source TextureImage2D.
srcHeight - the rectangle's height to copy from the source TextureImage2D.
trgX - target x-coordinate
trgY - target y-coordinate
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clear

public final void clear(TextureImage2D srcTI,
                        org.openmali.types.twodee.Rect2i srcRect,
                        int trgX,
                        int trgY,
                        boolean markDirty,
                        org.openmali.types.twodee.Rect2i dirtyRect)
Draws the given TextureImage2D onto this one and simply overwrites anything.

Parameters:
srcTI - source image
srcRect - the rectangle to copy from the source TextureImage2D.
trgX - target x-coordinate
trgY - target y-coordinate
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clear

public final void clear(TextureImage2D srcTI,
                        int trgX,
                        int trgY,
                        boolean markDirty,
                        org.openmali.types.twodee.Rect2i dirtyRect)
Draws the given TextureImage2D onto this one and simply overwrites anything.

Parameters:
srcTI - source image
trgX - target x-coordinate
trgY - target y-coordinate
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clear

public final void clear(TextureImage2D srcTI,
                        boolean markDirty,
                        org.openmali.types.twodee.Rect2i dirtyRect)
Draws the given TextureImage2D onto this one and simply overwrites anything.

Parameters:
ti - source image
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clearOutline

public void clearOutline(java.awt.Color color,
                         int offsetX,
                         int offsetY,
                         int width,
                         int height,
                         int lineWidth,
                         boolean markDirty,
                         org.openmali.types.twodee.Rect2i dirtyRect)
Clears the given rectangle's outline with the specified color.

Parameters:
color -
offsetX -
offsetY -
width -
height -
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clear

public void clear(org.openmali.vecmath2.Colorf color,
                  int offsetX,
                  int offsetY,
                  int width,
                  int height,
                  boolean markDirty,
                  org.openmali.types.twodee.Rect2i dirtyRect)
Clears the given rectangle with the specified color.

Parameters:
color -
offsetX -
offsetY -
width -
height -
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clear

public final void clear(org.openmali.vecmath2.Colorf color,
                        boolean markDirty,
                        org.openmali.types.twodee.Rect2i dirtyRect)
Clears the whole (used part of the) texture with the specified color.

Parameters:
color -
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clear

public final void clear(int offsetX,
                        int offsetY,
                        int width,
                        int height,
                        boolean markDirty,
                        org.openmali.types.twodee.Rect2i dirtyRect)
Clears the given rectangle with a black-transparent color.

Parameters:
offsetX -
offsetY -
width -
height -
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clear

public final void clear(boolean markDirty,
                        org.openmali.types.twodee.Rect2i dirtyRect)
Clears the whole (used part of the) texture with a black-transparent color.

Parameters:
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

clearPixelLine

public void clearPixelLine(byte[] pixels,
                           int pixelSize,
                           int startX,
                           int startY,
                           int length,
                           boolean markDirty,
                           org.openmali.types.twodee.Rect2i dirtyRect)
Clears a horizontal line of pixels.

Parameters:
pixels - the pixel data
startX - the x-coordinate of the starting location
startY - the y-coordinate of the starting location
length - the number of pixels to clear
markDirty - if true, the pixel is marked dirty
dirtyRect - if non null, the dirty rect is written to this instance

duplicateNodeComponent

protected void duplicateNodeComponent(NodeComponent original,
                                      boolean forceDuplicate)

Overrides:
duplicateNodeComponent in class NodeComponent

cloneNodeComponent

public TextureImage2D cloneNodeComponent(boolean forceDuplicate)

Specified by:
cloneNodeComponent in class NodeComponent