update Changes
[imager.git] / typemap.local
index 6ad73ff..a3ea2d2 100644 (file)
@@ -5,11 +5,22 @@
 i_channel_list         T_IM_CHANNEL_LIST
 i_sample_list          T_IM_SAMPLE_LIST
 i_fsample_list         T_IM_FSAMPLE_LIST
+i_polygon_list         T_IM_POLYGON_LIST
 
 off_t                  T_OFF_T
 
 Imager::Internal::Hlines T_PTROBJ
 
+Imager::Context                 T_PTROBJ
+
+i_palidx               T_IV
+double *               T_AVARRAY
+int *                          T_AVARRAY
+i_img_dim *            T_AVARRAY
+i_color *              T_AVARRAY
+
+i_poly_fill_mode_t     T_I_POLY_FILL_MODE_T
+
 #############################################################################
 INPUT
 
@@ -100,6 +111,37 @@ T_IM_FSAMPLE_LIST
            croak(\"$pname: no samples provided in $var\");
        }
 
+T_IM_POLYGON_LIST
+        S_get_polygon_list(aTHX_ &$var, $arg);
+
+T_AVARRAY
+       STMT_START {
+               SV* const xsub_tmp_sv = $arg;
+               SvGETMAGIC(xsub_tmp_sv);
+               if (SvROK(xsub_tmp_sv) && SvTYPE(SvRV(xsub_tmp_sv)) == SVt_PVAV){
+                   AV *xsub_tmp_av = (AV*)SvRV(xsub_tmp_sv);
+                   STRLEN xsub_index;
+                   size_$var = av_len(xsub_tmp_av) + 1;
+                   $var = $ntype(size_$var);
+                   for (xsub_index = 0; xsub_index < size_$var; ++xsub_index) {
+                       SV **sv = av_fetch(xsub_tmp_av, xsub_index, 0);
+                       if (sv) {
+                         ${var}[xsub_index] = Sv${(my $ntt = $ntype) =~ s/Ptr$//; \(ucfirst $ntt)}(*sv, \"$pname\");
+                        }
+                   }
+               }
+               else{
+                   Perl_croak(aTHX_ \"%s: %s is not an ARRAY reference\",
+                               ${$ALIAS?\q[GvNAME(CvGV(cv))]:\qq[\"$pname\"]},
+                               \"$var\");
+               }
+       } STMT_END
+
+T_I_POLY_FILL_MODE_T
+       $var = S_get_poly_fill_mode(aTHX_ $arg);
+
+
+
 #############################################################################
 OUTPUT