Phaser API Documentation

  Version: 
setStrokeStyle([lineWidth], [color], [alpha])

Description:

Sets the stroke color and alpha for this Shape.

If you wish for the Shape to not be stroked then call this method with no arguments, or just set isStroked to false.

Note that some Shapes do not support being stroked, such as the Iso Box shape.

This call can be chained.

Parameters:

name type arguments Default description
lineWidth number <optional>

The width of line to stroke with. If not provided or undefined the Shape will not be stroked.

color number <optional>

The color used to stroke this shape. If not provided the Shape will not be stroked.

alpha number <optional> 1

The alpha value used when stroking this shape, if a stroke color is given.

Returns:
Description:

This Game Object instance.

Since: 3.13.0