public interface Stroke
Strokeinterface allows a
Graphics2Dobject to obtain a
Shapethat is the decorated outline, or stylistic representation of the outline, of the specified
Shape. Stroking a
Shapeis like tracing its outline with a marking pen of the appropriate size and shape. The area where the pen would place ink is the area enclosed by the outline
The methods of the
Graphics2D interface that use the
Shape returned by a
draw and any other methods that are
implemented in terms of that method, such as
The objects of the classes implementing
must be read-only because
Graphics2D does not
clone these objects either when they are set as an attribute
setStroke method or when the
Graphics2D object is itself cloned.
Stroke object is modified after it is set in
Graphics2D context then the behavior
of subsequent rendering would be undefined.
|Modifier and Type||Method and Description|
Returns an outline
Shapewhich encloses the area that should be painted when the
Shapeis stroked according to the rules defined by the object implementing the
Shapeto be stroked
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2018, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.