# TuringImage Class Reference
[CAPTCHA's implementation]

List of all members.

## Public Member Functions

| __construct ($width, $height)
| setGeneratedCode ($code)
| getGeneratedCode ()
| getTextColors ()
| getBackgroundColors ()
| getWidth ()
| getHeight ()
| getImageId ()
| getFont ()
| setFont ($font)
| setTextDrawer (TextDrawer $drawer)
| setBackgroundDrawer (BackgroundDrawer $drawer)
| getCodeGenerator ()
| getColorIdentifier (Color $color)
| getOneCharacterColor ()
| toImage (ImageType $imageType)

## Private Member Functions

| init ()
| drawBackGround ()
| outputImage (ImageType $imageType)

## Private Attributes

| $textColors = null
| $backgroundColors = null
| $font = null
| $imageId = null
| $width = null
| $height = null
| $generator = null
| $drawer = null
| $backgroundDrawer = null
| $code = null

## Detailed Description

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

## Constructor & Destructor Documentation

TuringImage::__construct | ( | $ | width,
|  | $ | height |
| ) |  |  |

Definition at line 34 of file TuringImage.class.php.

References $height, and $width.

## Member Function Documentation

TuringImage::drawBackGround | ( |  | ) | `[private]`

Returns:
  TuringImage

Definition at line 195 of file TuringImage.class.php.

References getColorIdentifier(), getHeight(), and getWidth().

Referenced by toImage().

Here is the call graph for this function:

TuringImage::getBackgroundColors | ( |  | ) |

Definition at line 67 of file TuringImage.class.php.

TuringImage::getCodeGenerator | ( |  | ) |

Returns:
  CodeGenerator

Definition at line 124 of file TuringImage.class.php.

TuringImage::getColorIdentifier | ( | Color $ | color | ) |

Definition at line 129 of file TuringImage.class.php.

References Color::getBlue(), Color::getGreen(), and Color::getRed().

Referenced by drawBackGround(), getOneCharacterColor(), and init().

Here is the call graph for this function:

TuringImage::getFont | ( |  | ) |

Definition at line 87 of file TuringImage.class.php.

TuringImage::getGeneratedCode | ( |  | ) |

Definition at line 54 of file TuringImage.class.php.

Referenced by toImage().

TuringImage::getHeight | ( |  | ) |

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

Referenced by drawBackGround(), and init().

TuringImage::getImageId | ( |  | ) |

Definition at line 82 of file TuringImage.class.php.

Referenced by toImage().

TuringImage::getOneCharacterColor | ( |  | ) |

Definition at line 151 of file TuringImage.class.php.

References getColorIdentifier().

Here is the call graph for this function:

TuringImage::getTextColors | ( |  | ) |

Definition at line 62 of file TuringImage.class.php.

TuringImage::getWidth | ( |  | ) |

Definition at line 72 of file TuringImage.class.php.

Referenced by drawBackGround(), and init().

TuringImage::init | ( |  | ) | `[private]`

Returns:
  TuringImage

Definition at line 182 of file TuringImage.class.php.

References $imageId, getColorIdentifier(), getHeight(), and getWidth().

Referenced by toImage().

Here is the call graph for this function:

TuringImage::outputImage | ( | ImageType $ | imageType | ) | `[private]`

Returns:
  TuringImage

Definition at line 223 of file TuringImage.class.php.

References Enumeration::getId(), ImageType::GIF, ImageType::JPEG, ImageType::PNG, and ImageType::WBMP.

Referenced by toImage().

Here is the call graph for this function:

TuringImage::setBackgroundDrawer | ( | BackgroundDrawer $ | drawer | ) |

Returns:
  TuringImage

Definition at line 113 of file TuringImage.class.php.

References Drawer::setTuringImage().

Here is the call graph for this function:

TuringImage::setFont | ( | $ | font | ) |

Definition at line 92 of file TuringImage.class.php.

References $font.

TuringImage::setGeneratedCode | ( | $ | code | ) |

Returns:
  TuringImage

Definition at line 47 of file TuringImage.class.php.

References $code.

TuringImage::setTextDrawer | ( | TextDrawer $ | drawer | ) |

Returns:
  TuringImage

Definition at line 102 of file TuringImage.class.php.

References Drawer::setTuringImage().

Here is the call graph for this function:

TuringImage::toImage | ( | ImageType $ | imageType | ) |

Returns:
  TuringImage

Definition at line 161 of file TuringImage.class.php.

References drawBackGround(), getGeneratedCode(), getImageId(), init(), and outputImage().

Here is the call graph for this function:

## Member Data Documentation

TuringImage::$backgroundColors = null`[private]`

Definition at line 18 of file TuringImage.class.php.

TuringImage::$backgroundDrawer = null`[private]`

Definition at line 30 of file TuringImage.class.php.

TuringImage::$code = null`[private]`

Definition at line 32 of file TuringImage.class.php.

Referenced by setGeneratedCode().

TuringImage::$drawer = null`[private]`

Definition at line 29 of file TuringImage.class.php.

TuringImage::$font = null`[private]`

Definition at line 20 of file TuringImage.class.php.

Referenced by setFont().

TuringImage::$generator = null`[private]`

Definition at line 27 of file TuringImage.class.php.

TuringImage::$height = null`[private]`

Definition at line 25 of file TuringImage.class.php.

Referenced by __construct().

TuringImage::$imageId = null`[private]`

Definition at line 22 of file TuringImage.class.php.

Referenced by init().

TuringImage::$textColors = null`[private]`

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

TuringImage::$width = null`[private]`

Definition at line 24 of file TuringImage.class.php.

Referenced by __construct().

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

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