[cairo-commit] cairo-perl Cairo.pm, 1.29, 1.29.2.1 ChangeLog, 1.73, 1.73.2.1 Makefile.PL, 1.28, 1.28.2.1

Torsten Schoenfeld commit at pdx.freedesktop.org
Tue Nov 20 12:01:09 PST 2007


Committed by: tsch

Update of /cvs/cairo/cairo-perl
In directory kemper:/tmp/cvs-serv10342

Modified Files:
      Tag: stable-1-04
	Cairo.pm ChangeLog Makefile.PL 
Log Message:
	* Cairo.pm: Add entries for the various surfaces to the API
	listing.

	* Makefile.PL: Update the list of exported symbols.  (Reported by
	spicy jack)

	* t/Cairo.t
	* t/CairoPattern.t: When Test::Number::Delta is not available,
	skip the relevant tests instead of faking passes.  (Suggested by
	Aristotle Pagaltzis)

	* t/Cairo.t
	* t/CairoFont.t
	* t/CairoPath.t
	* t/CairoPattern.t
	* t/CairoSurface.t: Don't use the hash-ref variant of the constant
	pragma.  It's not supported by the version that ships with perl
	5.6.


Index: Cairo.pm
===================================================================
RCS file: /cvs/cairo/cairo-perl/Cairo.pm,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -u -d -r1.29 -r1.29.2.1
--- Cairo.pm	13 Oct 2007 22:42:19 -0000	1.29
+++ Cairo.pm	20 Nov 2007 20:01:07 -0000	1.29.2.1
@@ -1031,6 +1031,359 @@
 
 # --------------------------------------------------------------------------- #
 
