# TextDrawer Class Reference
[CAPTCHA's implementation]

Inheritance diagram for TextDrawer:
[legend]

List of all members.

## Public Member Functions

| draw ($text)
| __construct ($size)
| drawCraracter ($angle, $x, $y, $character)

## Public Attributes

const | SPACE_RATIO = 10

## Protected Member Functions

| getSize ()
| showError ()
| getTextWidth ($string)
| getStringWidth ($string)
| getStringHeight ($string)
| getMaxCharacterHeight ()
| getSpace ()

## Private Member Functions

| getFont ()

## Private Attributes

| $size = null

## Detailed Description

Definition at line 15 of file TextDrawer.class.php.

## Constructor & Destructor Documentation

TextDrawer::__construct | ( | $ | size | ) |

Definition at line 23 of file TextDrawer.class.php.

References $size.

## Member Function Documentation

TextDrawer::draw | ( | $ | text | ) | `[abstract]`

Reimplemented in CurvedStringDrawer, InclinedStringDrawer, and LinearStringDrawer.

TextDrawer::drawCraracter | ( | $ | angle,
|  | $ | x,
|  | $ | y,
|  | $ | character |
| ) |  |  |

Returns:
  TextDrawer

Definition at line 31 of file TextDrawer.class.php.

References getFont(), and Drawer::getTuringImage().

Referenced by LinearStringDrawer::draw(), InclinedStringDrawer::draw(), and CurvedStringDrawer::draw().

Here is the call graph for this function:

TextDrawer::getFont | ( |  | ) | `[private]`

Definition at line 101 of file TextDrawer.class.php.

References Drawer::getTuringImage().

Referenced by drawCraracter(), getStringHeight(), and getStringWidth().

Here is the call graph for this function:

TextDrawer::getMaxCharacterHeight | ( |  | ) | `[protected]`

Definition at line 91 of file TextDrawer.class.php.

References getStringHeight().

Referenced by LinearStringDrawer::draw(), InclinedStringDrawer::draw(), and CurvedStringDrawer::draw().

Here is the call graph for this function:

TextDrawer::getSize | ( |  | ) | `[protected]`

Definition at line 49 of file TextDrawer.class.php.

Referenced by CurvedStringDrawer::draw(), and getSpace().

TextDrawer::getSpace | ( |  | ) | `[protected]`

Definition at line 96 of file TextDrawer.class.php.

References getSize(), and SPACE_RATIO.

Referenced by LinearStringDrawer::draw(), InclinedStringDrawer::draw(), and getTextWidth().

Here is the call graph for this function:

TextDrawer::getStringHeight | ( | $ | string | ) | `[protected]`

Definition at line 84 of file TextDrawer.class.php.

References getFont().

Referenced by getMaxCharacterHeight().

Here is the call graph for this function:

TextDrawer::getStringWidth | ( | $ | string | ) | `[protected]`

Definition at line 77 of file TextDrawer.class.php.

References getFont().

Referenced by LinearStringDrawer::draw(), InclinedStringDrawer::draw(), CurvedStringDrawer::draw(), and getTextWidth().

Here is the call graph for this function:

TextDrawer::getTextWidth | ( | $ | string | ) | `[protected]`

Definition at line 65 of file TextDrawer.class.php.

References getSpace(), and getStringWidth().

Referenced by LinearStringDrawer::draw(), InclinedStringDrawer::draw(), and CurvedStringDrawer::draw().

Here is the call graph for this function:

TextDrawer::showError | ( |  | ) | `[protected]`

Returns:
  TextDrawer

Definition at line 57 of file TextDrawer.class.php.

References Drawer::getTuringImage().

Referenced by LinearStringDrawer::draw(), InclinedStringDrawer::draw(), and CurvedStringDrawer::draw().

Here is the call graph for this function:

## Member Data Documentation

TextDrawer::$size = null`[private]`

Definition at line 19 of file TextDrawer.class.php.

Referenced by __construct(), and CurvedStringDrawer::draw().

const TextDrawer::SPACE_RATIO = 10

Definition at line 17 of file TextDrawer.class.php.

Referenced by getSpace().

The documentation for this class was generated from the following file:

- main/Utils/TuringTest/TextDrawer.class.php