# Class StrokeXYShape

java.lang.Object
uk.ac.starlink.ttools.plot2.layer.XYShape
uk.ac.starlink.ttools.plot2.layer.StrokeXYShape

public class StrokeXYShape extends XYShape
XYShape that draws a line using a Stroke object. This is less efficient than LineXYShape, but it can draw lines with more than 1-pixel thickness.

Since:
  23 Jul 2018
Author:
  Mark Taylor

## Field Summary

### Fields inherited from class XYShape

`POINT`

## Constructor Summary

Constructors
Constructor
Description
`StrokeXYShape(Stroke stroke)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected Glyph`
`createGlyph(short sx, short sy)`
Constructs a new glyph with given coordinates.
`Stroke`
`getStroke()`
Returns the stroke used by this shape.

### Methods inherited from class XYShape

`createIcon, getGlyph, getName, isCached, toString`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### StrokeXYShape

public StrokeXYShape(Stroke stroke)
Constructor.

Parameters:
  `stroke` - drawing stroke

## Method Details

### getStroke

public Stroke getStroke()
Returns the stroke used by this shape.

Returns:
  drawing stroke

### createGlyph

protected Glyph createGlyph(short sx, short sy)
Description copied from class: `XYShape`
Constructs a new glyph with given coordinates.

Specified by:
  `createGlyph` in class `XYShape`
Parameters:
  `sx` - X value
  `sy` - Y value
Returns:
  new glyph