Class TIC_ttf

Description

TIC concrete class for TrueType Fonts

Located in /tic_ttf.php (line 30)

TIC
   |
   --TIC_ttf
Method Summary
TIC_ttf __construct (string $font)
TIC_ttf create ([boolean $render = false], [string $type = 'png'])
array dimension ([string $text = -1], [int $size = -1], [int $angle = -1], [string $font = -1])
Variables
Methods
Constructor __construct (line 44)
  • access: public
TIC_ttf __construct (string $font)
  • string $font: Full or relative path to a font
    1.  <?php
    2.  $tic new TIC_ttf('/full/path/font.ttf');
    3.  $tic->setText('Hello World !')
    4.  ->setBgColor(array(0x000x000xff))
    5.  ->setFontColor(0x000x000x00)
    6.  ->create(true);
    7.  ?>

Redefinition of:
TIC::__construct()
create (line 56)

Creates the image with the text, optionally output the image

  • return: method is chainable
  • access: public
TIC_ttf create ([boolean $render = false], [string $type = 'png'])
  • boolean $render: Set to true to render the image
  • string $type: png|jpg|jpeg|gif

Redefinition of:
TIC::create()
Creates the image with the text, optionally output the image
dimension (line 113)

Calculates text width, height and x, y coordinates where drawing starts.

If a parameter is not passed or passed with negative value then the class property is going to be used

  • return: array($width, $height)
    1.  <?php list($width$height$x$y$this->dimension()?>
  • access: protected
array dimension ([string $text = -1], [int $size = -1], [int $angle = -1], [string $font = -1])
  • string $text: If -1 then $this->text is going to be used
  • int $size: font size, depending on GD version is going to be interpreded as points or pixels
  • int $angle: Angle in degree text should be written into image.
  • string $font: Full or relative path to a True type font

Redefinition of:
TIC::dimension()
Calculates text width, height and x, y coordinates where drawing starts.

Inherited Methods

Inherited From TIC

TIC::__construct()
TIC::create()
TIC::dimension()
TIC::factory()
TIC::render()
TIC::setAngle()
TIC::setBgColor()
TIC::setFontColor()
TIC::setFontSize()
TIC::setHorAlign()
TIC::setHorPadding()
TIC::setImgHeight()
TIC::setImgWidth()
TIC::setPadding()
TIC::setText()
TIC::setVerAlign()
TIC::setVerPadding()
TIC::wrap_text()
TIC::wrap_word()
TIC::__destruct()

Documentation generated on Sat, 27 Mar 2010 17:10:33 +0900 by phpDocumentor 1.4.3