]> git.imager.perl.org - imager.git/commitdiff
add read/write row of pixels to image interface
authorTony Cook <tony@develop=help.com>
Sun, 6 May 2001 07:38:19 +0000 (07:38 +0000)
committerTony Cook <tony@develop=help.com>
Sun, 6 May 2001 07:38:19 +0000 (07:38 +0000)
datatypes.h
image.h

index 1f18bf5116f83d0150de58dfd265bb2c41b51d92..1a2d5de13c8794951a45f0ca3e322bc0ef315240 100644 (file)
@@ -30,6 +30,8 @@ struct _i_img {
 
   int (*i_f_ppix) (struct _i_img *,int,int,i_color *); 
   int (*i_f_gpix) (struct _i_img *,int,int,i_color *);
+  int (*i_f_plin) (struct _i_img *,int l, int r, int y, i_color *);
+  int (*i_f_glin) (struct _i_img *,int l, int r, int y, i_color *);
   void *ext_data;
 };
 
diff --git a/image.h b/image.h
index f8213abe324e05c412f538315c75512daf5b5874..c12a805b760e546f8469bf91e8d344346672082b 100644 (file)
--- a/image.h
+++ b/image.h
@@ -62,6 +62,11 @@ int i_gpix(i_img *im,int x,int y,i_color *val);
 
 int i_ppix_d(i_img *im,int x,int y,i_color *val);
 int i_gpix_d(i_img *im,int x,int y,i_color *val);
+int i_plin_d(i_img *im,int l, int r, int y, i_color *val);
+int i_glin_d(i_img *im,int l, int r, int y, i_color *val);
+
+#define i_plin(im, l, r, y, val) (((im)->i_f_plin)(im, l, r, y, val))
+#define i_glin(im, l, r, y, val) (((im)->i_f_glin)(im, l, r, y, val))
 
 float i_gpix_pch(i_img *im,int x,int y,int ch);