src/share/classes/java/awt/geom/PathIterator.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2000, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -23,11 +23,11 @@
* questions.
*/
package java.awt.geom;
-import javax.tools.annotation.GenerateNativeHeader;
+import java.lang.annotation.Native;
/**
* The <code>PathIterator</code> interface provides the mechanism
* for objects that implement the {@link java.awt.Shape Shape}
* interface to return the geometry of their boundary by allowing
@@ -57,45 +57,43 @@
* @see java.awt.Shape
* @see java.awt.BasicStroke
*
* @author Jim Graham
*/
-/* No native methods here, but the constants are needed in the supporting JNI code */
-@GenerateNativeHeader
public interface PathIterator {
/**
* The winding rule constant for specifying an even-odd rule
* for determining the interior of a path.
* The even-odd rule specifies that a point lies inside the
* path if a ray drawn in any direction from that point to
* infinity is crossed by path segments an odd number of times.
*/
- public static final int WIND_EVEN_ODD = 0;
+ @Native public static final int WIND_EVEN_ODD = 0;
/**
* The winding rule constant for specifying a non-zero rule
* for determining the interior of a path.
* The non-zero rule specifies that a point lies inside the
* path if a ray drawn in any direction from that point to
* infinity is crossed by path segments a different number
* of times in the counter-clockwise direction than the
* clockwise direction.
*/
- public static final int WIND_NON_ZERO = 1;
+ @Native public static final int WIND_NON_ZERO = 1;
/**
* The segment type constant for a point that specifies the
* starting location for a new subpath.
*/
- public static final int SEG_MOVETO = 0;
+ @Native public static final int SEG_MOVETO = 0;
/**
* The segment type constant for a point that specifies the
* end point of a line to be drawn from the most recently
* specified point.
*/
- public static final int SEG_LINETO = 1;
+ @Native public static final int SEG_LINETO = 1;
/**
* The segment type constant for the pair of points that specify
* a quadratic parametric curve to be drawn from the most recently
* specified point.
@@ -113,11 +111,11 @@
* = C(n,m) * t^(m) * (1 - t)^(n-m)
* C(n,m) = Combinations of n things, taken m at a time
* = n! / (m! * (n-m)!)
* </pre>
*/
- public static final int SEG_QUADTO = 2;
+ @Native public static final int SEG_QUADTO = 2;
/**
* The segment type constant for the set of 3 points that specify
* a cubic parametric curve to be drawn from the most recently
* specified point.
@@ -137,18 +135,18 @@
* C(n,m) = Combinations of n things, taken m at a time
* = n! / (m! * (n-m)!)
* </pre>
* This form of curve is commonly known as a Bézier curve.
*/
- public static final int SEG_CUBICTO = 3;
+ @Native public static final int SEG_CUBICTO = 3;
/**
* The segment type constant that specifies that
* the preceding subpath should be closed by appending a line segment
* back to the point corresponding to the most recent SEG_MOVETO.
*/
- public static final int SEG_CLOSE = 4;
+ @Native public static final int SEG_CLOSE = 4;
/**
* Returns the winding rule for determining the interior of the
* path.
* @return the winding rule.