Overview

Namespaces

  • Imagine
    • Draw
    • Effects
    • Exception
    • Filter
      • Advanced
      • Basic
    • Gd
    • Gmagick
    • Image
      • Fill
        • Gradient
      • Histogram
      • Point
    • Imagick
    • Test
      • Constraint
  • PHP

Classes

  • AbstractFont
  • Box
  • Color
  • Point

Interfaces

  • BoxInterface
  • FontInterface
  • ImageInterface
  • ImagineInterface
  • ManipulatorInterface
  • PointInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Download

Class Box

Imagine\Image\Box implements Imagine\Image\BoxInterface
Final
Namespace: Imagine\Image
Located at Image/Box.php
Methods summary
public
# __construct( integer $width, integer $height )

Constructs the Size with given width and height

Constructs the Size with given width and height

Parameters

$width
$height

Throws

Imagine\Exception\InvalidArgumentException
InvalidArgumentException
public integer
# getWidth( )

Gets current image width

Gets current image width

Returns

integer
integer

Implementation of

Imagine\Image\BoxInterface::getWidth()
public integer
# getHeight( )

Gets current image height

Gets current image height

Returns

integer
integer

Implementation of

Imagine\Image\BoxInterface::getHeight()
public Imagine\Image\BoxInterface
# scale( float $ratio )

Creates new BoxInterface instance with ratios applied to both sides

Creates new BoxInterface instance with ratios applied to both sides

Parameters

$ratio

Returns

Imagine\Image\BoxInterface
BoxInterface

Implementation of

Imagine\Image\BoxInterface::scale()
public Imagine\Image\BoxInterface
# increase( integer $size )

Creates new BoxInterface, adding given size to both sides

Creates new BoxInterface, adding given size to both sides

Parameters

$size

Returns

Imagine\Image\BoxInterface
BoxInterface

Implementation of

Imagine\Image\BoxInterface::increase()
public Boolean
# contains( Imagine\Image\BoxInterface $box, Imagine\Image\PointInterface $start = null )

Checks whether current box can fit given box at a given start position, start position defaults to top left corner xy(0,0)

Checks whether current box can fit given box at a given start position, start position defaults to top left corner xy(0,0)

Parameters

$box
$start

Returns

Boolean
Boolean

Implementation of

Imagine\Image\BoxInterface::contains()
public integer
# square( )

Gets current box square, useful for getting total number of pixels in a given box

Gets current box square, useful for getting total number of pixels in a given box

Returns

integer
integer

Implementation of

Imagine\Image\BoxInterface::square()
public string
# __toString( )

Returns a string representation of the current box

Returns a string representation of the current box

Returns

string
string

Implementation of

Imagine\Image\BoxInterface::__toString()
public Imagine\Image\BoxInterface
# widen( integer $width )

Resizes box to given width, constraining proportions and returns the new box

Resizes box to given width, constraining proportions and returns the new box

Parameters

$width

Returns

Imagine\Image\BoxInterface
BoxInterface

Implementation of

Imagine\Image\BoxInterface::widen()
public Imagine\Image\BoxInterface
# heighten( integer $height )

Resizes box to given height, constraining proportions and returns the new box

Resizes box to given height, constraining proportions and returns the new box

Parameters

$height

Returns

Imagine\Image\BoxInterface
BoxInterface

Implementation of

Imagine\Image\BoxInterface::heighten()
Imagine API documentation generated by ApiGen 3.0dev