-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Mark.

> @@ -178,20 +180,25 @@
>     */
>    public Image getScaledInstance(int width, int height, int flags)
>    {
> +    ImageFilter filter;
>      switch (flags)
>      {
>        case SCALE_DEFAULT:
>        case SCALE_FAST:
>        case SCALE_REPLICATE:
> -        ImageProducer producer =
> -          new FilteredImageSource(this.getSource(),
> -                                  new ReplicateScaleFilter(width, height));
> -        return Toolkit.getDefaultToolkit().createImage(producer);
> -      case SCALE_SMOOTH:
> +     filter = new ReplicateScaleFilter(width, height);
> +     break;
>        case SCALE_AREA_AVERAGING:
> +     filter = new AreaAveragingScaleFilter(width, height);
> +     break;
> +      case SCALE_SMOOTH:
> +        throw new Error("SCALE_SMOOTH: not implemented");

What kind of filter class would be responsible for this and should'nt this be
marked with a big bad "FIXME" (and a PR)?


>        default:
> -        throw new Error("not implemented");
> +        throw new Error("Unknown flag or not implemented: " + flags);
>      }
> +
> +    ImageProducer producer = new FilteredImageSource(getSource(), filter);
> +    return Toolkit.getDefaultToolkit().createImage(producer);
>    }
>  
>    /**

cu
Robert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDbvleG9cfwmwwEtoRAjsYAJ4wqzZSMdX+qfUzqOPs2vEF7ha9egCfasRh
uYcE9OpLcc1WKe0TMI+44MI=
=UxWR
-----END PGP SIGNATURE-----


_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to