ij2x.plugin.color
Class ColorWheelPolar

java.lang.Object
  extended by java.awt.image.MemoryImageSource
      extended by ij2x.plugin.color.AbstractColorWheel
          extended by ij2x.plugin.color.ColorWheelPolar
All Implemented Interfaces:
java.awt.image.ImageProducer

public class ColorWheelPolar
extends AbstractColorWheel

Produces the image of a JColorWheel by interpreting two components of a ColorSpace as polar coordinates (angle and radius).


Field Summary
protected  int[] alphas
          Lookup table for alphas.
protected  float[] angulars
          Lookup table for angular component values.
protected  float[] radials
          Lookup table for radial component values.
 
Fields inherited from class ij2x.plugin.color.AbstractColorWheel
angularIndex, colorSpace, h, isLookupValid, isPixelsValid, pixels, radialIndex, verticalIndex, verticalValue, w
 
Constructor Summary
ColorWheelPolar(java.awt.color.ColorSpace sys, int w, int h)
          Creates a new instance.
 
Method Summary
 void generateColorWheel()
           
protected  void generateLookupTables()
           
 float[] getColorAt(int x, int y)
           
 java.awt.Point getColorLocation(java.awt.Color c)
           
 java.awt.Point getColorLocation(float[] components)
           
 
Methods inherited from class ij2x.plugin.color.AbstractColorWheel
fromColor, fromRGB, fromRGB, getRadius, isEqual, needsGeneration, regenerateColorWheel, setAngularComponentIndex, setRadialComponentIndex, setVerticalComponentIndex, setVerticalValue, toRGB
 
Methods inherited from class java.awt.image.MemoryImageSource
addConsumer, isConsumer, newPixels, newPixels, newPixels, newPixels, newPixels, removeConsumer, requestTopDownLeftRightResend, setAnimated, setFullBufferUpdates, startProduction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

angulars

protected float[] angulars
Lookup table for angular component values.


radials

protected float[] radials
Lookup table for radial component values.


alphas

protected int[] alphas
Lookup table for alphas. The alpha value is used for antialiasing the color wheel.

Constructor Detail

ColorWheelPolar

public ColorWheelPolar(java.awt.color.ColorSpace sys,
                       int w,
                       int h)
Creates a new instance.

Method Detail

generateLookupTables

protected void generateLookupTables()

generateColorWheel

public void generateColorWheel()
Specified by:
generateColorWheel in class AbstractColorWheel

getColorLocation

public java.awt.Point getColorLocation(java.awt.Color c)
Overrides:
getColorLocation in class AbstractColorWheel

getColorLocation

public java.awt.Point getColorLocation(float[] components)
Specified by:
getColorLocation in class AbstractColorWheel

getColorAt

public float[] getColorAt(int x,
                          int y)
Specified by:
getColorAt in class AbstractColorWheel