#At bzr+ssh://bk-internal.mysql.com/bzrroot/mysql-falcon/
371 Hakan Kuecuekyilmaz 2009-04-01
Added test script to check whether PHP ext/gd works with TTF. Needed for generating graphs with PHP for DBT2 results.
added:
dbt2/system_test/
dbt2/system_test/README.txt
dbt2/system_test/graph_truetype.php
=== added directory 'dbt2/system_test'
=== added file 'dbt2/system_test/README.txt'
--- a/dbt2/system_test/README.txt 1970-01-01 00:00:00 +0000
+++ b/dbt2/system_test/README.txt 2009-04-01 16:36:53 +0000
@@ -0,0 +1,7 @@
+In this folder you will find scripts and program
+to test the proper environement like whether
+PHP with ext/gd works.
+
+--
+$Id$
+Hakan Kuecuekyilmaz, <hky at sun dot com>, 2009-04-01
=== added file 'dbt2/system_test/graph_truetype.php'
--- a/dbt2/system_test/graph_truetype.php 1970-01-01 00:00:00 +0000
+++ b/dbt2/system_test/graph_truetype.php 2009-04-01 16:36:53 +0000
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Test whether PHP ext/gd works with TrueType fonts.
+ *
+ * Hakan Kuecuekyilmaz <hky at sun dot com>, 2009-04-01.
+ * $Id$
+ */
+
+// X and Y dimension of the generated graphic.
+$x = 200;
+$y = 50;
+
+// Text to write into graphic.
+$text = 'TTF works';
+
+// Adjust path to proper TTF font on your system.
+$font = '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf';
+
+$img = imageCreateTrueColor($x, $y);
+$blue = imageColorAllocate($img, 119, 123, 180);
+$black = imageColorAllocate($img, 0, 0, 0);
+imageFilledRectangle($img, 0, 0, $x, $y, $blue);
+
+// Write TTF text into image.
+imageTtfText($img, 12, 0, 5, 25, $black, $font, $text);
+
+imagePng($img);
+imageDestroy($img);
+?>
+
| Thread |
|---|
| • bzr commit into mysql-falcon branch (hakan:371) | Hakan Kuecuekyilmaz | 1 Apr |