Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cgsuite.plugin
Class ScaleLookupTable  view ScaleLookupTable download ScaleLookupTable.java

java.lang.Object
  extended byjava.awt.image.LookupTable
      extended bycgsuite.plugin.ScaleLookupTable

class ScaleLookupTable
extends java.awt.image.LookupTable

A lookup-table implementation that simply scales the input based on the colour specified in the constructor. You get the same scaled (r+g+b) but a new colour.

Version:
1.0

Field Summary
private  java.awt.Color colour
           
 
Fields inherited from class java.awt.image.LookupTable
 
Constructor Summary
ScaleLookupTable(java.awt.Color c)
           
 
Method Summary
 int[] lookupPixel(int[] src, int[] dest)
          Return translated values for a pixel.
 
Methods inherited from class java.awt.image.LookupTable
getNumComponents, getOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colour

private java.awt.Color colour
Constructor Detail

ScaleLookupTable

public ScaleLookupTable(java.awt.Color c)
Method Detail

lookupPixel

public int[] lookupPixel(int[] src,
                         int[] dest)
Description copied from class: java.awt.image.LookupTable
Return translated values for a pixel. For each value in the pixel src, use the value minus offset as an index in the component array and copy the value there to the output for the component. If dest is null, the output is a new array, otherwise the translated values are written to dest. Dest can be the same array as src. For example, if the pixel src is [2, 4, 3], and offset is 1, the output is [comp1[1], comp2[3], comp3[2]], where comp1, comp2, and comp3 are the translation arrays.