Class ColorWheelImageProducer

  • All Implemented Interfaces:
    java.awt.image.ImageProducer

    public class ColorWheelImageProducer
    extends java.awt.image.MemoryImageSource
    Produces the image of a ColorWheel.
    Version:
    1.0 August 27, 2005 Created.
    See Also:
    ColorWheel
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int[] alphas
      Lookup table for alphas.
      private float brightness  
      private int h  
      private float[] hues
      Lookup table for hues.
      private boolean isDirty  
      private int[] pixels  
      private float[] saturations
      Lookup table for saturations.
      private int w  
    • Constructor Summary

      Constructors 
      Constructor Description
      ColorWheelImageProducer​(int w, int h)
      Creates a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void generateColorWheel()  
      private void generateLookupTables()  
      int getRadius()  
      boolean needsGeneration()  
      void regenerateColorWheel()  
      void setBrightness​(float newValue)  
      • 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

      • pixels

        private int[] pixels
      • w

        private int w
      • h

        private int h
      • brightness

        private float brightness
      • isDirty

        private boolean isDirty
      • hues

        private float[] hues
        Lookup table for hues.
      • saturations

        private float[] saturations
        Lookup table for saturations.
      • alphas

        private int[] alphas
        Lookup table for alphas. The alpha value is used for antialiasing the color wheel.
    • Constructor Detail

      • ColorWheelImageProducer

        public ColorWheelImageProducer​(int w,
                                       int h)
        Creates a new instance.
    • Method Detail

      • getRadius

        public int getRadius()
      • generateLookupTables

        private void generateLookupTables()
      • setBrightness

        public void setBrightness​(float newValue)
      • needsGeneration

        public boolean needsGeneration()
      • regenerateColorWheel

        public void regenerateColorWheel()
      • generateColorWheel

        public void generateColorWheel()