Eew, even more inconsistencies! If (0,0)-(0,0) is a zero-sized image, it's not intuitive that (20,20)-(20,20) produces a 1x1 image. Also, having one API function require corner point plus size and a second two corner points is another unfortunate inconsistency.
Ideally the Image classes should have defined coordinates to identify the grid in between pixels. I guess I'm spoiled by QuickDraw which uses a well-defined model in this regard.
Noone has protested against that, so far.
Well, consider it done. :-)
/ Jonas Walldén
Previous text:
2004-08-10 11:59: Subject: Image.Image
Layer-ing (Image.lay) takes a size component:
| > Image.lay( ({}), 0,0, 0,0); | Bad argument 4 to Image.lay(). Expected int(1..).
Noone has protested against that, so far.
Image.Image->copy takes coordinates, and can't produce an image smaller then 1x1 pixels:
| > Image.Image(100,100)->copy(20,20,0,0); | (1) Result: Image.Image( 21 x 21 /* 1.3Kb */) | > Image.Image(100,100)->copy(20,20,20,20); | (2) Result: Image.Image( 1 x 1 /* 0.0Kb */)
There is no crop method.
/ Mirar