-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathFrameInterface.php
More file actions
81 lines (66 loc) Β· 1.97 KB
/
FrameInterface.php
File metadata and controls
81 lines (66 loc) Β· 1.97 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
declare(strict_types=1);
namespace Intervention\Image\Interfaces;
interface FrameInterface
{
/**
* Return image data of frame in driver specific format.
*/
public function native(): mixed;
/**
* Set image data of frame in driver specific format.
*/
public function setNative(mixed $native): self;
/**
* Transform frame into an image.
*/
public function toImage(DriverInterface $driver): ImageInterface;
/**
* Get image size of current frame.
*/
public function size(): SizeInterface;
/**
* Return animation delay of current frame in seconds.
*/
public function delay(): float;
/**
* Set animation frame delay in seconds.
*/
public function setDelay(float $delay): self;
/**
* Get disposal method of current frame.
*/
public function disposalMethod(): int;
/**
* Set disposal method of current frame.
*
* The disposal method specifies what happens to the current frame when
* moving to the next. Available method values are:
*
* - 0: No disposal, can be used then frames do not have transparency
* - 1: Leave the frame in place and draw the next on top of it
* - 2: Clear the frame with the background color before displaying the next frame
* - 3: Restore the frame to its previous state before the current was drawn
*/
public function setDisposalMethod(int $method): self;
/**
* Set pixel offset of current frame.
*/
public function setOffset(int $left, int $top): self;
/**
* Get left offset in pixels.
*/
public function offsetLeft(): int;
/**
* Set left pixel offset for current frame.
*/
public function setOffsetLeft(int $offset): self;
/**
* Get top pixel offset of current frame.
*/
public function offsetTop(): int;
/**
* Set top pixel offset of current frame.
*/
public function setOffsetTop(int $offset): self;
}