X and Y
Provided the offset of the image in direction X and Y.
x
, y
and xy
Cannot be used by itself; it is meaningless unless you combine it with functions like gravity, layer, etc.
Parameters
- integer [px]; can be negative and positive; can be from outside the base location of the image
Limitations
- This transformation does not have any limitations.
Dependencies
Examples
See the following examples about the possible ways of usage.
Setting X coordinate
w:200/x:50_l:lo:steve/g:face/w:50_ro:max/l:end
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(200)->group()->x(50)->overlay('steve')->group()->gFace()->group()->width(50)->roundMax()->end();
Setting X and Y coordinates
w:200/g:br_x:10_y:10_l:lo:steve/g:face/w:50_ro:max/l:end
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(200)->group()->gBottomRight()->x(10)->y(10)->overlay('steve')->group()->gFace()->group()->width(50)->roundMax()->end();
w:200/g:br_x:-10_y:-10_l:lo:steve/g:face/w:50_ro:max/l:end
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(200)->group()->gBottomRight()->x(-10)->y(-10)->overlay('steve')->group()->gFace()->group()->width(50)->roundMax()->end();
Setting X and Y coordinates with xy
w:200/g:br_xy:10_l:lo:steve/g:face/w:50_ro:max/l:end
use shardimage\shardimagephp\factories\Transformation;
$transformations = (new Transformation())->width(200)->group()->gBottomRight()->xy(10)->overlay('steve')->group()->gFace()->group()->width(50)->roundMax()->end();