1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
619 } |
619 } |
620 } |
620 } |
621 |
621 |
622 /** |
622 /** |
623 * Creates an <code>AlphaComposite</code> object with the specified rule. |
623 * Creates an <code>AlphaComposite</code> object with the specified rule. |
|
624 * |
624 * @param rule the compositing rule |
625 * @param rule the compositing rule |
|
626 * @return the {@code AlphaComposite} object created |
625 * @throws IllegalArgumentException if <code>rule</code> is not one of |
627 * @throws IllegalArgumentException if <code>rule</code> is not one of |
626 * the following: {@link #CLEAR}, {@link #SRC}, {@link #DST}, |
628 * the following: {@link #CLEAR}, {@link #SRC}, {@link #DST}, |
627 * {@link #SRC_OVER}, {@link #DST_OVER}, {@link #SRC_IN}, |
629 * {@link #SRC_OVER}, {@link #DST_OVER}, {@link #SRC_IN}, |
628 * {@link #DST_IN}, {@link #SRC_OUT}, {@link #DST_OUT}, |
630 * {@link #DST_IN}, {@link #SRC_OUT}, {@link #DST_OUT}, |
629 * {@link #SRC_ATOP}, {@link #DST_ATOP}, or {@link #XOR} |
631 * {@link #SRC_ATOP}, {@link #DST_ATOP}, or {@link #XOR} |
662 /** |
664 /** |
663 * Creates an <code>AlphaComposite</code> object with the specified rule and |
665 * Creates an <code>AlphaComposite</code> object with the specified rule and |
664 * the constant alpha to multiply with the alpha of the source. |
666 * the constant alpha to multiply with the alpha of the source. |
665 * The source is multiplied with the specified alpha before being composited |
667 * The source is multiplied with the specified alpha before being composited |
666 * with the destination. |
668 * with the destination. |
|
669 * |
667 * @param rule the compositing rule |
670 * @param rule the compositing rule |
668 * @param alpha the constant alpha to be multiplied with the alpha of |
671 * @param alpha the constant alpha to be multiplied with the alpha of |
669 * the source. <code>alpha</code> must be a floating point number in the |
672 * the source. <code>alpha</code> must be a floating point number in the |
670 * inclusive range [0.0, 1.0]. |
673 * inclusive range [0.0, 1.0]. |
|
674 * @return the {@code AlphaComposite} object created |
671 * @throws IllegalArgumentException if |
675 * @throws IllegalArgumentException if |
672 * <code>alpha</code> is less than 0.0 or greater than 1.0, or if |
676 * <code>alpha</code> is less than 0.0 or greater than 1.0, or if |
673 * <code>rule</code> is not one of |
677 * <code>rule</code> is not one of |
674 * the following: {@link #CLEAR}, {@link #SRC}, {@link #DST}, |
678 * the following: {@link #CLEAR}, {@link #SRC}, {@link #DST}, |
675 * {@link #SRC_OVER}, {@link #DST_OVER}, {@link #SRC_IN}, |
679 * {@link #SRC_OVER}, {@link #DST_OVER}, {@link #SRC_IN}, |