Namespace: Graphics

Phaser.Types.GameObjects. Graphics

Type Definitions


FillStyle

Graphics fill style settings.

Type:
  • object
Properties:
Name Type Argument Description
color number <optional>

The fill color.

alpha number <optional>

The fill alpha.

Since: 3.0.0
Source: src/gameobjects/graphics/typedefs/FillStyle.js (Line 1)

LineStyle

Graphics line style (or stroke style) settings.

Type:
  • object
Properties:
Name Type Argument Description
width number <optional>

The stroke width.

color number <optional>

The stroke color.

alpha number <optional>

The stroke alpha.

Since: 3.0.0
Source: src/gameobjects/graphics/typedefs/LineStyle.js (Line 1)

Options

Options for the Graphics Game Object.

Type:
  • object
Properties:
Name Type Argument Description
x number <optional>

The x coordinate of the Graphics.

y number <optional>

The y coordinate of the Graphics.

Since: 3.0.0
Source: src/gameobjects/graphics/typedefs/Options.js (Line 1)

RoundedRectRadius

Type:
  • object
Properties:
Name Type Argument Default Description
tl number <optional>
20

Top left corner radius.

tr number <optional>
20

Top right corner radius.

br number <optional>
20

Bottom right corner radius.

bl number <optional>
20

Bottom left corner radius.

Since: 3.11.0
Source: src/gameobjects/graphics/typedefs/RoundedRectRadius.js (Line 1)

Styles

Graphics style settings.

Type:
  • object
Properties:
Name Type Argument Description
lineStyle Phaser.Types.GameObjects.Graphics.LineStyle <optional>

The style applied to shape outlines.

fillStyle Phaser.Types.GameObjects.Graphics.FillStyle <optional>

The style applied to shape areas.

Since: 3.0.0
Source: src/gameobjects/graphics/typedefs/Styles.js (Line 1)