Imagine API
Class

Imagine\Image\Point

class Point implements PointInterface

The point class

Methods

__construct(integer $x, integer $y)

Constructs a point of coordinates

integer getX()

Gets points x coordinate

integer getY()

Gets points y coordinate

Boolean in(BoxInterface $box)

Checks if current coordinate is inside a given bo

ImageInterface move(integer $amount)

Returns another point, moved by a given amount from current coordinates

string __toString()

Gets a string representation for the current point

Details

at line 39
public __construct(integer $x, integer $y)

Constructs a point of coordinates

Parameters

integer $x
integer $y

Exceptions

InvalidArgumentException

at line 54
public integer getX()

Gets points x coordinate

Return Value

integer

at line 62
public integer getY()

Gets points y coordinate

Return Value

integer

at line 70
public Boolean in(BoxInterface $box)

Checks if current coordinate is inside a given bo

Parameters

BoxInterface $box

Return Value

Boolean

at line 78
public ImageInterface move(integer $amount)

Returns another point, moved by a given amount from current coordinates

Parameters

integer $amount

Return Value

ImageInterface

at line 86
public string __toString()

Gets a string representation for the current point

Return Value

string