mirror of
https://github.com/Intervention/image.git
synced 2025-08-20 04:31:24 +02:00
Add methods to SizeInterface
This commit is contained in:
@@ -182,7 +182,7 @@ class Size implements SizeInterface
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function alignPivotTo(Size $size, string $position): self
|
public function alignPivotTo(SizeInterface $size, string $position): self
|
||||||
{
|
{
|
||||||
$reference = new Size($size->getWidth(), $size->getHeight());
|
$reference = new Size($size->getWidth(), $size->getHeight());
|
||||||
$reference->alignPivot($position);
|
$reference->alignPivot($position);
|
||||||
|
@@ -14,4 +14,6 @@ interface SizeInterface
|
|||||||
public function fitsInto(SizeInterface $size): bool;
|
public function fitsInto(SizeInterface $size): bool;
|
||||||
public function isLandscape(): bool;
|
public function isLandscape(): bool;
|
||||||
public function isPortrait(): bool;
|
public function isPortrait(): bool;
|
||||||
|
public function alignPivot(string $position, int $offset_x = 0, int $offset_y = 0): SizeInterface;
|
||||||
|
public function alignPivotTo(SizeInterface $size, string $position): SizeInterface;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user