mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Added: Incorrect image orientation
This commit is contained in:
parent
217207883f
commit
e3b62d24d8
87 changed files with 10461 additions and 21 deletions
|
|
@ -0,0 +1,94 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Imagine package.
|
||||
*
|
||||
* (c) Bulat Shakirzyanov <mallluhuct@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Imagine\Image;
|
||||
|
||||
/**
|
||||
* Interface for a box
|
||||
*/
|
||||
interface BoxInterface
|
||||
{
|
||||
/**
|
||||
* Gets current image height
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getHeight();
|
||||
|
||||
/**
|
||||
* Gets current image width
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getWidth();
|
||||
|
||||
/**
|
||||
* Creates new BoxInterface instance with ratios applied to both sides
|
||||
*
|
||||
* @param float $ratio
|
||||
*
|
||||
* @return BoxInterface
|
||||
*/
|
||||
public function scale($ratio);
|
||||
|
||||
/**
|
||||
* Creates new BoxInterface, adding given size to both sides
|
||||
*
|
||||
* @param integer $size
|
||||
*
|
||||
* @return BoxInterface
|
||||
*/
|
||||
public function increase($size);
|
||||
|
||||
/**
|
||||
* Checks whether current box can fit given box at a given start position,
|
||||
* start position defaults to top left corner xy(0,0)
|
||||
*
|
||||
* @param BoxInterface $box
|
||||
* @param PointInterface $start
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
public function contains(BoxInterface $box, PointInterface $start = null);
|
||||
|
||||
/**
|
||||
* Gets current box square, useful for getting total number of pixels in a
|
||||
* given box
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function square();
|
||||
|
||||
/**
|
||||
* Returns a string representation of the current box
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString();
|
||||
|
||||
/**
|
||||
* Resizes box to given width, constraining proportions and returns the new box
|
||||
*
|
||||
* @param integer $width
|
||||
*
|
||||
* @return BoxInterface
|
||||
*/
|
||||
public function widen($width);
|
||||
|
||||
/**
|
||||
* Resizes box to given height, constraining proportions and returns the new box
|
||||
*
|
||||
* @param integer $height
|
||||
*
|
||||
* @return BoxInterface
|
||||
*/
|
||||
public function heighten($height);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue