forked from Intervention/image
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFrame.php
More file actions
68 lines (59 loc) · 1.18 KB
/
Copy pathFrame.php
File metadata and controls
68 lines (59 loc) · 1.18 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
<?php
namespace Intervention\Image;
class Frame
{
const DISPOSAL_METHOD_LEAVE = 1;
const DISPOSAL_METHOD_BACKGROUND = 2;
const DISPOSAL_METHOD_PREVIOUS = 3;
/**
* Image data
*
* @var mixed
*/
public $core;
/**
* Delay time in miliseconds after next frame is shown
*
* @var integer
*/
public $delay;
/**
* Disposal method
*
* @var integer
*/
public $disposal;
/**
* Create new frame instance
*
* @param mixed $core
* @param integer $delay
* @param integer $disposal
*/
public function __construct($core, $delay = 0, $disposal = null)
{
$this->core = $core;
$this->delay = $delay;
$this->disposal = is_null($disposal) ? self::DISPOSAL_METHOD_LEAVE : $disposal;
}
/**
* Gets core of current frame
*
* @return mixed
*/
public function getCore()
{
return $this->core;
}
/**
* Set core of current frame
*
* @param mixed $core
* @return Intervention\Image\Frame
*/
public function setCore($core)
{
$this->core = $core;
return $this;
}
}