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 Text

Jaguar\Drawable\AbstractDrawable implements Jaguar\Drawable\DrawableInterface
Extended by Jaguar\Drawable\Text
Namespace: Jaguar\Drawable
Located at Jaguar/Drawable/Text.php

Methods summary

public
# __construct( type $string = null, Jaguar\Coordinate $coordinate = null, Jaguar\Color\ColorInterface $color = null )

construct new text object

construct new text object

Parameters

$string
type
$string
$coordinate
Jaguar\Coordinate
$coordinate
$color
Jaguar\Color\ColorInterface
$color

Overrides

Jaguar\Drawable\AbstractDrawable::__construct
public Jaguar\Drawable\Text
# setDrawer( Jaguar\Drawable\Text\TextDrawerInterface $drawer )

Set text drawer

Set text drawer

Parameters

$drawer
Jaguar\Drawable\Text\TextDrawerInterface
$drawer

Returns

Jaguar\Drawable\Text
public Jaguar\Drawable\Text\TextDrawerInterface
# getDrawer( )

Get text drawer

Get text drawer

Returns

Jaguar\Drawable\Text\TextDrawerInterface
public Jaguar\Drawable\Text
# setString( string $string )

Set string

Set string

Parameters

$string
string
$string

Returns

Jaguar\Drawable\Text
public string
# getString( )

Get string

Get string

Returns

string
public Jaguar\Drawable\Text
# setCoordinate( Jaguar\Coordinate $coordinate )

Set Coordinate

Set Coordinate

The coordinate will define the basepoint of the first character (roughly the lower-left corner of the character).

Parameters

$coordinate
Jaguar\Coordinate
$coordinate

Returns

Jaguar\Drawable\Text
public Jaguar\Coordinate
# getCoordinate( )

Get coordinate

Get coordinate

Returns

Jaguar\Coordinate
public Jaguar\Drawable\Text
# setFont( Jaguar\Font $font )

Set font file

Set font file

Parameters

$font
Jaguar\Font
$font

Returns

Jaguar\Drawable\Text
public Jaguar\Font
# getFont( )

Get font file

Get font file

Returns

Jaguar\Font
public Jaguar\Draw\Text
# setAngle( float $angle )

Set text angle

Set text angle

Parameters

$angle
float
$angle

Returns

Jaguar\Draw\Text
public float
# getAngle( )

Get text angle

Get text angle

Returns

float
public Jaguar\Draw\Text
# setLineSpacing( float $spacing )

Set the line spacing

Set the line spacing

Parameters

$spacing
float
$spacing

Returns

Jaguar\Draw\Text
public float
# getLineSpacing( )

Get line spacing

Get line spacing

Returns

float
public Jaguar\Draw\Text
# setFontSize( integer $size )

Set font size

Set font size

Parameters

$size
integer
$size

Returns

Jaguar\Draw\Text

See

Jaguar\Font::setFontSize()
public integer
# getFontSize( )

Get font size

Get font size

Returns

integer

See

Jaguar\Font::getFontSize()
public Jaguar\Box
# getBoundingBox( integer $padding = 10 )

Get bouding box for the current text object

Get bouding box for the current text object

Parameters

$padding
integer
$padding text padding

Returns

Jaguar\Box
public
# draw( Jaguar\CanvasInterface $canvas )

Draw the drawable object on the given canvas using the given style

Draw the drawable object on the given canvas using the given style

Parameters

$canvas
Jaguar\CanvasInterface
$canvas

Throws

Jaguar\Exception\CanvasEmptyException
Jaguar\Exception\DrawableException
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\AbstractDrawable::equals
public
# __clone( )

Clone Text

Clone Text

Overrides

Jaguar\Drawable\AbstractDrawable::__clone
public string
# __toString( )

Get string representation for the current text

Get string representation for the current text

Returns

string

Methods inherited from Jaguar\Drawable\AbstractDrawable

getColor(), setColor()

Magic methods summary

Jaguar - PHP Graphic Library API documentation generated by ApiGen 2.8.0