trait CompassPositionTrait

Trait CompassPositionTrait

Methods

gravity(string $compassGravity)

Sets the compass direction.

offsetX(int|float|string $x)

Sets the x offset.

offsetY(int|float|string $y)

Sets the y offset.

offset(int|float|string $x = null, int|float|string $y = null)

Sets the x and y offset.

Details

CompassGravityTrait gravity(string $compassGravity)

Sets the compass direction.

The compass direction represents a location in the image, for example, Gravity::northEast() represents the top right corner.

Parameters

Name Type Description
$compassGravity string

Return Value

CompassGravityTrait

See also

Gravity::northEast

$this offsetX(int|float|string $x)

Sets the x offset.

Parameters

Name Type Description
$x int|float|string The x offset.

Return Value

$this

$this offsetY(int|float|string $y)

Sets the y offset.

Parameters

Name Type Description
$y int|float|string The y offset.

Return Value

$this

OffsetTrait offset(int|float|string $x = null, int|float|string $y = null)

Sets the x and y offset.

Parameters

Name Type Description
$x int|float|string The x offset.
$y int|float|string The y offset.

Return Value

OffsetTrait