Position
class Position extends BasePosition
Class Position
Methods
Sets the x offset.
Sets the y offset.
Sets the x and y offset.
Sets the x dimension of the point.
Sets the y dimension of the point.
Sets the x and y dimensions of the point.
North west corner (top left).
North center part (top center).
North east corner (top right).
Middle west part (left).
The center of the image.
Middle east part (right).
South west corner (bottom left).
South center part (bottom center).
South east corner (bottom right).
Sets the center of gravity to the given x & y coordinates.
Creates a new instance of the CompassGravity class.
Detects the largest face in an image with the Advanced Facial Attribute Detection add-on and makes it the focus of the transformation.
Detects all faces in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.
Detects all eyes in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.
Detects human bodies in the asset and makes them the focus of the transformation.
Detects the largest face in the asset and makes it the focus of the transformation.
Detects all the faces in the asset and makes them the focus of the transformation.
Gives priority to areas of the asset that do not contain faces.
Uses custom coordinates that were previously specified (for example, as part of the image upload method) and makes them the focus of the transformation.
Crops the image while giving higher priority to custom coordinates (custom coordinates don't override the automatic cropping).
Detects all text elements in an image using the OCR Text Detection and Extraction add-on and uses the detected bounding box coordinates as the focus of the transformation.
Alias for Gravity::ocrText()
Absolute position on the canvas.
Details
$this
offsetX(int|float|string $x)
Sets the x offset.
$this
offsetY(int|float|string $y)
Sets the y offset.
OffsetTrait
offset(int|float|string $x = null, int|float|string $y = null)
Sets the x and y offset.
$this
x(int|float|string $x)
Sets the x dimension of the point.
$this
y(int|float|string $y)
Sets the y dimension of the point.
PointTrait
point(int|float|string $x = null, int|float|string $y = null)
Sets the x and y dimensions of the point.
static CompassGravity|CompassPosition
northWest(array ...$args)
North west corner (top left).
static CompassGravity|CompassPosition
north(array ...$args)
North center part (top center).
static CompassGravity|CompassPosition
northEast(array ...$args)
North east corner (top right).
static CompassGravity|CompassPosition
west(array ...$args)
Middle west part (left).
static CompassGravity|CompassPosition
center(array ...$args)
The center of the image.
static CompassGravity|CompassPosition
east(array ...$args)
Middle east part (right).
static CompassGravity|CompassPosition
southWest(array ...$args)
South west corner (bottom left).
static CompassGravity|CompassPosition
south(array ...$args)
South center part (bottom center).
static CompassGravity|CompassPosition
southEast(array ...$args)
South east corner (bottom right).
static CompassGravity|CompassPosition
xyCenter(array ...$args)
Sets the center of gravity to the given x & y coordinates.
static CompassGravity
compass(string $direction, array ...$args)
Creates a new instance of the CompassGravity class.
static FocalGravity
advancedFace(mixed ...$fallback)
Detects the largest face in an image with the Advanced Facial Attribute Detection add-on and makes it the focus of the transformation.
For details, see the Advanced Facial Attribute Detection add-on documentation.
static FocalGravity
advancedFaces(mixed ...$fallback)
Detects all faces in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.
For details, see the Advanced Facial Attribute Detection add-on documentation.
static FocalGravity
advancedEyes(mixed ...$fallback)
Detects all eyes in an image with the Advanced Facial Attribute Detection add-on and makes them the focus of the transformation.
For details, see the Advanced Facial Attribute Detection add-on documentation.
static FocalGravity
body(mixed ...$fallback)
Detects human bodies in the asset and makes them the focus of the transformation.
static FocalGravity
face(mixed ...$fallback)
Detects the largest face in the asset and makes it the focus of the transformation.
static FocalGravity
faces(mixed ...$fallback)
Detects all the faces in the asset and makes them the focus of the transformation.
static FocalGravity
noFaces(mixed ...$fallback)
Gives priority to areas of the asset that do not contain faces.
static FocalGravity
custom(mixed ...$fallback)
Uses custom coordinates that were previously specified (for example, as part of the image upload method) and makes them the focus of the transformation.
Defaults to 'center' gravity if no custom coordinates have been specified.
static FocalGravity
customNoOverride(mixed ...$fallback)
Crops the image while giving higher priority to custom coordinates (custom coordinates don't override the automatic cropping).
static FocalGravity
ocrText(mixed ...$fallback)
Detects all text elements in an image using the OCR Text Detection and Extraction add-on and uses the detected bounding box coordinates as the focus of the transformation.
For details, see the OCR Text Detection and Extraction add-on documentation.
static FocalGravity
ocr(mixed ...$fallback)
Alias for Gravity::ocrText()
static AbsolutePosition
absolute(int|float|string $x = null, int|float|string $y = null)
Absolute position on the canvas.