Imager::Color::Float
ICLF_new_internal(r, g, b, a)
- double r
- double g
- double b
- double a
+ im_double r
+ im_double g
+ im_double b
+ im_double a
void
ICLF_DESTROY(cl)
void
ICLF_set_internal(cl,r,g,b,a)
Imager::Color::Float cl
- double r
- double g
- double b
- double a
+ im_double r
+ im_double g
+ im_double b
+ im_double a
PPCODE:
cl->rgba.r = r;
cl->rgba.g = g;
MODULE = Imager PACKAGE = Imager::ImgRaw PREFIX = IIM_
Imager::ImgRaw
-IIM_new(x,y,ch)
- i_img_dim x
- i_img_dim y
+IIM_new(xsize,ysize,ch)
+ i_img_dim xsize
+ i_img_dim ysize
int ch
void
Imager::ImgRaw im
i_img_dim x
i_img_dim y
- double rad
- double d1
- double d2
+ im_double rad
+ im_double d1
+ im_double d2
Imager::Color val
void
i_arc_aa(im,x,y,rad,d1,d2,val)
Imager::ImgRaw im
- double x
- double y
- double rad
- double d1
- double d2
+ im_double x
+ im_double y
+ im_double rad
+ im_double d1
+ im_double d2
Imager::Color val
void
Imager::ImgRaw im
i_img_dim x
i_img_dim y
- double rad
- double d1
- double d2
+ im_double rad
+ im_double d1
+ im_double d2
Imager::FillHandle fill
void
i_arc_aa_cfill(im,x,y,rad,d1,d2,fill)
Imager::ImgRaw im
- double x
- double y
- double rad
- double d1
- double d2
+ im_double x
+ im_double y
+ im_double rad
+ im_double d1
+ im_double d2
Imager::FillHandle fill
void
i_circle_aa(im,x,y,rad,val)
Imager::ImgRaw im
- double x
- double y
- double rad
+ im_double x
+ im_double y
+ im_double rad
Imager::Color val
void
i_circle_aa_fill(im,x,y,rad,fill)
Imager::ImgRaw im
- double x
- double y
- double rad
+ im_double x
+ im_double y
+ im_double rad
Imager::FillHandle fill
int
i_img_dim x
i_img_dim y
i_img_dim rad
- double d1
- double d2
+ im_double d1
+ im_double d2
Imager::Color val
int
i_img_dim x
i_img_dim y
i_img_dim rad
- double d1
- double d2
+ im_double d1
+ im_double d2
Imager::Color val
i_img_dim width
i_img_dim height
int combine
- double opacity
+ im_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)
i_img_dim width
i_img_dim height
int combine
- double opacity
+ im_double opacity
Imager::ImgRaw
i_combine(src_av, channels_av = NULL)
Imager::ImgRaw
i_rotate_exact(im, amount, ...)
Imager::ImgRaw im
- double amount
+ im_double amount
PREINIT:
i_color *backp = NULL;
i_fcolor *fbackp = NULL;
undef_int
i_gaussian(im,stdev)
Imager::ImgRaw im
- double stdev
+ im_double stdev
void
i_unsharp_mask(im,stdev,scale)
Imager::ImgRaw im
- double stdev
- double scale
+ im_double stdev
+ im_double scale
int
i_conv(im,coef)
i_img_samef(im1, im2, epsilon = i_img_epsilonf(), what=NULL)
Imager::ImgRaw im1
Imager::ImgRaw im2
- double epsilon
+ im_double epsilon
const char *what
double
i_img_dim xb
i_img_dim yb
Imager::Color cl
- double points
+ im_double points
SV * str_sv
int smooth
int utf8
i_img_dim xb
i_img_dim yb
int channel
- double points
+ im_double points
SV * str_sv
int smooth
int utf8
void
i_tt_bbox(handle,point,str_sv,utf8)
Imager::Font::TT handle
- double point
+ im_double point
SV* str_sv
int utf8
PREINIT:
Imager::ImgRaw
i_scaleaxis(im,Value,Axis)
Imager::ImgRaw im
- double Value
+ im_double Value
int Axis
Imager::ImgRaw
i_scale_nn(im,scx,scy)
Imager::ImgRaw im
- double scx
- double scy
+ im_double scx
+ im_double scy
Imager::ImgRaw
i_scale_mixing(im, width, height)
void
i_contrast(im,intensity)
Imager::ImgRaw im
- float intensity
+ im_float intensity
void
i_hardinvert(im)
void
i_noise(im,amount,type)
Imager::ImgRaw im
- float amount
+ im_float amount
unsigned char type
void
int channel
i_img_dim tx
i_img_dim ty
- double Lx
- double Ly
- double Lz
- float cd
- float cs
- float n
+ im_double Lx
+ im_double Ly
+ im_double Lz
+ im_float cd
+ im_float cs
+ im_float n
Imager::Color Ia
Imager::Color Il
Imager::Color Is
void
i_autolevels(im,lsat,usat,skew)
Imager::ImgRaw im
- float lsat
- float usat
- float skew
+ im_float lsat
+ im_float usat
+ im_float skew
void
i_autolevels_mono(im,lsat,usat)
Imager::ImgRaw im
- float lsat
- float usat
+ im_float lsat
+ im_float usat
void
i_radnoise(im,xo,yo,rscale,ascale)
Imager::ImgRaw im
- float xo
- float yo
- float rscale
- float ascale
+ im_float xo
+ im_float yo
+ im_float rscale
+ im_float ascale
void
i_turbnoise(im, xo, yo, scale)
Imager::ImgRaw im
- float xo
- float yo
- float scale
+ im_float xo
+ im_float yo
+ im_float scale
void
i_diff_image(im, im2, mindist=0)
Imager::ImgRaw im
Imager::ImgRaw im2
- double mindist
+ im_double mindist
undef_int
i_fountain(im, xa, ya, xb, yb, type, repeat, combine, super_sample, ssample_param, segs)
Imager::ImgRaw im
- double xa
- double ya
- double xb
- double yb
+ im_double xa
+ im_double ya
+ im_double xb
+ im_double yb
int type
int repeat
int combine
int super_sample
- double ssample_param
+ im_double ssample_param
PREINIT:
AV *asegs;
int count;
Imager::FillHandle
i_new_fill_fount(xa, ya, xb, yb, type, repeat, combine, super_sample, ssample_param, segs)
- double xa
- double ya
- double xb
- double yb
+ im_double xa
+ im_double ya
+ im_double xb
+ im_double yb
int type
int repeat
int combine
int super_sample
- double ssample_param
+ im_double ssample_param
PREINIT:
AV *asegs;
int count;
Imager::FillHandle
i_new_fill_opacity(other_fill, alpha_mult)
Imager::FillHandle other_fill
- double alpha_mult
+ im_double alpha_mult
void
i_errors()
}
Imager::ImgRaw
-i_img_8_new(x, y, ch)
- i_img_dim x
- i_img_dim y
- int ch
+i_img_8_new(xsize, ysize, channels)
+ i_img_dim xsize
+ i_img_dim ysize
+ int channels
Imager::ImgRaw
-i_img_16_new(x, y, ch)
- i_img_dim x
- i_img_dim y
- int ch
+i_img_16_new(xsize, ysize, channels)
+ i_img_dim xsize
+ i_img_dim ysize
+ int channels
Imager::ImgRaw
i_img_to_rgb16(im)
Imager::ImgRaw im
Imager::ImgRaw
-i_img_double_new(x, y, ch)
- i_img_dim x
- i_img_dim y
- int ch
+i_img_double_new(xsize, ysize, channels)
+ i_img_dim xsize
+ i_img_dim ysize
+ int channels
Imager::ImgRaw
i_img_to_drgb(im)
"draw a very large circle");
}
+{
+ my $im = Imager->new(xsize => 200, ysize => 200);
+ my $tmp;
+ ok(!eval { $im->circle(aa => 1, color => "#FFF", r => 400, x => \$tmp, y => 100, filled => 1); 1 },
+ "croak on x being a reference");
+ like($@, qr/reference/, "check message");
+}
+
+{
+ use bignum;
+ my $im = Imager->new(xsize => 200, ysize => 200);
+ ok(eval { $im->circle(aa => 1, color => "#FFF", r => 50, x => 100, y => 100, filled => 1); 1 },
+ "don't croak on x being an overloaded reference")
+ or diag "Died $@";
+}
+
{
my $im = Imager->new(xsize => 400, ysize => 400);
ok($im->arc(x => 200, y => 202, r => 10, filled => 0),
Imager::IO T_PTROBJ
Imager::FillHandle T_PTROBJ
const char * T_PV
-float T_FLOAT
+im_float T_FLOAT
float* T_ARRAY
undef_int T_IV_U
undef_neg_int T_IV_NEGU
HASH T_HVREF
utf8_str T_UTF8_STR
-i_img_dim T_IV
+i_img_dim T_IV_checked
+im_double T_NV_checked
+
# these types are for use by Inline, which can't handle types containing ::
Imager__Color T_PTROBJ_INV
else
croak(\"$var is not of type ${(my $ntt=$ntype)=~s/__/::/g;\$ntt}\");
+T_NV_checked
+ {
+ SvGETMAGIC($arg);
+ if (SvROK($arg) && !SvAMAGIC($arg)) {
+ croak(\"Numeric argument '$var' shouldn't be a reference\");
+ }
+ else {
+ $var = ($type)SvNV($arg);
+ }
+ }
+
+T_IV_checked
+ {
+ SvGETMAGIC($arg);
+ if (SvROK($arg) && !SvAMAGIC($arg)) {
+ croak(\"Numeric argument '$var' shouldn't be a reference\");
+ }
+ else {
+ $var = ($type)SvIV($arg);
+ }
+ }
#############################################################################
OUTPUT
else {
$arg = &PL_sv_undef;
}
+
+T_IV_checked
+ sv_setiv($arg, (IV)$var);
+
+T_NV_checked
+ sv_setnv($arg, (NV)$var);