home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-20 | 1.9 KB | 51 lines |
- /*
- * @(#)Stroke.java 1.13 98/03/18
- *
- * Copyright 1996, 1997 by Sun Microsystems, Inc.,
- * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information
- * of Sun Microsystems, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Sun.
- */
-
- package java.awt;
-
- /**
- * This interface allows a Graphics2D object to get a Path representation
- * of the boundaries of a stroking primitive from the path to be stroked.
- * The effect of stroking a path can be compared to drawing a logical
- * pen of an appropriate size and shape along the trajectory of the path.
- * The area where the pen would place ink is the area enclosed by the
- * stroked path.
- * <p>
- * The stroking primitives of the Graphics2D interface include the
- * drawPath method and any other methods that are implemented in terms
- * of that method such as drawLine, drawRect, drawRoundRect, drawOval,
- * drawArc, drawPolyline, and drawPolygon.
- * <p>
- * The objects of the classes implementing Stroke must be immutable
- * (i.e. read-only) because the Graphics2D will not clone these objects
- * either when they are set as an attribute with the setStroke method
- * or when the Graphics2D object is itself cloned.
- * If a Stroke object were modified after it was set in the state of
- * the Graphics2D then the behavior of subsequent rendering would be
- * undefined.
- * @see BasicStroke
- * @see Graphics2D#setStroke
- * @version 10 Feb 1997
- */
- public interface Stroke {
- /**
- * Returns a path which encloses the area that should be painted
- * when the path is stroked according to the rules defined by the
- * object implementing the Stroke interface.
- * @param p The path that should be stroked.
- * @return The stroked path.
- */
- Shape createStrokedShape (Shape p);
- }
-