sv = hv_fetch(hv, "colors", 6, 0);
if (!sv || !*sv || !SvROK(*sv) || SvTYPE(SvRV(*sv)) != SVt_PVAV) {
- SV *ref;
- av = newAV();
- ref = newRV_inc((SV*) av);
- sv = hv_store(hv, "colors", 6, ref, 0);
- }
- else {
- av = (AV *)SvRV(*sv);
+ /* nothing to do */
+ return;
}
+
+ av = (AV *)SvRV(*sv);
+ av_clear(av);
av_extend(av, quant->mc_count+1);
for (i = 0; i < quant->mc_count; ++i) {
i_color *in = quant->mc_colors+i;
work = sv_newmortal();
sv_setref_pv(work, "Imager::Color", (void *)c);
SvREFCNT_inc(work);
- if (!av_store(av, i, work)) {
- SvREFCNT_dec(work);
- }
+ av_push(av, work);
}
}
int src_maxx
int src_maxy
+undef_int
+i_compose(out, src, out_left, out_top, src_left, src_top, width, height, combine = ic_normal, opacity = 0.0)
+ Imager::ImgRaw out
+ Imager::ImgRaw src
+ int out_left
+ int out_top
+ int src_left
+ int src_top
+ int width
+ int height
+ int combine
+ double opacity
+
+undef_int
+i_compose_mask(out, src, mask, out_left, out_top, src_left, src_top, mask_left, mask_top, width, height, combine = ic_normal, opacity = 0.0)
+ Imager::ImgRaw out
+ Imager::ImgRaw src
+ Imager::ImgRaw mask
+ int out_left
+ int out_top
+ int src_left
+ int src_top
+ int mask_left
+ int mask_top
+ int width
+ int height
+ int combine
+ double opacity
undef_int
i_flipxy(im, direction)
PREINIT:
int i;
DSO_handle *dso_handle;
+ func_ptr *functions;
PPCODE:
dso_handle=(DSO_handle*)dso_handle_v;
+ functions = DSO_funclist(dso_handle);
i=0;
- while( dso_handle->function_list[i].name != NULL) {
+ while( functions[i].name != NULL) {
EXTEND(SP,1);
- PUSHs(sv_2mortal(newSVpv(dso_handle->function_list[i].name,0)));
+ PUSHs(sv_2mortal(newSVpv(functions[i].name,0)));
EXTEND(SP,1);
- PUSHs(sv_2mortal(newSVpv(dso_handle->function_list[i++].pcode,0)));
+ PUSHs(sv_2mortal(newSVpv(functions[i++].pcode,0)));
}
-
void
DSO_call(handle,func_index,hv)
void* handle
if (SvTYPE(hv)!=SVt_PVHV) croak("Imager: Parameter 2 must be a reference to a hash\n");
DSO_call( (DSO_handle *)handle,func_index,hv);
-
-
SV *
i_get_pixel(im, x, y)
Imager::ImgRaw im