about summary refs log tree commit diff
path: root/lib/ppmfloyd.h
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-08-19 03:12:28 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-08-19 03:12:28 +0000
commit1fd361a1ea06e44286c213ca1f814f49306fdc43 (patch)
tree64c8c96cf54d8718847339a403e5e67b922e8c3f /lib/ppmfloyd.h
downloadnetpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.gz
netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.tar.xz
netpbm-mirror-1fd361a1ea06e44286c213ca1f814f49306fdc43.zip
Create Subversion repository
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib/ppmfloyd.h')
-rw-r--r--lib/ppmfloyd.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/lib/ppmfloyd.h b/lib/ppmfloyd.h
new file mode 100644
index 00000000..e16ad651
--- /dev/null
+++ b/lib/ppmfloyd.h
@@ -0,0 +1,67 @@
+/* These declarations were supposed to be in the libfloyd.h file in the ilbm
+   package, but that file was missing, so I made them up myself.  
+   - Bryan 01.03.10.
+*/
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#if 0
+} /* to fake out automatic code indenters */
+#endif
+
+struct ppm_fs_info {
+    /* thisXerr and nextXerr are dynamically allocated arrays each of whose
+       dimension is the width of the image plus 2
+       */
+    long *thisrederr;
+    long *thisgreenerr;
+    long *thisblueerr;
+    long *nextrederr;
+    long *nextgreenerr;
+    long *nextblueerr;
+    int lefttoright;
+    int cols;
+    pixval maxval;
+    int flags;
+    pixel *pixrow;
+    int col_end;
+    pixval red, green, blue;
+};
+
+typedef struct ppm_fs_info ppm_fs_info;
+
+/* Bitmasks for ppm_fs_info.flags */
+#define FS_RANDOMINIT 0x01
+#define FS_ALTERNATE  0x02
+
+ppm_fs_info *
+ppm_fs_init(int cols, pixval maxval, int flags);
+
+void
+ppm_fs_free(ppm_fs_info *fi);
+
+int
+ppm_fs_startrow(ppm_fs_info *fi, pixel *pixrow);
+
+int
+ppm_fs_next(ppm_fs_info *fi, int col);
+
+void
+ppm_fs_endrow(ppm_fs_info *fi);
+
+void
+ppm_fs_update(    ppm_fs_info *fi, int col, pixel *pP);
+
+
+void
+ppm_fs_update3(ppm_fs_info * const fi, 
+               int           const col, 
+               pixval        const r, 
+               pixval        const g, 
+               pixval        const b);
+
+#ifdef __cplusplus
+}
+#endif