News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

ZetaCode.com:
PHP GTK tutorial
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.

0 comments voice your opinion now!
phpgtk graphical frontend tutorial widget cairo


Voices of the ElePHPant:
Interview with Michael Maclean
July 07, 2011 @ 08:56:10

The Voices of the ElePHPant podcast has release their latest episode today - an interview with Michael Maclean, a developer on the Cairo PHP project.

Cal asks Michael his "three questions" about his

  • Explain to us what Cairo PHP is and why PHP developers should be interested in it.
  • What is your role in the project and how did you get involved in such a unique project?
  • Give us some examples of some real-world projects that use Cairo PHP.

You can listen to this new episode either through the in-page player, by downloading the mp3 or by subscribing to their feed.

0 comments voice your opinion now!
voice elephpant podcast interview community member michaelmaclean cairo


Michael Maclean's Blog:
Using Pango for PHP a taster
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.

0 comments 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
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.

1 comment voice your opinion now!
phpgtk cairo linux ubuntu tutorial install


Michael Maclean's Blog:
Handling fonts in PECL/Cairo
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.

0 comments voice your opinion now!
cairo graphic manipulation extension font freetype


Elizabeth Smith's Blog:
Cairo Alpha Released
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.

0 comments voice your opinion now!
alpha extension graphics cairo


Matthew Turland's Blog:
Building PHP-GTK with Cairo Support on Ubuntu Jaunty
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.

2 comments 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
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.

0 comments voice your opinion now!
cairo graphic library 2d extension pecl


PHP.net:
Google Summer of Code php.net students
April 23, 2008 @ 07:58:21

The main PHP.net website has posted a list of people participating in this year's Google Summer of Code project on various PHP projects. These include:

You can check out more information on the projects (including links to their individual pages) on this page of the Google Code website.

0 comments voice your opinion now!
phpnet gsoc2008 students optimizer xdebug cairo pecl unicode php6


Kore Nordmann's Blog:
Comparision of PHP image libraries
December 13, 2007 @ 12:07:00

Kore Nordmann has written up some benchmarks of some of the more popular PHP image creation libraries testing their output times and results for generating the same image.

In my article series I showed several ways on how to create images with PHP, going into implementation details etc. Now I just want to provide a very rough overview on speed and quality of the extensions.

He ran them with some settings disabled to optimize things as they ran and came up with results pointing to Cairo being the fastest to generate and output the image. It also had the benefit of outputting an image with the highest quality of the five tested (Cairo, SVG, Flash and GD with and without supersampling). His benchmark code is also included.

0 comments voice your opinion now!
compare benchmark image library cairo svg flash gd compare benchmark image library cairo svg flash gd



Community Events











Don't see your event here?
Let us know!


opinion hhvm composer code unittest security language install facebook overview release example component hack symfony2 podcast framework package introduction application

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework