Jaguar - PHP Graphic Library
  • Namespace
  • Class
  • Tree

Namespaces

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

Classes

  • AbstractDrawable
  • AbstractStyledDrawable
  • Arc
  • Border
  • FilledDrawable
  • Line
  • Pixel
  • Polygon
  • Rectangle
  • Text

Interfaces

  • DrawableInterface
  • StyleInterface

Class Polygon

Jaguar\Drawable\AbstractDrawable implements Jaguar\Drawable\DrawableInterface
Extended by Jaguar\Drawable\AbstractStyledDrawable
Extended by Jaguar\Drawable\FilledDrawable
Extended by Jaguar\Drawable\Polygon
Namespace: Jaguar\Drawable
Located at Jaguar/Drawable/Polygon.php

Methods summary

public
# __construct( ArrayObject $coordinates = null, Jaguar\Color\ColorInterface $color = null )

construct new polygon

construct new polygon

Parameters

$coordinates
ArrayObject
$coordinates
$color
Jaguar\Color\ColorInterface
$color

Overrides

Jaguar\Drawable\AbstractStyledDrawable::__construct
public Jaguar\Drawable\Polygon
# addCoordinate( Jaguar\Coordinate $coordinate )

Add new coordinate

Add new coordinate

Parameters

$coordinate
Jaguar\Coordinate
$coordinate

Returns

Jaguar\Drawable\Polygon
public Jaguar\Drawable\Polygon
# setCoordinate( ArrayObject $coordinates )

Add an array of coordinates

Add an array of coordinates

Parameters

$coordinates
ArrayObject
$coordinates

Returns

Jaguar\Drawable\Polygon
public ArrayObject
# getCoordinates( )

Get polygon coordinates array

Get polygon coordinates array

Returns

ArrayObject
public Jaguar\Drawable\Polygon
# setNumber( integer $num )

Set Polygon coordinates number

Set Polygon coordinates number

Parameters

$num
integer
$num the number of coordinates which will be drawn

Returns

Jaguar\Drawable\Polygon

Throws

InvalidArgumentException
OutOfBoundsException
public integer
# getNumber( )

Get ploygon points number

Get ploygon points number

Returns

integer
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

Overrides

Jaguar\Drawable\AbstractStyledDrawable::equals
public string
# __toString( )

Returns a string representation for the current Polygon Object

Returns a string representation for the current Polygon Object

Returns

string
public
# __clone( )

Clone Polygon

Clone Polygon

Overrides

Jaguar\Drawable\AbstractDrawable::__clone

Methods inherited from Jaguar\Drawable\FilledDrawable

fill(), isFilled()

Methods inherited from Jaguar\Drawable\AbstractStyledDrawable

draw(), getLineThickness(), setLineThickness()

Methods inherited from Jaguar\Drawable\AbstractDrawable

getColor(), setColor()

Magic methods summary

Jaguar - PHP Graphic Library API documentation generated by ApiGen 2.8.0