]> git.imager.perl.org - imager.git/blobdiff - datatypes.h
Initial version
[imager.git] / datatypes.h
index 78f6398f40abd467631b89c52b4a8421505ceedf..9270d2c0b03392c15c4a8df350bfc17059b074d3 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _DATATYPES_H_
 #define _DATATYPES_H_
 
-#include "io.h"
+#include "imio.h"
 
 #define MAXCHANNELS 4
 
@@ -49,7 +49,7 @@ typedef union {
 
 typedef enum {
   i_direct_type, /* direct colour, keeps RGB values per pixel */
-  i_palette_type, /* keeps a palette index per pixel */
+  i_palette_type /* keeps a palette index per pixel */
 } i_img_type_t;
 
 typedef enum { 
@@ -57,7 +57,7 @@ typedef enum {
   /* a paletted image might have one bit per sample */
   i_8_bits = 8,
   i_16_bits = 16,
-  i_double_bits = 64
+  i_double_bits = sizeof(double) * 8
 } i_img_bits_t;
 
 typedef struct {
@@ -85,9 +85,9 @@ typedef int (*i_f_glin_t)(i_img *im, int x, int r, int y, i_color *vals);
 typedef int (*i_f_glinf_t)(i_img *im, int x, int r, int y, i_fcolor *vals);
 
 typedef int (*i_f_gsamp_t)(i_img *im, int x, int r, int y, i_sample_t *samp,
-                           int *chans, int chan_count);
+                           const int *chans, int chan_count);
 typedef int (*i_f_gsampf_t)(i_img *im, int x, int r, int y, i_fsample_t *samp,
-                            int *chan, int chan_count);
+                            const int *chan, int chan_count);
 
 typedef int (*i_f_gpal_t)(i_img *im, int x, int r, int y, i_palidx *vals);
 typedef int (*i_f_ppal_t)(i_img *im, int x, int r, int y, i_palidx *vals);
@@ -226,5 +226,17 @@ void octt_dump(struct octt *ct);
 void octt_count(struct octt *ct,int *tot,int max,int *overflow);
 void octt_delete(struct octt *ct);
 
+/* font bounding box results */
+enum bounding_box_index_t {
+  BBOX_NEG_WIDTH,
+  BBOX_GLOBAL_DESCENT,
+  BBOX_POS_WIDTH,
+  BBOX_GLOBAL_ASCENT,
+  BBOX_DESCENT,
+  BBOX_ASCENT,
+  BBOX_ADVANCE_WIDTH,
+  BOUNDING_BOX_COUNT
+};
+
 #endif