<HTML ><HEAD ><TITLE >imagepsbbox</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="Image functions" HREF="ref.image.html"><LINK REL="PREVIOUS" TITLE="imagepolygon" HREF="function.imagepolygon.html"><LINK REL="NEXT" TITLE="imagepscopyfont" HREF="function.imagepscopyfont.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.imagepolygon.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.imagepscopyfont.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.imagepsbbox" ></A >imagepsbbox</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN36149" ></A ><P > (PHP 3>= 3.0.9, PHP 4 )</P >imagepsbbox -- Give the bounding box of a text rectangle using PostScript Type1 fonts </DIV ><DIV CLASS="refsect1" ><A NAME="AEN36152" ></A ><H2 >Description</H2 >array <B CLASS="methodname" >imagepsbbox</B > ( string text, int font, int size [, int space [, int tightness [, float angle]]])<BR ></BR ><P > <TT CLASS="parameter" ><I >Size</I ></TT > is expressed in pixels. </P ><P > <TT CLASS="parameter" ><I >Space</I ></TT > allows you to change the default value of a space in a font. This amount is added to the normal value and can also be negative. </P ><P > <TT CLASS="parameter" ><I >Tightness</I ></TT > allows you to control the amount of white space between characters. This amount is added to the normal character width and can also be negative. </P ><P > <TT CLASS="parameter" ><I >Angle</I ></TT > is in degrees. </P ><P > Parameters <TT CLASS="parameter" ><I >space</I ></TT > and <TT CLASS="parameter" ><I >tightness</I ></TT > are expressed in character space units, where 1 unit is 1/1000th of an em-square. </P ><P > Parameters <TT CLASS="parameter" ><I >space</I ></TT >, <TT CLASS="parameter" ><I >tightness</I ></TT >, and <TT CLASS="parameter" ><I >angle</I ></TT > are optional. </P ><P > The bounding box is calculated using information available from character metrics, and unfortunately tends to differ slightly from the results achieved by actually rasterizing the text. If the angle is 0 degrees, you can expect the text to need 1 pixel more to every direction. </P ><P > This function returns an array containing the following elements: <DIV CLASS="informaltable" ><A NAME="AEN36192" ></A ><P ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><TBODY ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >0</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >lower left x-coordinate</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >1</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >lower left y-coordinate</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >2</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >upper right x-coordinate</TD ></TR ><TR ><TD ALIGN="LEFT" VALIGN="MIDDLE" >3</TD ><TD ALIGN="LEFT" VALIGN="MIDDLE" >upper right y-coordinate</TD ></TR ></TBODY ></TABLE ><P ></P ></DIV > </P ><P > See also <A HREF="function.imagepstext.html" ><B CLASS="function" >imagepstext()</B ></A >. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.imagepolygon.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.imagepscopyfont.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >imagepolygon</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.image.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >imagepscopyfont</TD ></TR ></TABLE ></DIV ></BODY ></HTML >