 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
ZetaCode.com: PHP GTK tutorial
by Chris Cornutt November 18, 2011 @ 12:41:30
Jan Bodnar has pointed out a great PHP-GTK tutorial on ZetaCode.com that walks you through some of the major points of this graphical frontend for PHP:
This tutorial will teach you the basics of GUI programming with the PHP GTK. The tutorial has 8 chapters which cover the first steps with the library, menus, toolbars, dialogs and various widgets. It has some examples for drawing with Cairo library. The final chapter presents a small computer game; The Nibbles.
Each of the topics has sample code and screenshots of the resulting output for each. Also included is information on layouts and "painting" with Cairo - drawing shapes, rectangles, text, etc.
voice your opinion now!
phpgtk graphical frontend tutorial widget cairo
Michael Maclean's Blog: Using Pango for PHP a taster
by Chris Cornutt February 22, 2011 @ 12:58:27
Michael Maclean has a new article today talking about the Pango graphics library and how it can be coupled with the Cairo PECL extension to more easily create better looking text in dynamic images.
The PECL/Cairo library is pretty good at drawing vector graphics (in our opinion, as the developers, at least!), but one thing it's not able to do by itself is draw text with mildly advanced layout. [...] That's because the developers of the Cairo library decided to let another more specialised library handle the job of text layout.
Michael has created a wrapper for Pango in PHP (github) and some sample code that can be used as a test to ensure it's all setup and working. He steps through each part of the image creation and describes what's happening and what each method is doing along the way.
voice your opinion now!
pango image creation cairo text render tutorial
PHP-GTK Blog: How to PHP 5.3 with PHP-GTK and Cairo on Linux Mint 9
by Chris Cornutt August 13, 2010 @ 09:33:23
On the PHP-GTK blog today there's a new post looking at getting the latest versions of PHP (5.3) and PHP-GTK up and running on a Ubuntu-based system.
At the moment there are some minor problems when trying to get a working installation of PHP with GTK running on Ubuntu based systems. Here is a quick walk through of how you can get this all set up with the trunks from GTK and Cairo and the official package for php-cli in 10 easy steps. This installation was originally done on Linux Mint 9 but should work with most Ubuntu based Linux distributions.
There's ten steps in the process including fetching the packages you'll need with an apt-get call, checking out the latest cairo and php-gtk and the commands to patch and build the source.
voice your opinion now!
phpgtk cairo linux ubuntu tutorial install
Michael Maclean's Blog: Handling fonts in PECL/Cairo
by Chris Cornutt March 02, 2010 @ 12:42:43
Michael Maclean has a look at working with fonts in Cairo (a graphics manipulation extension in the PECL repository). The example will be added to the PHP manual too in case you need it for reference later.
Currently, in PECL/Cairo the only way to draw text is the referred to as the "toy" text API, which is a very basic way of handling text compared to the facilities available in the Cairo library itself. However, it's sufficient for most purposes that I've come across so far.
With the first versions of the Cairo extension, you had to use the selectFontFace method to choose the font you wanted. With the introduction of Cairo 0.2.0, you can now use FreeType font support instead and can use the streams API built into PHP to locate the resource. A snippet of code is included to show how that would work.
voice your opinion now!
cairo graphic manipulation extension font freetype
Elizabeth Smith's Blog: Cairo Alpha Released
by Chris Cornutt July 10, 2009 @ 07:51:03
Elizabeth Smith has posted about the latest release of a PHP extension she's been working hard on - the Cairo 2D graphics extension.
The first alpha of the PECL Cairo extension I've been working on is finally out. Cairo is a 2D graphics library written in C with support for multiple output devices. The extension provides an Object Oriented API, but also includes procedural methods. This is similar to PHP's date and mysqli extensions
The extension (for PHP 5.2.x and 5.3.x versions) requires the CairoGraphics library to work but it allows you to create some great graphics and output them in a number of ways (like PDF, SVG and PostScript). The extension is still in the alpha stages because the API isn't quite complete, but you can still download this version if you'd like to give it a shot.
voice your opinion now!
alpha extension graphics cairo
Matthew Turland's Blog: Building PHP-GTK with Cairo Support on Ubuntu Jaunty
by Chris Cornutt April 27, 2009 @ 10:28:06
Matthew Turland has posted a guide he created following his own process as he worked to compile PHP 5.3.0RC1 with PHP-GTK/Cairo support on a Ubuntu (Jaunty) installation.
The process was a bit arduous, as Ubuntu apparently has a rather "interesting" automake package, so I thought I'd document it here for anyone who might be interested in repeating the process. [...] I'm assuming here that you want to use as many available Ubuntu packages as is feasible, aside from maybe PHP itself, in order to minimize the amount of manual compilation necessary.
He works through the steps that include installing several packages (via apt-get), compiling PHP to work with PHP-GTK, compiling and phpize-ing the Cairo extension and including that into the php.ini for the local installation. There's even a quick test script (a clock) you can run to see if all it working correctly.
voice your opinion now!
phpgtk cairo ubuntu jaunty php5 install package tutorial
Elizabeth Smith's Blog: New Cairo Symbols in 1.8 and 1.6
by Chris Cornutt October 14, 2008 @ 09:32:10
Elizabeth Smith has worked up a post with a full listing of the new symbols in the Cairo extension (a 2D graphics library for PHP).
Originally we were only going to support the latest (1.6), but then the new 1.8 version was released and I started adding support to that as well. Then we noticed that dreadfully slow/out of date RHEL and derivatives still have 1.4 versions of Cairo floating around (yuck). So the extension will support 1.4+ However the cairo docs are incorrect in a couple of places regarding new symbols. After some header diffing here is a complete list for 1.8 and 1.6 (to make life easier for anyone else writing language wrappers).
Her list includes forty new symbols for the 1.8 release of the extension and twenty-two for version 1.6.
voice your opinion now!
cairo graphic library 2d extension pecl
|
Community Events
Don't see your event here? Let us know!
|