diff options
author | Tom Tromey <tromey@redhat.com> | 2003-01-02 00:14:24 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2003-01-02 00:14:24 +0000 |
commit | 62d2eed656d2b664b21f128afbdc27720fb3939f (patch) | |
tree | 16e5e7e16e0e667ba0696007d49bc3344f03cb6c /libjava/java/awt/BasicStroke.java | |
parent | 3c32ae1c35f838a0d4ef571656b5427ade5c861d (diff) | |
download | gcc-62d2eed656d2b664b21f128afbdc27720fb3939f.zip gcc-62d2eed656d2b664b21f128afbdc27720fb3939f.tar.gz gcc-62d2eed656d2b664b21f128afbdc27720fb3939f.tar.bz2 |
Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
* Makefile.am (rmi_java_source_files): Added RMIClassLoaderSpi.
* java/awt/AlphaComposite.java, java/awt/BasicStroke.java,
java/awt/BufferCapabilities.java, java/awt/Button.java,
java/awt/CheckboxMenuItem.java, java/awt/Choice.java,
java/awt/Container.java, java/awt/Cursor.java,
java/awt/EventQueue.java, java/awt/FileDialog.java,
java/awt/Graphics2D.java, java/awt/Label.java, java/awt/Menu.java,
java/awt/MenuBar.java, java/awt/MenuComponent.java,
java/awt/PopupMenu.java, java/awt/ScrollPane.java,
java/awt/Scrollbar.java, java/awt/TextArea.java,
java/awt/TextField.java, java/awt/color/CMMException.java,
java/awt/color/ColorSpace.java, java/awt/color/ICC_Profile.java,
java/awt/color/ProfileDataException.java,
java/awt/datatransfer/Clipboard.java,
java/awt/datatransfer/DataFlavor.java,
java/awt/datatransfer/FlavorMap.java,
java/awt/datatransfer/SystemFlavorMap.java,
java/awt/dnd/DragGestureEvent.java,
java/awt/dnd/DragGestureRecognizer.java,
java/awt/dnd/DragSource.java, java/awt/dnd/DropTarget.java,
java/awt/event/WindowEvent.java, java/awt/geom/PathIterator.java,
java/awt/im/InputMethodHighlight.java,
java/io/PipedOutputStream.java, java/io/PipedWriter.java,
java/rmi/server/RMIClassLoader.java: Merged from Classpath.
* gnu/awt/j2d/Graphics2DImpl.java (drawImage): Changed type of
`op' to BufferedImageOp.
From-SVN: r60768
Diffstat (limited to 'libjava/java/awt/BasicStroke.java')
-rw-r--r-- | libjava/java/awt/BasicStroke.java | 58 |
1 files changed, 55 insertions, 3 deletions
diff --git a/libjava/java/awt/BasicStroke.java b/libjava/java/awt/BasicStroke.java index c329033..3d0a2e7 100644 --- a/libjava/java/awt/BasicStroke.java +++ b/libjava/java/awt/BasicStroke.java @@ -1,5 +1,5 @@ /* BasicStroke.java -- - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -59,12 +59,31 @@ public class BasicStroke implements Stroke private final float[] dash; private final float phase; + /** + * Creates a basic stroke. + * + * @param width May not be negative . + * @param cap May be either CAP_BUTT, CAP_ROUND or CAP_SQUARE. + * @param join May be either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER. + * @param miterlimit the limit to trim the miter join. The miterlimit must be + * greater than or equal to 1.0f. + * @param dash The array representing the dashing pattern. + * @param dash_phase is negative and dash is not null. + * + * @exception IllegalArgumentException If one input parameter doesn't meet + * its needs. + */ public BasicStroke(float width, int cap, int join, float miterlimit, float[] dash, float dashPhase) { - if (width < 0 || miterlimit < 1 || cap < CAP_BUTT || cap > CAP_SQUARE - || join < JOIN_MITER || join > JOIN_BEVEL) + if (width < 0 || + miterlimit < 1.0f || + cap < CAP_BUTT || + cap > CAP_SQUARE || + join < JOIN_MITER || + join > JOIN_BEVEL) throw new IllegalArgumentException(); + this.width = width; this.cap = cap; this.join = join; @@ -73,21 +92,54 @@ public class BasicStroke implements Stroke phase = dashPhase; } + /** + * Creates a basic stroke. + * + * @param width The width of the BasicStroke. May not be negative . + * @param cap May be either CAP_BUTT, CAP_ROUND or CAP_SQUARE. + * @param join May be either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER. + * @param miterlimit the limit to trim the miter join. The miterlimit must be + * greater than or equal to 1.0f. + * + * @exception IllegalArgumentException If one input parameter doesn't meet + * its needs. + */ public BasicStroke(float width, int cap, int join, float miterlimit) { this(width, cap, join, miterlimit, null, 0); } + /** + * Creates a basic stroke. + * + * @param width The width of the BasicStroke. May not be nehative. + * @param cap May be either CAP_BUTT, CAP_ROUND or CAP_SQUARE. + * @param join May be either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER. + * + * @exception IllegalArgumentException If one input parameter doesn't meet + * its needs. + * @exception IllegalArgumentException FIXME + */ public BasicStroke(float width, int cap, int join) { this(width, cap, join, 10, null, 0); } + /** + * Creates a basic stroke. + * + * @param width The width of the BasicStroke. + * + * @exception IllegalArgumentException If width is negative. + */ public BasicStroke(float width) { this(width, CAP_SQUARE, JOIN_MITER, 10, null, 0); } + /** + * Creates a basic stroke. + */ public BasicStroke() { this(1, CAP_SQUARE, JOIN_MITER, 10, null, 0); |