-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathPointInterface.php
More file actions
58 lines (46 loc) Β· 1.03 KB
/
PointInterface.php
File metadata and controls
58 lines (46 loc) Β· 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
declare(strict_types=1);
namespace Intervention\Image\Interfaces;
use IteratorAggregate;
/**
* @extends IteratorAggregate<int>
*/
interface PointInterface extends IteratorAggregate
{
/**
* Return x position.
*/
public function x(): int;
/**
* Return y position.
*/
public function y(): int;
/**
* Set x position.
*/
public function setX(int $x): self;
/**
* Set y position.
*/
public function setY(int $y): self;
/**
* Move X coordinate.
*/
public function moveX(int $value): self;
/**
* Move Y coordinate.
*/
public function moveY(int $value): self;
/**
* Move position of current point by given coordinates.
*/
public function move(int $x, int $y): self;
/**
* Set position of point.
*/
public function setPosition(int $x, int $y): self;
/**
* Rotate the current point clockwise around given pivot point.
*/
public function rotate(float $angle, self $pivot): self;
}