Jaguar - PHP Graphic Library
  • Namespace
  • Class
  • Tree

Namespaces

  • Jaguar
    • Action
      • Blur
      • Color
      • Pixelate
      • Preset
    • Color
    • Drawable
      • Border
      • Style
      • Text
    • Exception
    • Factory
    • Format
    • Gradient

Classes

  • AbstractCanvas
  • Box
  • Canvas
  • CompressableCanvas
  • Coordinate
  • Dimension
  • Font
  • ImageFile
  • Transformation
  • Util

Interfaces

  • CanvasFactory
  • CanvasInterface
  • EqualsInterface

Class Coordinate

Jaguar\Coordinate implements Jaguar\EqualsInterface
Namespace: Jaguar
Located at Jaguar/Coordinate.php

Methods summary

public
# __construct( integer $x = 0, integer $y = 0 )

Construct New Coordinate Object

Construct New Coordinate Object

Parameters

$x
integer
$x x pos
$y
integer
$y y pos
public Jaguar\Coordinate
# setX( integer $x )

Set X Position

Set X Position

Parameters

$x
integer
$x

Returns

Jaguar\Coordinate
public integer
# getX( )

Get X Position

Get X Position

Returns

integer
public Jaguar\Coordinate
# setY( integer $y )

Set Y Position

Set Y Position

Parameters

$y
integer
$y

Returns

Jaguar\Coordinate
public integer
# getY( )

Get Y position

Get Y position

Returns

integer
public Jaguar\Coordinate
# setLocation( Jaguar\Coordinate $coordinate )

Chage the current coordinate location to match the passed coordinate location

Chage the current coordinate location to match the passed coordinate location

Parameters

$coordinate
Jaguar\Coordinate
$coordinate

Returns

Jaguar\Coordinate
public Jaguar\Coordinate
# getLocation( )

Get New Coordinate Object with same location of the current one

Get New Coordinate Object with same location of the current one

Returns

Jaguar\Coordinate
public Jaguar\Coordinate
# move( integer $x, integer $y )

Moves this coordinate to the specified location in the (x,y) coordinate plane.

Moves this coordinate to the specified location in the (x,y) coordinate plane.

Parameters

$x
integer
$x
$y
integer
$y

Returns

Jaguar\Coordinate
public Jaguar\Coordinate
# translate( integer $dx, integer $dy )

Translates this point, at location (x,y), by {dx} along the {x} axis and {dy} along the {y} axis so that it now represents the coordinate {x+dx,y+dy)}.

Translates this point, at location (x,y), by {dx} along the {x} axis and {dy} along the {y} axis so that it now represents the coordinate {x+dx,y+dy)}.

Parameters

$dx
integer
$x the distance to move this coordinate along the X axis
$dy
integer
$y the distance to move this coordinate along the Y axis

Returns

Jaguar\Coordinate
public
# equals( mixed $other )

Check that the current object which implements this interfcae is equal to another object from the same type

Check that the current object which implements this interfcae is equal to another object from the same type

Parameters

$other
mixed
$other

Throws

InvalidArgumentException
if the passed param type is invalid

Implementation of

Jaguar\EqualsInterface::equals()
public string
# __toString( )

Returns a string representation of the current coordinate object

Returns a string representation of the current coordinate object

Returns

string

Magic methods summary

Jaguar - PHP Graphic Library API documentation generated by ApiGen 2.8.0