anewt-developers team mailing list archive
-
anewt-developers team
-
Mailing list archive
-
Message #00223
[Branch ~uws/anewt/anewt.uws] Rev 1761: [image] Use truetype text rendering methods
------------------------------------------------------------
revno: 1761
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt.uws
timestamp: Sat 2010-02-20 13:47:32 +0100
message:
[image] Use truetype text rendering methods
modified:
image/drawingcontext.lib.php
--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws
Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription.
=== modified file 'image/drawingcontext.lib.php'
--- image/drawingcontext.lib.php 2009-08-02 16:32:09 +0000
+++ image/drawingcontext.lib.php 2010-02-20 12:47:32 +0000
@@ -52,6 +52,8 @@
'line-width' => 1,
'alpha-blending' => true,
'antialias' => true,
+ 'font' => null,
+ 'font-size' => 10,
));
}
@@ -298,12 +300,14 @@
assert('is_int($x) && is_int($y)');
assert('is_string($str)');
$this->_install_gd_properties();
- imagestring(
+ imagettftext(
$this->image->__img,
- 4,
+ $this->font_size,
+ 0,
$x, $y,
- $str,
- $this->_get('color'));
+ $this->_color,
+ $this->_font,
+ $str);
}
}