- added typemap type names to types in Imager::API.
authorTony Cook <tony@develop=help.com>
Sat, 21 Jan 2006 03:50:00 +0000 (03:50 +0000)
committerTony Cook <tony@develop=help.com>
Sat, 21 Jan 2006 03:50:00 +0000 (03:50 +0000)
Changes
lib/Imager/API.pm

diff --git a/Changes b/Changes
index ba5216704609f9c454a4b7df1ebd9e35ec8a1cc7..3b5a5f2b21577eb3ace043ce89afceb2e3c21633 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1311,6 +1311,7 @@ Revision history for Perl extension Imager.
   and returns an appropriate error message in $im->errstr
 - write failures when writing a raw image now return a useful
   message in $im->errstr
+- added typemap type names to types in Imager::API.
 
 =================================================================
 
index acb6397520310553afe3f6a7d8e1341f9dfb7007..6f605811b0f5fb1c358b666dc3f5633bbbdb3f71 100644 (file)
@@ -46,6 +46,17 @@ or file format handlers.
 See L<Imager::Inline> for information on using Imager's Inline::C
 support.
 
+=head1 Beware
+
+=over
+
+=item *
+
+don't return an object you received as a parameter - this will cause
+the object to be freed twice.
+
+=back
+
 =head1 Types
 
 The API makes the following types visible:
@@ -83,6 +94,16 @@ perform various low level image operations.
 The only time you should directly write to any value in this type is
 if you're implementing your own image type.
 
+The typemap includes typenames Imager and Imager::ImgRaw as typedefs
+for C<i_img *>.
+
+For incoming parameters the typemap will accept either Imager or
+Imager::ImgRaw objects.
+
+For return values the typemap will produce a full Imager object for an
+Imager return type and a raw image object for an Imager::ImgRaw return
+type.
+
 =head2 i_color - 8-bit color
 
 Represents an 8-bit per sample color.  This is a union containing
@@ -108,11 +129,15 @@ channels - array of channels.
 
 =back
 
+Use Imager::Color for parameter and return value types.
+
 =head2 i_fcolor - floating point color
 
-Similar to i_fcolor except that each component is a double instead of
+Similar to i_color except that each component is a double instead of
 an unsigned char.
 
+Use Imager::Color::Float for parameter and return value types.
+
 =head2 i_fill_t - fill objects
 
 Abstract type containing pointers called to perform low level fill
@@ -121,6 +146,10 @@ operations.
 Unless you're defining your own fill objects you should treat this as
 an opaque type.
 
+Use Imager::FillHandle for parameter and return value types.  At the
+Perl level this is stored in the C<fill> member of the Perl level
+Imager::Fill object.
+
 =head1 Create an XS module using the Imager API
 
 =head2 Foo.xs