Interface Strokable

All Known Implementing Classes:
Arc, Ellipse, GraphicsText, Line, Path, Polygon, Rectangle

public interface Strokable
A graphical object that has an outline, which can have a color and thickness.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the color to strokeColor that will be used to stroke this shape if it is stroked.
    double
    Returns the thickness of the stroke in pixels.
    boolean
    Returns true if the interior of this shape will be stroked with the stroke color.
    void
    setStrokeColor(Paint strokeColor)
    Sets the stroke color to the given color.
    void
    setStroked(boolean stroked)
    Causes the shape to be stroked with the stroke color when it is drawn.
    void
    setStrokeWidth(double width)
    Sets how thick the stroke is.
  • Method Details

    • getStrokeColor

      Paint getStrokeColor()
      Returns the color to strokeColor that will be used to stroke this shape if it is stroked. Note that there will still be no stroke if isStroked() is false or the stroke width is zero.
    • setStrokeColor

      void setStrokeColor(Paint strokeColor)
      Sets the stroke color to the given color. Automatically calls setStroked(true).
    • isStroked

      boolean isStroked()
      Returns true if the interior of this shape will be stroked with the stroke color.
    • setStroked

      void setStroked(boolean stroked)
      Causes the shape to be stroked with the stroke color when it is drawn.
    • getStrokeWidth

      double getStrokeWidth()
      Returns the thickness of the stroke in pixels.
    • setStrokeWidth

      void setStrokeWidth(double width)
      Sets how thick the stroke is. Automatically calls setStroked(true).