CropperField\Cropper\GenericCropper
GenericCropper Implements most of the CropperInterface and provides some helper methods
Synopsis
class GenericCropper
implements
CropperInterface
{
- // members
- protected Image $source;
- protected $x;
- protected $y;
- protected $cropWidth;
- protected $cropHeight;
- protected $maxWidth;
- protected $maxHeight;
- protected $aspectRatio;
- // methods
- public void setSourceImage()
- public void getSourceImage()
- public void setCropData()
- public void setCropX()
- public void getCropX()
- public void setCropY()
- public void getCropY()
- public void setCropWidth()
- public void getCropWidth()
- public void setCropHeight()
- public void getCropHeight()
- public void setMaxWidth()
- public void getMaxWidth()
- public void setMaxHeight()
- public void getMaxHeight()
- public void setAspectRatio()
- public void getAspectRatio()
- public void getCropDimensions()
- protected string createThumbnailFilename()
- protected string normaliseFilename()
Hierarchy
Implements
Members
protected
- $aspectRatio — float
- $cropHeight — int
- $cropWidth — int
- $maxHeight — int
- $maxWidth — int
- $source — CropperField\Cropper\Image
- $x — int
- $y — int
Methods
protected
- createThumbnailFilename()
- normaliseFilename() — Convert an absolute path to one relative to the base path
public
- getAspectRatio() — Look at the aspect ratio. If there's none, then set it from the implied crop width/height.
- getCropDimensions() — Ensure the aspect ratio is respected regardless of any dodgy data.
- getCropHeight()
- getCropWidth()
- getCropX()
- getCropY()
- getMaxHeight()
- getMaxWidth()
- getSourceImage()
- setAspectRatio()
- setCropData()
- setCropHeight()
- setCropWidth()
- setCropX()
- setCropY()
- setMaxHeight()
- setMaxWidth()
- setSourceImage()