Skip to main content
Version: Phaser v3.88.2

Types.GameObjects.Graphics

FillStyle

<static> FillStyle

Graphics fill style settings.

nametypeoptionaldescription
colornumberYesThe fill color.
alphanumberYesThe fill alpha.

Type: object

Member of: Phaser.Types.GameObjects.Graphics

Source: src/gameobjects/graphics/typedefs/FillStyle.js#L1
Since: 3.0.0


LineStyle

<static> LineStyle

Graphics line style (or stroke style) settings.

nametypeoptionaldescription
widthnumberYesThe stroke width.
colornumberYesThe stroke color.
alphanumberYesThe stroke alpha.

Type: object

Member of: Phaser.Types.GameObjects.Graphics

Source: src/gameobjects/graphics/typedefs/LineStyle.js#L1
Since: 3.0.0


Options

<static> Options

Options for the Graphics Game Object.

nametypeoptionaldescription
xnumberYesThe x coordinate of the Graphics.
ynumberYesThe y coordinate of the Graphics.

Type: object

Member of: Phaser.Types.GameObjects.Graphics

Source: src/gameobjects/graphics/typedefs/Options.js#L1
Since: 3.0.0


RoundedRectRadius

<static> RoundedRectRadius

nametypeoptionaldefaultdescription
tlnumberYes20Top left corner radius. Draw concave arc if this radius is negative.
trnumberYes20Top right corner radius. Draw concave arc if this radius is negative.
brnumberYes20Bottom right corner radius. Draw concave arc if this radius is negative.
blnumberYes20Bottom left corner radius. Draw concave arc if this radius is negative.

Type: object

Member of: Phaser.Types.GameObjects.Graphics

Source: src/gameobjects/graphics/typedefs/RoundedRectRadius.js#L1
Since: 3.11.0


Styles

<static> Styles

Graphics style settings.

nametypeoptionaldescription
lineStylePhaser.Types.GameObjects.Graphics.LineStyleYesThe style applied to shape outlines.
fillStylePhaser.Types.GameObjects.Graphics.FillStyleYesThe style applied to shape areas.

Type: object

Member of: Phaser.Types.GameObjects.Graphics

Source: src/gameobjects/graphics/typedefs/Styles.js#L1
Since: 3.0.0