Skip to content
forked from gtkforphp/cairo

PHP extension for Cairo Graphics Library

License

Notifications You must be signed in to change notification settings

swen100/php-cairo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cairo for PHP 8

Cairo is a 2D graphics library with support for multiple output devices. Output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG files.

This extension provides access to Cairo functionality in PHP8 in the Cairo namespace.

Build Status Scrutinizer Code Quality

Requirements

Additional features are supported up to Cairo version 1.17.0

Features are enabled at compile time based on the library version they are compiled against.

Documentation and information about the underlying library can be found at cairographics.org

Installation

There are plans to make this available via pecl and pickle But this is currently the unstable PHP7 version

Until then, please compile and install the both the datastructures and the cairo extensions and enable them in your php.ini file

extension=eos_datastructures.so
extension=cairo.so

Compile

This extension can be compiled and tested using phpize.

First you need to make and install the Eos\DataStructures extension, which provides Enum support.

The cairo extension also requires cairo development files. You can build the package manually or use your system's package manager. For example on ubuntu use

apt-get install libcairo2-dev libfreetype6-dev fontconfig libjpeg-dev

Then you can use phpize to install the extension against your current PHP install:

phpize
./configure
make && make test && make install

If you want to use a non-standard location for your PHP use:

/path/to/phpize
./configure --with-php-config=/path/to/php-config
make && make test && make install

make install copies cairo.so to the right location, but you still need to enable the module in your php.ini file.

Examples

The examples directory holds samples of all currently working utilities for the extension.

Community

You can find us on freenode on #gtkforphp

The main website is Gtk For PHP

You can view commits and released on twitter

You can send comments, patches, questions here on github

Authors

Elizabeth M Smith | Swen Zanon | Bernhard R. Fischer (JPEG-integration)

License

PHP extension binding code released under the MIT license See LICENSE

The Cairo Graphics library is is released under the LGPL

Documentation

What little documentation we currently have is in code comments and the docs directory.

We'd like to use some kind of markdown or rst format for docs, a decision isn't final yet.

About

PHP extension for Cairo Graphics Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 58.4%
  • PHP 41.0%
  • M4 0.6%