init without trunk
This commit is contained in:
parent
ed24ac4994
commit
bb809e7233
14652 changed files with 177862 additions and 94817 deletions
38
vendor/gregwar/image/Gregwar/Image/Source/Create.php
vendored
Normal file
38
vendor/gregwar/image/Gregwar/Image/Source/Create.php
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace Gregwar\Image\Source;
|
||||
|
||||
/**
|
||||
* Creates a new image from scratch.
|
||||
*/
|
||||
class Create extends Source
|
||||
{
|
||||
protected $width;
|
||||
protected $height;
|
||||
|
||||
public function __construct($width, $height)
|
||||
{
|
||||
$this->width = $width;
|
||||
$this->height = $height;
|
||||
}
|
||||
|
||||
public function getWidth()
|
||||
{
|
||||
return $this->width;
|
||||
}
|
||||
|
||||
public function getHeight()
|
||||
{
|
||||
return $this->height;
|
||||
}
|
||||
|
||||
public function getInfos()
|
||||
{
|
||||
return array($this->width, $this->height);
|
||||
}
|
||||
|
||||
public function correct()
|
||||
{
|
||||
return $this->width > 0 && $this->height > 0;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue