Important notice: the development of WideImage 1.0 branch is discontinued.
Please visit
http://wideimage.sourceforge.net for the new version of library and documentation.
This web site will remain accessible to serve as documentation for the old versions of the library.
For help on migration, please refer
to the
migration
guide.
wiCanvas::drawText()
See:
List of operations
Signature
wiCanvas::drawText($left, $top, $text, $angle = 0)
Parameters
- $left (int): x-position of the text
- $top (int): y-position of the text
- $text (string): text to write
- $angle (int): rotation angle, in degrees, clock-wise
Description
This method writes text on a canvas
Notes
Canvas is still in early developement and is marked as
unstable, as it may change noticeably for the 1.0 final release.
Examples
$img = wiImage::load('/path/to/an/image.png');
$canvas = $img->getCanvas();
// create and set a font
$white = $img->allocateColor(255, 255, 255);
$font = new wiFont_TTF("Arial", 15, $white);
$canvas->setFont($font);
// write the text
$canvas->writeText(15, 15, 'Hi :)');
CategoryDocApi CategoryUnstableApi
There are no comments on this page. [Add comment]