You are here

protected function TextimageFontsHandlerTextimage::dec2hex in Textimage 7.3

Helper - Convert a dec to a hex.

Parameters

int $dec: an integer number

Return value

string the number represented as hex

1 call to TextimageFontsHandlerTextimage::dec2hex()
TextimageFontsHandlerTextimage::getData in classes/font_handlers/textimage.inc
Helper - Return the font information.

File

classes/font_handlers/textimage.inc, line 179
Textimage - Fonts handler class for Textimage.

Class

TextimageFontsHandlerTextimage
Fonts handler for Textimage.

Code

protected function dec2hex($dec) {
  $hex = dechex($dec);
  return str_repeat("0", 2 - drupal_strlen($hex)) . drupal_strtoupper($hex);
}