changeset 7304:1b3ef87e24b9

[doc-only] Fix RT-36514: Clarify that StrokeType.INNER and OUTER not defined for unclosed paths. Reviewed by: kcr
author flar <James.Graham@oracle.com>
date Wed, 18 Jun 2014 13:30:55 -0700
parents 3f352215be3f
children 1191bf829e2f
files modules/graphics/src/main/java/javafx/scene/shape/StrokeType.java
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/javafx/scene/shape/StrokeType.java	Wed Jun 18 12:44:23 2014 -0700
+++ b/modules/graphics/src/main/java/javafx/scene/shape/StrokeType.java	Wed Jun 18 13:30:55 2014 -0700
@@ -34,9 +34,11 @@
 public enum StrokeType {
 
     /**
-     * The stroke is applied by extending the boundary of the {@link Shape}
+     * The stroke is applied by extending the boundary of a closed {@link Shape}
      * node into its interior by a distance specified by the
      * {@link Shape#strokeWidthProperty strokeWidth}.
+     * Since the definition of {@code INSIDE} depends on the filled interior
+     * of the shape, this {@code StrokeType} is undefined for unclosed shapes.
      *
      * <p>
      * The image shows a shape without stroke and the same shape with a thick
@@ -48,9 +50,11 @@
     INSIDE,
 
     /**
-     * The stroke is applied by extending the boundary of the {@link Shape}
+     * The stroke is applied by extending the boundary of a closed {@link Shape}
      * node outside of its interior by a distance specified by the
      * {@link Shape#strokeWidthProperty strokeWidth}.
+     * Since the definition of {@code OUTSIDE} depends on the filled interior
+     * of the shape, this {@code StrokeType} is undefined for unclosed shapes.
      *
      * <p>
      * The image shows a shape without stroke and the same shape with a thick
@@ -62,9 +66,12 @@
     OUTSIDE,
 
     /**
-     * The stroke is applied by extending the boundary of the {@link Shape}
+     * The stroke is applied by thickening the boundary of the {@link Shape}
      * node by a distance of half of the {@link Shape#strokeWidthProperty strokeWidth}
-     * on either side (inside and outside) of the boundary.
+     * on either side of the boundary.
+     * Since the definition of {@code CENETERED} is symmetric and agnostic as
+     * to the location of any interior of a shape, it can be used for either
+     * closed or unclosed shapes.
      *
      * <p>
      * The image shows a shape without stroke and the same shape with a thick