You are here

function _textimage_get_bounding_box in Textimage 7.3

Return a text bounding box.

Parameters

object $image: Image object.

string $text: Text string in UTF-8 encoding.

int $lines: The number of lines the text is composed of.

int $font_size: Font size.

string $font_uri: URI of the TrueType font to use.

float $angle: Text rotation angle.

Return value

TextimageTextbox Textbox object.

3 calls to _textimage_get_bounding_box()
image_gd_textimage_text_to_image in effects/textimage_text.gd.inc
Creates a new image resource and overlays the text over it.
_textimage_get_text_wrapper in effects/textimage_text.inc
Get the image containing the text.
_textimage_measure_text_width in effects/textimage_text.inc
Measure text box width.

File

effects/textimage_text.inc, line 1344
Implementation of the 'textimage_text' image effect.

Code

function _textimage_get_bounding_box($image, $text, $lines, $font_size, $font_uri, $angle = 0) {
  $data = array(
    'size' => $font_size,
    'angle' => $angle,
    'fontfile' => $font_uri,
    'text' => $text,
    'lines' => $lines,
  );
  return image_toolkit_invoke('textimage_get_bounding_box', $image, array(
    $data,
  ));
}