/[classpath]/classpath/java/awt/image/ColorModel.java
ViewVC logotype

Diff of /classpath/java/awt/image/ColorModel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by mkoch, Mon Jun 23 12:53:47 2003 UTC revision 1.17 by mkoch, Tue Jun 24 17:07:07 2003 UTC
# Line 76  import gnu.java.awt.Buffers; Line 76  import gnu.java.awt.Buffers;
76   * </ul>   * </ul>
77   *   *
78   * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>   * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
79   * @author C. Brian Jones (cbj@gnu.org)   * @author C. Brian Jones <cbj@gnu.org>
80   */   */
81  public abstract class ColorModel implements Transparency  public abstract class ColorModel implements Transparency
82  {  {
# Line 155  public abstract class ColorModel impleme Line 155  public abstract class ColorModel impleme
155      this.transferType = transferType;      this.transferType = transferType;
156    }    }
157    
158      public void finalize()
159      {
160        // Do nothing here.
161      }
162    
163    /**    /**
164     * Returns the default color model which in Sun's case is an instance     * Returns the default color model which in Sun's case is an instance
165     * of <code>DirectColorModel</code>.     * of <code>DirectColorModel</code>.
# Line 226  public abstract class ColorModel impleme Line 231  public abstract class ColorModel impleme
231     *     *
232     * @see #getRed(int)     * @see #getRed(int)
233     */     */
234      public abstract int getGreen(int pixel);    public abstract int getGreen(int pixel);
235            
236    /**    /**
237     * Converts pixel value to sRGB and extract blue int sample     * Converts pixel value to sRGB and extract blue int sample
# Line 384  public abstract class ColorModel impleme Line 389  public abstract class ColorModel impleme
389     */     */
390    public Object getDataElements(int rgb, Object pixel)    public Object getDataElements(int rgb, Object pixel)
391    {    {
392      // FIXME: implement      // subclasses has to implement this method.
393      throw new UnsupportedOperationException();      throw new UnsupportedOperationException();
394    }    }
395    
# Line 403  public abstract class ColorModel impleme Line 408  public abstract class ColorModel impleme
408     * according to the color model. Each component sample is stored     * according to the color model. Each component sample is stored
409     * as a separate element in the array.     * as a separate element in the array.
410     */     */
411    public int[] getComponents(int pixel, int[] components, int offset) {    public int[] getComponents(int pixel, int[] components, int offset)
412      // FIXME: implement    {
413        // subclasses has to implement this method.
414      throw new UnsupportedOperationException();      throw new UnsupportedOperationException();
415    }    }
416        
# Line 426  public abstract class ColorModel impleme Line 432  public abstract class ColorModel impleme
432     */     */
433    public int[] getComponents(Object pixel, int[] components, int offset)    public int[] getComponents(Object pixel, int[] components, int offset)
434    {    {
435        // subclasses has to implement this method.
436      throw new UnsupportedOperationException();      throw new UnsupportedOperationException();
437    }    }
438    
# Line 476  public abstract class ColorModel impleme Line 483  public abstract class ColorModel impleme
483    }    }
484    
485    /**    /**
486       * Convert unnormalized components to normalized components.
487       *
488       * @since 1.4
489       */
490      public float[] getNormalizedComponents (Object pixel,
491                                              float[] normComponents,
492                                              int normOffset)
493      {
494        // subclasses has to implement this method.
495        throw new UnsupportedOperationException();
496      }
497    
498      /**
499     * Converts the unnormalized component samples from an array to a     * Converts the unnormalized component samples from an array to a
500     * pixel value. I.e. composes the pixel from component samples, but     * pixel value. I.e. composes the pixel from component samples, but
501     * does not perform any color conversion or scaling of the samples.     * does not perform any color conversion or scaling of the samples.
# Line 499  public abstract class ColorModel impleme Line 519  public abstract class ColorModel impleme
519     */     */
520    public int getDataElement(int[] components, int offset)    public int getDataElement(int[] components, int offset)
521    {    {
522        // subclasses has to implement this method.
523      throw new UnsupportedOperationException();      throw new UnsupportedOperationException();
524    }    }
525    
526      public int getDataElement (float[] components, int offset)
527      {
528        // subclasses has to implement this method.
529        throw new UnsupportedOperationException();
530      }
531      
532    public Object getDataElements(int[] components, int offset, Object obj)    public Object getDataElements(int[] components, int offset, Object obj)
533    {    {
534        // subclasses has to implement this method.
535      throw new UnsupportedOperationException();      throw new UnsupportedOperationException();
536    }    }
537    
538      public int getDataElements (float[] components, Object obj)
539      {
540        // subclasses has to implement this method.
541        throw new UnsupportedOperationException();
542      }
543      
544    public boolean equals(Object obj)    public boolean equals(Object obj)
545    {    {
546      if (!(obj instanceof ColorModel)) return false;      if (!(obj instanceof ColorModel)) return false;
# Line 594  public abstract class ColorModel impleme Line 628  public abstract class ColorModel impleme
628      return transferType;      return transferType;
629    }    }
630    
   public void finalize()  
   {  
   }  
   
631    /**    /**
632     * Subclasses must override this method if it is possible for the     * Subclasses must override this method if it is possible for the
633     * color model to have an alpha channel.     * color model to have an alpha channel.

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26