/[classpath]/classpath/java/awt/AlphaComposite.java
ViewVC logotype

Diff of /classpath/java/awt/AlphaComposite.java

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

revision 1.3 by ericb, Wed May 8 16:41:36 2002 UTC revision 1.4 by mkoch, Mon Dec 23 12:45:46 2002 UTC
# Line 64  public final class AlphaComposite implem Line 64  public final class AlphaComposite implem
64        return size() > MAX_CACHE_SIZE;        return size() > MAX_CACHE_SIZE;
65      }      }
66    };    };
67    
68    public static final int CLEAR = 1;    public static final int CLEAR = 1;
69    public static final int SRC = 2;    public static final int SRC = 2;
70    public static final int DST = 9;    public static final int DST = 9;
# Line 88  public final class AlphaComposite implem Line 89  public final class AlphaComposite implem
89    public static final AlphaComposite SrcAtop = getInstance(SRC_ATOP);    public static final AlphaComposite SrcAtop = getInstance(SRC_ATOP);
90    public static final AlphaComposite DstAtop = getInstance(DST_ATOP);    public static final AlphaComposite DstAtop = getInstance(DST_ATOP);
91    public static final AlphaComposite Xor = getInstance(XOR);    public static final AlphaComposite Xor = getInstance(XOR);
92      
93    private final int rule;    private final int rule;
94    private final float alpha;    private final float alpha;
95    private AlphaComposite(int rule, float alpha)    private AlphaComposite(int rule, float alpha)
# Line 95  public final class AlphaComposite implem Line 97  public final class AlphaComposite implem
97      this.rule = rule;      this.rule = rule;
98      this.alpha = alpha;      this.alpha = alpha;
99    }    }
100    
101      /**
102       * Creates an AlphaComposite object with the specified rule.
103       *
104       * @param rule The compositing rule.
105       *
106       * @exception IllegalArgumentException If rule is not one of the following:
107       * CLEAR, SRC, DST, SRC_OVER, DST_OVER, SRC_IN, DST_IN, SRC_OUT, DST_OUT,
108       * SRC_ATOP, DST_ATOP, or XOR.
109       */
110    public static AlphaComposite getInstance(int rule)    public static AlphaComposite getInstance(int rule)
111    {    {
112      return getInstance(rule, 1);      return getInstance(rule, 1);
113    }    }
114      
115      /**
116       * Creates an AlphaComposite object with the specified rule and the constant
117       * alpha to multiply with the alpha of the source. The source is multiplied
118       * with the specified alpha before being composited with the destination.
119       *
120       * @param rule The compositing rule.
121       *
122       * @exception IllegalArgumentException If rule is not one of the following:
123       * CLEAR, SRC, DST, SRC_OVER, DST_OVER, SRC_IN, DST_IN, SRC_OUT, DST_OUT,
124       * SRC_ATOP, DST_ATOP, or XOR.
125       */
126    public static AlphaComposite getInstance(int rule, float alpha)    public static AlphaComposite getInstance(int rule, float alpha)
127    {    {
128      if (rule < CLEAR || rule > XOR || ! (alpha >= 0 && alpha <= 1))      if (rule < CLEAR || rule > XOR || ! (alpha >= 0 && alpha <= 1))

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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