+=head3 FreeType Fonts -- Font support for FreeType
+
+If your cairo library supports it, the FreeType integration allows you to load
+font faces from font files.  You can query for this capability with
+C<Cairo::HAS_FT_FONT>.  To actually use this, you'll need the L<Font::FreeType>
+module.
+
+=head4 my $face = Cairo::FtFontFace->create ($ft_face, $load_flags=0)
+
+=over
+
+=item $ft_face: I<Font::FreeType::Face>
+
+=item $load_flags: integer
+
+=back
+
+This method allows you to create a I<Cairo::FontFace> from a
+I<Font::FreeType::Face>.  To obtain the latter, you can for example load it
+from a file:
+
+  my $file = '/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf';
+  my $ft_face = Font::FreeType->new->face ($file);
+  my $face = Cairo::FtFontFace->create ($ft_face);
+
+=cut
+
+# --------------------------------------------------------------------------- #
+
+=head2 Surfaces
+
+=head3 I<Cairo::Surface> -- Base class for surfaces
+
+=head4 $new = $old->create_similar ($content, $width, $height)
+
+=over
+
+=item $content: I<Cairo::Content>
+
+=item $width: integer
+
+=item $height: integer
+
+=back
+
+=head4 $status = $surface->status
+
+=head4 $surface->finish
+
+=head4 $surface->flush
+
+=head4 $font_options = $surface->get_font_options
+
+=head4 $content = $surface->get_content [1.2]
+
+=head4 $surface->mark_dirty
+
+=head4 $surface->mark_dirty_rectangle ($x, $y, $width, $height)
+
+=over
+
+=item $x: integer
+
+=item $y: integer
+
+=item $width: integer
+
+=item $height: integer
+
+=back
+
+=head4 $surface->set_device_offset ($x_offset, $y_offset)
+
+=over
+
+=item $x_offset: integer
+
+=item $y_offset: integer
+
+=back
+
+=head4 ($x_offset, $y_offset) = $surface->get_device_offset [1.2]
+
+=head4 $surface->set_fallback_resolution ($x_pixels_per_inch, $y_pixels_per_inch) [1.2]
+
+=over
+
+=item $x_pixels_per_inch: double
+
+=item $y_pixels_per_inch: double
+
+=back
+
+=head4 $type = $surface->get_type [1.2]
+
+=cut
+
+# --------------------------------------------------------------------------- #
+
+=head3 Image Surfaces -- Rendering to memory buffers
+
+=head4 $surface = Cairo::ImageSurface->create ($format, $width, $height)
+
+=over
+
+=item $format: I<Cairo::Format>
+
+=item $width: integer
+
+=item $height: integer
+
+=back
+
+=head4 $surface = Cairo::ImageSurface->create_for_data ($data, $format, $width, $height, $stride)
+
+=over
+
+=item $data: image data
+
+=item $format: I<Cairo::Format>
+
+=item $width: integer
+
+=item $height: integer
+
+=item $stride: integer
+
+=back
+
+=head4 $data = $surface->get_data [1.2]
+
+=head4 $format = $surface->get_format [1.2]
+
+=head4 $width = $surface->get_width
+
+=head4 $height = $surface->get_height
+
+=head4 $stride = $surface->get_stride [1.2]
+
+=cut
+
+# --------------------------------------------------------------------------- #
+
+=head3 PDF Surfaces -- Rendering PDF documents
+
+=head4 $surface = Cairo::PdfSurface->create ($filename, $width_in_points, $height_in_points) [1.2]
+
+=over
+
+=item $filename: string
+
+=item $width_in_points: double
+
+=item $height_in_points: double
+
+=back
+
+=head4 $surface = Cairo::PdfSurface->create_for_stream ($callback, $callback_data, $width_in_points, $height_in_points) [1.2]
+
+=over
+
+=item $callback: L<Cairo::WriteFunc>
+
+=item $callback_data: scalar
+
+=item $width_in_points: double
+
+=item $height_in_points: double
+
+=back
+
+=head4 $surface->set_size ($width_in_points, $height_in_points) [1.2]
+
+=over
+
+=item $width_in_points: double
+
+=item $height_in_points: double
+
+=back
+
+=cut
+
+# --------------------------------------------------------------------------- #
+
+=head3 PNG Support -- Reading and writing PNG images
+
+=head4 $surface = Cairo::ImageSurface->create_from_png ($filename)
+
+=over
+
+=item $filename: string
+
+=back
+
+=head4 Cairo::ReadFunc: $data = sub { my ($callback_data, $length) = @_; }
+
+=over
+
+=item $data: binary image data, of length $length
+
+=item $callback_data: scalar, user data
+
+=item $length: integer, bytes to read
+
+=back
+
+=head4 $surface = Cairo::ImageSurface->create_from_png_stream ($callback, $callback_data)
+
+=over
+
+=item $callback: L<Cairo::ReadFunc>
+
+=item $callback_data: scalar
+
+=back
+
+=head4 $status = $surface->write_to_png ($filename)
+
+=over
+
+=item $filename: string
+
+=back
+
+=head4 Cairo::WriteFunc: sub { my ($callback_data, $data) = @_; }
+
+=over
+
+=item $callback_data: scalar, user data
+
+=item $data: binary image data, to be written
+
+=back
+
+=head4 $status = $surface->write_to_png_stream ($callback, $callback_data)
+
+=over
+
+=item $callback: L<Cairo::WriteFunc>
+
+=item $callback_data: scalar
+
+=back
+
+=cut
+
+# --------------------------------------------------------------------------- #
+
+=head3 PostScript Surfaces -- Rendering PostScript documents
+
+=head4 $surface = Cairo::PsSurface->create ($filename, $width_in_points, $height_in_points) [1.2]
+
+=over
+
+=item $filename: string
+
+=item $width_in_points: double
+
+=item $height_in_points: double
+
+=back
+
+=head4 $surface = Cairo::PsSurface->create_for_stream ($callback, $callback_data, $width_in_points, $height_in_points) [1.2]
+
+=over
+
+=item $callback: L<Cairo::WriteFunc>
+
+=item $callback_data: scalar
+
+=item $width_in_points: double
+
+=item $height_in_points: double
+
+=back
+
+=head4 $surface->set_size ($width_in_points, $height_in_points) [1.2]
+
+=over
+
+=item $width_in_points: double
+
+=item $height_in_points: double
+
+=back
+
+=head4 $surface->dsc_begin_setup [1.2]
+
+=head4 $surface->dsc_begin_page_setup [1.2]
+
+=head4 $surface->dsc_comment ($comment) [1.2]
+
+=over
+
+=item $comment: string
+
+=back
+
+=cut
+
+# --------------------------------------------------------------------------- #
+
+=head3 SVG Surfaces -- Rendering SVG documents
+
+=head4 $surface = Cairo::SvgSurface->create ($filename, $width_in_points, $height_in_points) [1.2]
+
+=over
+
+=item $filename: string
+
+=item $width_in_points: double
+
+=item $height_in_points: double
+
+=back
+
+=head4 $surface = Cairo::SvgSurface->create_for_stream ($callback, $callback_data, $width_in_points, $height_in_points) [1.2]
+
+=over
+
+=item $callback: L<Cairo::WriteFunc>
+
+=item $callback_data: scalar
+
+=item $width_in_points: double
+
+=item $height_in_points: double
+
+=back
+
+=head4 $surface->restrict_to_version ($version) [1.2]
+
+=over
+
+=item $version: I<Cairo::SvgVersion>
+
+=back
+
+=head4 @versions = $surface->get_versions [1.2]
+
+=head4 $string = $surface->version_to_string ($version) [1.2]
+
+=over
+
+=item $version: I<Cairo::SvgVersion>
+
+=back
+
+=cut
+
+# --------------------------------------------------------------------------- #
+
 =head2 Utilities
 
 =head3 Version Information -- Run-time and compile-time version checks.

Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo-perl/ChangeLog,v
retrieving revision 1.73
retrieving revision 1.73.2.1
diff -u -d -r1.73 -r1.73.2.1
--- ChangeLog	13 Oct 2007 22:42:19 -0000	1.73
+++ ChangeLog	20 Nov 2007 20:01:07 -0000	1.73.2.1
@@ -1,3 +1,26 @@
+2007-11-20  Torsten Schoenfeld  <kaffeetisch at gmx.de>
+
+	Merge from HEAD:
+
+	* Cairo.pm: Add entries for the various surfaces to the API
+	listing.
+
+	* Makefile.PL: Update the list of exported symbols.  (Reported by
+	spicy jack)
+
+	* t/Cairo.t
+	* t/CairoPattern.t: When Test::Number::Delta is not available,
+	skip the relevant tests instead of faking passes.  (Suggested by
+	Aristotle Pagaltzis)
+
+	* t/Cairo.t
+	* t/CairoFont.t
+	* t/CairoPath.t
+	* t/CairoPattern.t
+	* t/CairoSurface.t: Don't use the hash-ref variant of the constant
+	pragma.  It's not supported by the version that ships with perl
+	5.6.
+
 2007-10-14  Torsten Schoenfeld  <kaffeetisch at gmx.de>
 
 	* Cairo.pm

Index: Makefile.PL
===================================================================
RCS file: /cvs/cairo/cairo-perl/Makefile.PL,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -d -r1.28 -r1.28.2.1
--- Makefile.PL	13 Oct 2007 21:23:16 -0000	1.28
+++ Makefile.PL	20 Nov 2007 20:01:07 -0000	1.28.2.1
@@ -324,18 +324,20 @@
 $dep->save_config ('build/IFiles.pm');
 
 my @exports = qw(
+	cairo_font_type_from_sv
+	cairo_font_type_to_sv
 	cairo_object_from_sv
 	cairo_object_to_sv
+	cairo_pattern_to_sv
 	cairo_struct_from_sv
 	cairo_struct_to_sv
+	cairo_surface_to_sv
 	newSVCairoFontExtents
-	newSVCairoTextExtents
 	newSVCairoGlyph
-	SvCairoGlyph
 	newSVCairoPath
+	newSVCairoTextExtents
+	SvCairoGlyph
 	SvCairoPath
-	cairo_surface_to_sv
-	cairo_pattern_to_sv
 );
 
 WriteMakefile (



More information about the cairo-commit mailing list