class Compass extends QualifierMultiValue

Defines the gravity value based on directional values from a compass.

Learn more: Control gravity for images | Control gravity for videos

Methods

northWest(array ...$args)

North west corner (top left).

north(array ...$args)

North center part (top center).

northEast(array ...$args)

North east corner (top right).

west(array ...$args)

Middle west part (left).

center(array ...$args)

The center of the image.

east(array ...$args)

Middle east part (right).

southWest(array ...$args)

South west corner (bottom left).

south(array ...$args)

South center part (bottom center).

southEast(array ...$args)

South east corner (bottom right).

xyCenter(array ...$args)

Sets the center of gravity to the given x & y coordinates.

compass(string $direction, array ...$args)

Creates a new instance of the CompassGravity class.

__construct(string $direction = null)

Compass constructor.

Details

static CompassGravity|CompassPosition northWest(array ...$args)

North west corner (top left).

Parameters

Name Type Description
...$args array Additional arguments.

Return Value

CompassGravity|CompassPosition

static CompassGravity|CompassPosition north(array ...$args)

North center part (top center).

Parameters

Name Type Description
...$args array Additional arguments.

Return Value

CompassGravity|CompassPosition

static CompassGravity|CompassPosition northEast(array ...$args)

North east corner (top right).

Parameters

Name Type Description
...$args array Additional arguments.

Return Value

CompassGravity|CompassPosition

static CompassGravity|CompassPosition west(array ...$args)

Middle west part (left).

Parameters

Name Type Description
...$args array Additional arguments.

Return Value

CompassGravity|CompassPosition

static CompassGravity|CompassPosition center(array ...$args)

The center of the image.

Parameters

Name Type Description
...$args array Additional arguments.

Return Value

CompassGravity|CompassPosition

static CompassGravity|CompassPosition east(array ...$args)

Middle east part (right).

Parameters

Name Type Description
...$args array Additional arguments.

Return Value

CompassGravity|CompassPosition

static CompassGravity|CompassPosition southWest(array ...$args)

South west corner (bottom left).

Parameters

Name Type Description
...$args array Additional arguments.

Return Value

CompassGravity|CompassPosition

static CompassGravity|CompassPosition south(array ...$args)

South center part (bottom center).

Parameters

Name Type Description
...$args array Additional arguments.

Return Value

CompassGravity|CompassPosition

static CompassGravity|CompassPosition southEast(array ...$args)

South east corner (bottom right).

Parameters

Name Type Description
...$args array Additional arguments.

Return Value

CompassGravity|CompassPosition

static CompassGravity|CompassPosition xyCenter(array ...$args)

Sets the center of gravity to the given x & y coordinates.

Parameters

Name Type Description
...$args array Additional arguments.

Return Value

CompassGravity|CompassPosition

static CompassGravity compass(string $direction, array ...$args)

Creates a new instance of the CompassGravity class.

Parameters

Name Type Description
$direction string The gravity direction.
...$args array Additional arguments.

Return Value

CompassGravity

__construct(string $direction = null)

Compass constructor.

Parameters

Name Type Description
$direction string

Constants

NORTH_WEST

NORTH

NORTH_EAST

WEST

CENTER

EAST

SOUTH_WEST

SOUTH

SOUTH_EAST

XY_CENTER