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

tr number <optional>
20

Top right

br number <optional>
20

Bottom right

bl number <optional>
20

Bottom left

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)