classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Patch: RFA: BufferedImage -vs- Transparency


From: Thomas Fitzsimmons
Subject: Re: [cp-patches] Patch: RFA: BufferedImage -vs- Transparency
Date: Fri, 04 Nov 2005 16:31:30 -0500

On Thu, 2005-10-27 at 10:29 -0600, Tom Tromey wrote:
> In 1.5, BufferedImage implements Transparency.  This requires adding
> one method; it seems to me that it is always correct to just forward
> the call to the underlying ColorModel.  So, that is what I
> implemented.
> 
> Ok?

Yes, please commit.

Thanks,
Tom

> 
> Tom
> 
> Index: ChangeLog
> from  Tom Tromey  <address@hidden>
> 
>       * java/awt/image/BufferedImage.java (BufferedImage): Implement
>       Transparency.
>       (getTransparency): New method.
> 
> Index: java/awt/image/BufferedImage.java
> ===================================================================
> RCS file: /cvsroot/classpath/classpath/java/awt/image/BufferedImage.java,v
> retrieving revision 1.12
> diff -u -r1.12 BufferedImage.java
> --- java/awt/image/BufferedImage.java 3 Oct 2005 17:21:09 -0000 1.12
> +++ java/awt/image/BufferedImage.java 27 Oct 2005 16:34:28 -0000
> @@ -1,5 +1,5 @@
>  /* BufferedImage.java --
> -   Copyright (C) 2000, 2002, 2003, 2004  Free Software Foundation
> +   Copyright (C) 2000, 2002, 2003, 2004, 2005  Free Software Foundation
>  
>  This file is part of GNU Classpath.
>  
> @@ -62,7 +62,7 @@
>   * @author Rolf W. Rasmussen (address@hidden)
>   */
>  public class BufferedImage extends Image
> -  implements WritableRenderedImage
> +  implements WritableRenderedImage, Transparency
>  {
>    public static final int TYPE_CUSTOM         =  0,
>                            TYPE_INT_RGB        =  1,
> @@ -687,5 +687,17 @@
>        return;
>       
>      observers.remove (to);
> +  }
> +
> +  /**
> +   * Return the transparency type.
> +   *
> +   * @return One of address@hidden #OPAQUE}, address@hidden #BITMASK}, or 
> address@hidden #TRANSLUCENT}.
> +   * @see Transparency#getTransparency()
> +   * @since 1.5
> +   */
> +  public int getTransparency()
> +  {
> +    return colorModel.getTransparency();
>    }
>  }
> 
> 
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches





reply via email to

[Prev in Thread] Current Thread [Next in Thread]