[cairo-commit] cairo-java/src/java/org/freedesktop/cairo
FillRule.java, 1.2, 1.3 Filter.java, 1.2, 1.3 Operator.java,
1.2, 1.3
Jeffrey Morgan
commit at pdx.freedesktop.org
Fri May 6 06:24:59 PDT 2005
Committed by: kuzman
Update of /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo
In directory gabe:/tmp/cvs-serv16355/src/java/org/freedesktop/cairo
Modified Files:
FillRule.java Filter.java Operator.java
Log Message:
Removed and, or, and xor methods from enums.
Index: FillRule.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/FillRule.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- FillRule.java 24 Mar 2005 18:11:40 -0000 1.2
+++ FillRule.java 6 May 2005 13:24:57 -0000 1.3
@@ -41,18 +41,6 @@
value_ = value;
}
- public FillRule or (FillRule other) {
- return intern(value_ | other.value_);
- }
-
- public FillRule and (FillRule other) {
- return intern(value_ & other.value_);
- }
-
- public FillRule xor (FillRule other) {
- return intern(value_ ^ other.value_);
- }
-
public boolean test (FillRule other) {
return (value_ & other.value_) == other.value_;
}
Index: Filter.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/Filter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Filter.java 24 Mar 2005 18:11:40 -0000 1.2
+++ Filter.java 6 May 2005 13:24:57 -0000 1.3
@@ -1,69 +1,56 @@
-/*
- * Java-Gnome Bindings Library
- *
- * Copyright 1998-2005 the Java-Gnome Team, all rights reserved.
- *
- * The Java-Gnome bindings library is free software distributed under
- * the terms of the GNU Library General Public License version 2.
- */
-package org.freedesktop.cairo;
-
-import org.gnu.javagnome.Enum;
-
-/**
- */
-public class Filter extends Enum {
- static final private int _FAST = 0;
- static final public Filter FAST = new Filter (_FAST);
- static final private int _GOOD = 1;
- static final public Filter GOOD = new Filter (_GOOD);
- static final private int _BEST = 2;
- static final public Filter BEST = new Filter (_BEST);
- static final private int _NEAREST = 3;
- static final public Filter NEAREST = new Filter (_NEAREST);
- static final private int _BILINEAR = 4;
- static final public Filter BILINEAR = new Filter (_BILINEAR);
- static final private int _GAUSSIAN = 5;
- static final public Filter GAUSSIAN = new Filter (_GAUSSIAN);
- static final private Filter[] theInterned = new Filter[] {
- FAST, GOOD, BEST, NEAREST, BILINEAR, GAUSSIAN
- };
- static private java.util.Hashtable theInternedExtras;
- static final private Filter theSacrificialOne = new Filter (0);
- static public Filter intern (int value) {
- if (value < theInterned.length) {
- return theInterned[value];
- }
- theSacrificialOne.value_ = value;
- if (theInternedExtras == null) {
- theInternedExtras = new java.util.Hashtable();
- }
- Filter already = (Filter) theInternedExtras.get(theSacrificialOne);
- if (already == null) {
- already = new Filter(value);
- theInternedExtras.put(already, already);
- }
- return already;
- }
-
- private Filter(int value) {
- value_ = value;
- }
-
- public Filter or (Filter other) {
- return intern(value_ | other.value_);
- }
-
- public Filter and (Filter other) {
- return intern(value_ & other.value_);
- }
-
- public Filter xor (Filter other) {
- return intern(value_ ^ other.value_);
- }
-
- public boolean test (Filter other) {
- return (value_ & other.value_) == other.value_;
- }
-
-}
+/*
+ * Java-Gnome Bindings Library
+ *
+ * Copyright 1998-2005 the Java-Gnome Team, all rights reserved.
+ *
+ * The Java-Gnome bindings library is free software distributed under
+ * the terms of the GNU Library General Public License version 2.
+ */
+package org.freedesktop.cairo;
+
+import org.gnu.javagnome.Enum;
+
+/**
+ */
+public class Filter extends Enum {
+ static final private int _FAST = 0;
+ static final public Filter FAST = new Filter (_FAST);
+ static final private int _GOOD = 1;
+ static final public Filter GOOD = new Filter (_GOOD);
+ static final private int _BEST = 2;
+ static final public Filter BEST = new Filter (_BEST);
+ static final private int _NEAREST = 3;
+ static final public Filter NEAREST = new Filter (_NEAREST);
+ static final private int _BILINEAR = 4;
+ static final public Filter BILINEAR = new Filter (_BILINEAR);
+ static final private int _GAUSSIAN = 5;
+ static final public Filter GAUSSIAN = new Filter (_GAUSSIAN);
+ static final private Filter[] theInterned = new Filter[] {
+ FAST, GOOD, BEST, NEAREST, BILINEAR, GAUSSIAN
+ };
+ static private java.util.Hashtable theInternedExtras;
+ static final private Filter theSacrificialOne = new Filter (0);
+ static public Filter intern (int value) {
+ if (value < theInterned.length) {
+ return theInterned[value];
+ }
+ theSacrificialOne.value_ = value;
+ if (theInternedExtras == null) {
+ theInternedExtras = new java.util.Hashtable();
+ }
+ Filter already = (Filter) theInternedExtras.get(theSacrificialOne);
+ if (already == null) {
+ already = new Filter(value);
+ theInternedExtras.put(already, already);
+ }
+ return already;
+ }
+
+ private Filter(int value) {
+ value_ = value;
+ }
+
+ public boolean test (Filter other) {
+ return (value_ & other.value_) == other.value_;
+ }
+}
Index: Operator.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/Operator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Operator.java 24 Mar 2005 18:11:40 -0000 1.2
+++ Operator.java 6 May 2005 13:24:57 -0000 1.3
@@ -67,18 +67,6 @@
value_ = value;
}
- public Operator or (Operator other) {
- return intern(value_ | other.value_);
- }
-
- public Operator and (Operator other) {
- return intern(value_ & other.value_);
- }
-
- public Operator xor (Operator other) {
- return intern(value_ ^ other.value_);
- }
-
public boolean test (Operator other) {
return (value_ & other.value_) == other.value_;
}
More information about the cairo-commit
mailing list