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 Dimension

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

Methods summary

public
# __construct( integereger $width = 0, integereger $height = 0 )

construct new dimension object

construct new dimension object

Parameters

$width
integereger
$width
$height
integereger
$height
public Jaguar\Dimension
# setWidth( integer $width )

Set Width

Set Width

Parameters

$width
integer
$width

Returns

Jaguar\Dimension
public Jaguar\Dimension
# setHeight( integer $height )

Set Height

Set Height

Parameters

$height
integer
$height

Returns

Jaguar\Dimension
public integer
# getWidth( )

Get Width

Get Width

Returns

integer
public integer
# getHeight( )

Get Height

Get Height

Returns

integer
public Jaguar\Dimension
# setSize( Jaguar\Dimension $dimension )

Set size

Set size

set new width and height for the current dimension using the width and the hight of the passed dimension

Parameters

$dimension
Jaguar\Dimension
$dimension

Returns

Jaguar\Dimension
public Jaguar\Dimension
# getSize( )

Get new Dimension object with same width and height

Get new Dimension object with same width and height

Returns

Jaguar\Dimension
public Jaguar\Dimension
# resize( integer $width, integer $height )

Rsize the current dimenison

Rsize the current dimenison

set new width and height for the current dimension object

Parameters

$width
integer
$width
$height
integer
$height

Returns

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

Translates this dimension, with size (w,h), by {dx} and {dy} so that it now represents the dimension {dx+w,dy+h}

Translates this dimension, with size (w,h), by {dx} and {dy} so that it now represents the dimension {dx+w,dy+h}

Parameters

$dx
integer
$dx
$dy
integer
$dy

Returns

Jaguar\Dimension
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 for the current dimension object

Returns a string representation for the current dimension object

Returns

string

Magic methods summary

Jaguar - PHP Graphic Library API documentation generated by ApiGen 2.8.0