Function __global->imagettfbbox

Definitions

sources_custom/phpstub.php

  • Give the bounding box of a text using TrueType fonts.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$size float No No required parameter N/A N/A The font size in pixels
$angle float No No required parameter N/A N/A Angle in degrees in which text will be measured
$fontfile string No No required parameter N/A N/A The name of the TrueType font file
$text string No No required parameter N/A N/A The string to be measured

Returns

  • Tuple: lower-left-X, lower-left-Y, lower-right-X, lower-right-Y, upper-right-X, upper-right-Y, upper-left-X, upper-left-Y (false: error)
  • Type: ~array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Give the bounding box of a text using TrueType fonts.
 *
 * @param  float $size The font size in pixels
 * @param  float $angle Angle in degrees in which text will be measured
 * @param  string $fontfile The name of the TrueType font file
 * @param  string $text The string to be measured
 * @return ~array Tuple: lower-left-X, lower-left-Y, lower-right-X, lower-right-Y, upper-right-X, upper-right-Y, upper-left-X, upper-left-Y (false: error)
 */

function imagettfbbox(float $size, float $angle, string $fontfile, string $text)