Class IX_compose

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--IX_compose

public class IX_compose
extends java.awt.Canvas

This IX API class is used to compose two images.

Author:
The J Maker
See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
IX_compose(java.awt.Image im1, java.awt.Image im2)
          This is a constructor.
IX_compose(java.awt.Image im1, java.awt.Image im2, int locX, int locY, int method, java.awt.Color bg)
          This is a constructor.
IX_compose(int[] data1, int width1, int height1, int[] data2, int width2, int height2)
          This is a constructor.
IX_compose(int[] data1, int width1, int height1, int[] data2, int width2, int height2, int locX, int locY, int method, java.awt.Color bg)
          This is a constructor.
 
Method Summary
 java.awt.Color getBG()
          This returns background color.
 int getHeight()
          This returns the image height.
 int getLocX()
          This returns location X coord.
 int getLocY()
          This returns location Y coord.
 int getMethod()
          This returns composition method.
 java.awt.Dimension getMinimizeSize()
           
 int[] getOutputArray()
          This returns the output array.
 java.awt.Image getOutputImage()
          This returns the output image.
 java.awt.Dimension getPreferredSize()
           
 int getWidth()
          This returns the image width.
 void paint(java.awt.Graphics g)
           
 void setAllParameters(int locX, int locY, int method, java.awt.Color bg)
          This sets all the parameters.
 void setBG(java.awt.Color bg)
          This sets background color.
 void setLocX(int locX)
          This sets location X coord.
 void setLocY(int locY)
          This sets location Y coord.
 void setMethod(int method)
          This sets composition method.
 void update(java.awt.Graphics g)
           
 
Methods inherited from class java.awt.Canvas
addNotify
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IX_compose

public IX_compose(java.awt.Image im1,
                  java.awt.Image im2)
This is a constructor. Default composition method is 0. (OVERWRITE = 0, AND = 1, OR = 2, XOR = 3, TRANSPARENT = 4)
Parameters:
im1 - input image 1
im2 - input image 2

IX_compose

public IX_compose(java.awt.Image im1,
                  java.awt.Image im2,
                  int locX,
                  int locY,
                  int method,
                  java.awt.Color bg)
This is a constructor.
Parameters:
im1 - input image 1
im2 - input image 2
locX - location X coord
locY - location Y coord
method - composition method (OVERWRITE = 0, AND = 1, OR = 2, XOR = 3, TRANSPARENT = 4)
bg - background color

IX_compose

public IX_compose(int[] data1,
                  int width1,
                  int height1,
                  int[] data2,
                  int width2,
                  int height2)
This is a constructor. Default composition method is 0. (OVERWRITE = 0, AND = 1, OR = 2, XOR = 3, TRANSPARENT = 4)
Parameters:
data1 - input array 1
width1 - input image width 1
height1 - input image height 1
data2 - input array 2
width2 - input image width 2
height2 - input image height 2

IX_compose

public IX_compose(int[] data1,
                  int width1,
                  int height1,
                  int[] data2,
                  int width2,
                  int height2,
                  int locX,
                  int locY,
                  int method,
                  java.awt.Color bg)
This is a constructor.
Parameters:
data1 - input array 1
width1 - input image width 1
height1 - input image height 1
data2 - input array 2
width2 - input image width 2
height2 - input image height 2
locX - location X coord
locY - location Y coord
method - composition method (OVERWRITE = 0, AND = 1, OR = 2, XOR = 3, TRANSPARENT = 4)
bg - background color
Method Detail

setAllParameters

public void setAllParameters(int locX,
                             int locY,
                             int method,
                             java.awt.Color bg)
This sets all the parameters.
Parameters:
locX - location X coord
locY - location Y coord
method - composition method (OVERWRITE = 0, AND = 1, OR = 2, XOR = 3, TRANSPARENT = 4)
bg - background color

setLocX

public void setLocX(int locX)
This sets location X coord.
Parameters:
locX - location X coord

getLocX

public int getLocX()
This returns location X coord.
Parameters:
-  

setLocY

public void setLocY(int locY)
This sets location Y coord.
Parameters:
locY - location Y coord

getLocY

public int getLocY()
This returns location Y coord.
Parameters:
-  

setMethod

public void setMethod(int method)
This sets composition method. (OVERWRITE = 0, AND = 1, OR = 2, XOR = 3, TRANSPARENT = 4)
Parameters:
method - composition method

getMethod

public int getMethod()
This returns composition method. (OVERWRITE = 0, AND = 1, OR = 2, XOR = 3, TRANSPARENT = 4)
Parameters:
-  

setBG

public void setBG(java.awt.Color bg)
This sets background color.
Parameters:
bg - background color

getBG

public java.awt.Color getBG()
This returns background color.
Parameters:
-  

getWidth

public int getWidth()
This returns the image width.
Overrides:
getWidth in class java.awt.Component

getHeight

public int getHeight()
This returns the image height.
Overrides:
getHeight in class java.awt.Component

getOutputImage

public java.awt.Image getOutputImage()
This returns the output image.

getOutputArray

public int[] getOutputArray()
This returns the output array.

getMinimizeSize

public java.awt.Dimension getMinimizeSize()

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class java.awt.Component

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Canvas

update

public void update(java.awt.Graphics g)
Overrides:
update in class java.awt.Component