- SEE ALSO
- COPYRIGHT AND LICENSE
GD::Cairo - GD API wrapper around Cairo
use GD; # Needed for constants and GD::Polygon use GD::Cairo; # use GD; use GD::Cairo qw( :gd ); # Import GD constants and fonts # my $img = GD::Image->new( 400, 300, 1 ); my $img = GD::Cairo->new( 400, 300, 1 ); print $fh $img->svg;
This module provides a GD API emulation for the Cairo graphics library. Cairo is a vector-based drawing package that aims to provide consistent output to many graphics contexts/formats.
- GD::Cairo->new( WIDTH, HEIGHT [, TRUECOLOR ] )
Create a new image of WIDTH by HEIGHT. WIDTH and HEIGHT are in user-space units (e.g. pixels for PNG or points for PDF).
- GD::Cairo::ignoreMissing( [ WARN ] )
Ignore any missing functionality in GD::Cairo that may be in GD.
- $data = $img->png
Return the image in PNG format.
- $data = $img->pdf
Return the image in PDF format.
- $data = $img->svg
Return the image in SVG format.
- setAntiAliasedDontBlend($color [,$flag])
This is deprecated anyway.
Unlikely to ever work.
- GD::Polygon, GD::Polyline
Patches/suggestions are welcome.
I don't think Cairo supports paletted images, see http://cairographics.org/manual/cairo-Image-Surfaces.html#cairo-format-t.
PngSurface doesn't appear to reliably translate coordinates onto the surface e.g. a point at 0,0 doesn't get rendered at all.
StringFT* will always render using 'Sans-Serif' and String* using 'Monospace' (which depend on fontconfig). I need an example for loading fonts with Cairo.
GD renders brushes by repeatedly rendering the brush (an image) along the path the given shape provides. This isn't practically achievable with Cairo (AFAIK), so instead I repeat the image along the path/fill.
Does not support gdStyledBrushed.
In order to support GD::Image::fill GD::Cairo builds a stack of operations, which makes it memory inefficient compared to writing direct to a GD::Image surface.
GD::Cairo also stores a hash entry for every pixel set with setPixel to support getPixel.
Tim D Brody, <firstname.lastname@example.org>
Copyright (C) 2007 by Tim D Brody
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 1458:
You forgot a '=back' before '=head1'