--- old/src/java.desktop/share/classes/java/awt/BasicStroke.java 2015-08-11 19:35:51.439331510 +0400
+++ new/src/java.desktop/share/classes/java/awt/BasicStroke.java 2015-08-11 19:35:51.279331517 +0400
@@ -30,14 +30,14 @@
import java.lang.annotation.Native;
/**
- * The BasicStroke
class defines a basic set of rendering
+ * The {@code BasicStroke} class defines a basic set of rendering
* attributes for the outlines of graphics primitives, which are rendered
* with a {@link Graphics2D} object that has its Stroke attribute set to
- * this BasicStroke
.
- * The rendering attributes defined by BasicStroke
describe
+ * this {@code BasicStroke}.
+ * The rendering attributes defined by {@code BasicStroke} describe
* the shape of the mark made by a pen drawn along the outline of a
* {@link Shape} and the decorations applied at the ends and joins of
- * path segments of the Shape
.
+ * path segments of the {@code Shape}.
* These rendering attributes include:
*
Shape
- * argument. When a Graphics2D
object uses a
- * Stroke
object to redefine a path during the execution
- * of one of its draw
methods, the geometry is supplied
- * in its original form before the Graphics2D
transform
+ * coordinate system as the original unstroked {@code Shape}
+ * argument. When a {@code Graphics2D} object uses a
+ * {@code Stroke} object to redefine a path during the execution
+ * of one of its {@code draw} methods, the geometry is supplied
+ * in its original form before the {@code Graphics2D} transform
* attribute is applied. Therefore, attributes such as the pen width
* are interpreted in the user space coordinate system of the
- * Graphics2D
object and are subject to the scaling and
+ * {@code Graphics2D} object and are subject to the scaling and
* shearing effects of the user-space-to-device-space transform in that
- * particular Graphics2D
.
+ * particular {@code Graphics2D}.
* For example, the width of a rendered shape's outline is determined
- * not only by the width attribute of this BasicStroke
,
+ * not only by the width attribute of this {@code BasicStroke},
* but also by the transform attribute of the
- * Graphics2D
object. Consider this code:
- * + * {@code Graphics2D} object. Consider this code: + *+ * } * Assuming there are no other scaling transforms added to the - *{@code * // sets the Graphics2D object's Transform attribute * g2d.scale(10, 10); * // sets the Graphics2D object's Stroke attribute * g2d.setStroke(new BasicStroke(1.5f)); - *
Graphics2D
object, the resulting line
+ * {@code Graphics2D} object, the resulting line
* will be approximately 15 pixels wide.
* As the example code demonstrates, a floating-point line
* offers better precision, especially when large transforms are
- * used with a Graphics2D
object.
+ * used with a {@code Graphics2D} object.
* When a line is diagonal, the exact width depends on how the
* rendering pipeline chooses which pixels to fill as it traces the
* theoretical widened outline. The choice of which pixels to turn
@@ -107,7 +107,7 @@
* partially-covered pixels.
*
* For more information on the user space coordinate system and the
- * rendering process, see the Graphics2D
class comments.
+ * rendering process, see the {@code Graphics2D} class comments.
* @see Graphics2D
* @author Jim Graham
*/
@@ -161,30 +161,30 @@
float dash_phase;
/**
- * Constructs a new BasicStroke
with the specified
+ * Constructs a new {@code BasicStroke} with the specified
* attributes.
- * @param width the width of this BasicStroke
. The
+ * @param width the width of this {@code BasicStroke}. The
* width must be greater than or equal to 0.0f. If width is
* set to 0.0f, the stroke is rendered as the thinnest
* possible line for the target device and the antialias
* hint setting.
- * @param cap the decoration of the ends of a BasicStroke
+ * @param cap the decoration of the ends of a {@code BasicStroke}
* @param join the decoration applied where path segments meet
* @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 the offset to start the dashing pattern
- * @throws IllegalArgumentException if width
is negative
- * @throws IllegalArgumentException if cap
is not either
+ * @throws IllegalArgumentException if {@code width} is negative
+ * @throws IllegalArgumentException if {@code cap} is not either
* CAP_BUTT, CAP_ROUND or CAP_SQUARE
- * @throws IllegalArgumentException if miterlimit
is less
- * than 1 and join
is JOIN_MITER
- * @throws IllegalArgumentException if join
is not
+ * @throws IllegalArgumentException if {@code miterlimit} is less
+ * than 1 and {@code join} is JOIN_MITER
+ * @throws IllegalArgumentException if {@code join} is not
* either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
- * @throws IllegalArgumentException if dash_phase
- * is negative and dash
is not null
+ * @throws IllegalArgumentException if {@code dash_phase}
+ * is negative and {@code dash} is not {@code null}
* @throws IllegalArgumentException if the length of
- * dash
is zero
+ * {@code dash} is zero
* @throws IllegalArgumentException if dash lengths are all zero.
*/
@ConstructorProperties({ "lineWidth", "endCap", "lineJoin", "miterLimit", "dashArray", "dashPhase" })
@@ -231,18 +231,18 @@
}
/**
- * Constructs a solid BasicStroke
with the specified
+ * Constructs a solid {@code BasicStroke} with the specified
* attributes.
- * @param width the width of the BasicStroke
- * @param cap the decoration of the ends of a BasicStroke
+ * @param width the width of the {@code BasicStroke}
+ * @param cap the decoration of the ends of a {@code BasicStroke}
* @param join the decoration applied where path segments meet
* @param miterlimit the limit to trim the miter join
- * @throws IllegalArgumentException if width
is negative
- * @throws IllegalArgumentException if cap
is not either
+ * @throws IllegalArgumentException if {@code width} is negative
+ * @throws IllegalArgumentException if {@code cap} is not either
* CAP_BUTT, CAP_ROUND or CAP_SQUARE
- * @throws IllegalArgumentException if miterlimit
is less
- * than 1 and join
is JOIN_MITER
- * @throws IllegalArgumentException if join
is not
+ * @throws IllegalArgumentException if {@code miterlimit} is less
+ * than 1 and {@code join} is JOIN_MITER
+ * @throws IllegalArgumentException if {@code join} is not
* either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
*/
public BasicStroke(float width, int cap, int join, float miterlimit) {
@@ -250,17 +250,17 @@
}
/**
- * Constructs a solid BasicStroke
with the specified
- * attributes. The miterlimit
parameter is
+ * Constructs a solid {@code BasicStroke} with the specified
+ * attributes. The {@code miterlimit} parameter is
* unnecessary in cases where the default is allowable or the
* line joins are not specified as JOIN_MITER.
- * @param width the width of the BasicStroke
- * @param cap the decoration of the ends of a BasicStroke
+ * @param width the width of the {@code BasicStroke}
+ * @param cap the decoration of the ends of a {@code BasicStroke}
* @param join the decoration applied where path segments meet
- * @throws IllegalArgumentException if width
is negative
- * @throws IllegalArgumentException if cap
is not either
+ * @throws IllegalArgumentException if {@code width} is negative
+ * @throws IllegalArgumentException if {@code cap} is not either
* CAP_BUTT, CAP_ROUND or CAP_SQUARE
- * @throws IllegalArgumentException if join
is not
+ * @throws IllegalArgumentException if {@code join} is not
* either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
*/
public BasicStroke(float width, int cap, int join) {
@@ -268,18 +268,18 @@
}
/**
- * Constructs a solid BasicStroke
with the specified
+ * Constructs a solid {@code BasicStroke} with the specified
* line width and with default values for the cap and join
* styles.
- * @param width the width of the BasicStroke
- * @throws IllegalArgumentException if width
is negative
+ * @param width the width of the {@code BasicStroke}
+ * @throws IllegalArgumentException if {@code width} is negative
*/
public BasicStroke(float width) {
this(width, CAP_SQUARE, JOIN_MITER, 10.0f, null, 0.0f);
}
/**
- * Constructs a new BasicStroke
with defaults for all
+ * Constructs a new {@code BasicStroke} with defaults for all
* attributes.
* The default attributes are a solid line of width 1.0, CAP_SQUARE,
* JOIN_MITER, a miter limit of 10.0.
@@ -290,10 +290,10 @@
/**
- * Returns a Shape
whose interior defines the
- * stroked outline of a specified Shape
.
- * @param s the Shape
boundary be stroked
- * @return the Shape
of the stroked outline.
+ * Returns a {@code Shape} whose interior defines the
+ * stroked outline of a specified {@code Shape}.
+ * @param s the {@code Shape} boundary be stroked
+ * @return the {@code Shape} of the stroked outline.
*/
public Shape createStrokedShape(Shape s) {
sun.java2d.pipe.RenderingEngine re =
@@ -305,9 +305,9 @@
/**
* Returns the line width. Line width is represented in user space,
* which is the default-coordinate space used by Java 2D. See the
- * Graphics2D
class comments for more information on
+ * {@code Graphics2D} class comments for more information on
* the user space coordinate system.
- * @return the line width of this BasicStroke
.
+ * @return the line width of this {@code BasicStroke}.
* @see Graphics2D
*/
public float getLineWidth() {
@@ -316,8 +316,8 @@
/**
* Returns the end cap style.
- * @return the end cap style of this BasicStroke
as one
- * of the static int
values that define possible end cap
+ * @return the end cap style of this {@code BasicStroke} as one
+ * of the static {@code int} values that define possible end cap
* styles.
*/
public int getEndCap() {
@@ -326,8 +326,8 @@
/**
* Returns the line join style.
- * @return the line join style of the BasicStroke
as one
- * of the static int
values that define possible line
+ * @return the line join style of the {@code BasicStroke} as one
+ * of the static {@code int} values that define possible line
* join styles.
*/
public int getLineJoin() {
@@ -336,7 +336,7 @@
/**
* Returns the limit of miter joins.
- * @return the limit of miter joins of the BasicStroke
.
+ * @return the limit of miter joins of the {@code BasicStroke}.
*/
public float getMiterLimit() {
return miterlimit;
@@ -346,7 +346,7 @@
* Returns the array representing the lengths of the dash segments.
* Alternate entries in the array represent the user space lengths
* of the opaque and transparent segments of the dashes.
- * As the pen moves along the outline of the Shape
+ * As the pen moves along the outline of the {@code Shape}
* to be stroked, the user space
* distance that the pen travels is accumulated. The distance
* value is used to index into the dash array.
@@ -368,7 +368,7 @@
* represents an offset into the dashing pattern. In other words, the dash
* phase defines the point in the dashing pattern that will correspond to
* the beginning of the stroke.
- * @return the dash phase as a float
value.
+ * @return the dash phase as a {@code float} value.
*/
public float getDashPhase() {
return dash_phase;
@@ -397,15 +397,15 @@
* stroking operation as the given argument.
*/
/**
- * Tests if a specified object is equal to this BasicStroke
- * by first testing if it is a BasicStroke
and then comparing
+ * Tests if a specified object is equal to this {@code BasicStroke}
+ * by first testing if it is a {@code BasicStroke} and then comparing
* its width, join, cap, miter limit, dash, and dash phase attributes with
- * those of this BasicStroke
.
+ * those of this {@code BasicStroke}.
* @param obj the specified object to compare to this
- * BasicStroke
- * @return true
if the width, join, cap, miter limit, dash, and
+ * {@code BasicStroke}
+ * @return {@code true} if the width, join, cap, miter limit, dash, and
* dash phase are the same for both objects;
- * false
otherwise.
+ * {@code false} otherwise.
*/
public boolean equals(Object obj) {
if (!(obj instanceof BasicStroke)) {