JonoM\FocusPoint\FieldType\DBFocusPoint
Focus point composite field.
Synopsis
class DBFocusPoint
extends DBComposite
{
- // members
- private static array $composite_db = ;
- // methods
- public double getX()
- public $this setX()
- public float getY()
- public int getWidth()
- public int getHeight()
- public $this setY()
- public void exists()
- public FocusPointField scaffoldFormField()
- public static float focusCoordToOffset()
- public static float focusOffsetToCoord()
- public array|null calculateCrop()
- public Image_Backend|null applyCrop()
- public int PercentageX()
- public int PercentageY()
Hierarchy
Extends
- SilverStripe\ORM\FieldType\DBComposite
Members
private
-
$composite_db
Describes the focus point coordinates on an image.
Methods
public
- PercentageX() — Generate a percentage based description of x focus point for use in CSS.
- PercentageY() — Generate a percentage based description of y focus point for use in CSS.
- applyCrop() — Apply a cropData array to an Image_Backend instance
- calculateCrop() — Caluclate crop data given the desired width and height, as well as original width and height.
- exists()
- focusCoordToOffset() — Turn a focus x/y coordinate in to an offset from left or top
- focusOffsetToCoord() — Turn a left/top offset in to a focus x/y coordinate
- getHeight() — Get height of the original image
- getWidth() — Get width of the original image.
- getX() — Focus X
- getY() — Focus Y
- scaffoldFormField()
- setX() — Set the focus point X coordinate
- setY() — Set the focus point Y coordinate