00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_IMAGE_GLA_UINT_H
00030 #define _GAN_IMAGE_GLA_UINT_H
00031
00032 #define GAN_PIXEL struct Gan_GLAPixel_ui
00033 #define GAN_PIXEL_FORMAT grey-level alpha
00034 #define GAN_PIXEL_TYPE unsigned int
00035 #define GAN_IMTYPE ui
00036 #define GAN_IMAGE_FORM_GEN gan_image_form_gen_gla_ui
00037 #define GAN_IMAGE_SET_GEN gan_image_set_gen_gla_ui
00038 #define GAN_IMAGE_ALLOC gan_image_alloc_gla_ui
00039 #define GAN_IMAGE_ALLOC_DATA gan_image_alloc_data_gla_ui
00040 #define GAN_IMAGE_FORM gan_image_form_gla_ui
00041 #define GAN_IMAGE_FORM_DATA gan_image_form_data_gla_ui
00042 #define GAN_IMAGE_SET gan_image_set_gla_ui
00043 #define GAN_IMAGE_SET_PIX gan_image_set_pix_gla_ui
00044 #define GAN_IMAGE_GET_PIX gan_image_get_pix_gla_ui
00045 #define GAN_IMAGE_GET_PIXPTR gan_image_get_pixptr_gla_ui
00046 #define GAN_IMAGE_GET_PIXARR gan_image_get_pixarr_gla_ui
00047 #define GAN_IMAGE_FILL_CONST gan_image_fill_const_gla_ui
00048
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077 #include <stdlib.h>
00078 #include <gandalf/common/misc_defs.h>
00079 #include <gandalf/image/image_defs.h>
00080
00086 #ifdef __cplusplus
00087 extern "C" {
00088 #endif
00089
00090
00091 struct Gan_Image *gan_image_set_gen_gla_ui ( struct Gan_Image *img,
00092 unsigned long height,
00093 unsigned long width,
00094 unsigned long stride,
00095 Gan_Bool alloc_pix_data );
00096
00097 struct Gan_Image *gan_image_form_gen_gla_ui ( struct Gan_Image *img,
00098 unsigned long height,
00099 unsigned long width,
00100 unsigned long stride,
00101 Gan_Bool alloc_pix_data,
00102 struct Gan_GLAPixel_ui *pix_data,
00103 size_t pix_data_size,
00104 struct Gan_GLAPixel_ui **row_data,
00105 size_t row_data_size );
00106
00107 #ifndef NDEBUG
00108 struct Gan_GLAPixel_ui *gan_image_get_pixptr_gla_ui ( Gan_Image *img,
00109 unsigned row, unsigned col );
00110 struct Gan_GLAPixel_ui **gan_image_get_pixarr_gla_ui ( Gan_Image *img );
00111 #endif
00112
00113
00114
00115
00131 Gan_Image *gan_image_alloc_gla_ui ( unsigned long height, unsigned long width );
00132
00145 Gan_Image *gan_image_form_gla_ui ( Gan_Image *img,
00146 unsigned long height, unsigned long width );
00147
00164 Gan_Image *gan_image_alloc_data_gla_ui ( unsigned long height,
00165 unsigned long width,
00166 unsigned long stride,
00167 struct Gan_GLAPixel_ui *pix_data, size_t pix_data_size,
00168 struct Gan_GLAPixel_ui **row_data, size_t row_data_size );
00169
00187 Gan_Image *gan_image_form_data_gla_ui ( Gan_Image *img,
00188 unsigned long height,
00189 unsigned long width,
00190 unsigned long stride,
00191 struct Gan_GLAPixel_ui *pix_data, size_t pix_data_size,
00192 struct Gan_GLAPixel_ui **row_data, size_t row_data_size );
00193
00213 Gan_Image *gan_image_set_gla_ui ( Gan_Image *img,
00214 unsigned long height, unsigned long width );
00215
00232 Gan_Bool gan_image_set_pix_gla_ui ( Gan_Image *img, unsigned row, unsigned col,
00233 struct Gan_GLAPixel_ui *pix );
00234
00241 struct Gan_GLAPixel_ui gan_image_get_pix_gla_ui ( Gan_Image *img, unsigned row, unsigned col );
00242
00259 Gan_Bool gan_image_fill_const_gla_ui ( Gan_Image *img, struct Gan_GLAPixel_ui *pix );
00260
00266 #ifdef __cplusplus
00267 }
00268 #endif
00269
00270 #undef GAN_PIXEL
00271 #undef GAN_PIXEL_FORMAT
00272 #undef GAN_PIXEL_TYPE
00273 #undef GAN_IMTYPE
00274 #undef GAN_IMAGE_FORM_GEN
00275 #undef GAN_IMAGE_SET_GEN
00276 #undef GAN_IMAGE_ALLOC
00277 #undef GAN_IMAGE_ALLOC_DATA
00278 #undef GAN_IMAGE_FORM
00279 #undef GAN_IMAGE_FORM_DATA
00280 #undef GAN_IMAGE_SET
00281 #undef GAN_IMAGE_SET_PIX
00282 #undef GAN_IMAGE_GET_PIX
00283 #undef GAN_IMAGE_GET_PIXPTR
00284 #undef GAN_IMAGE_GET_PIXARR
00285 #undef GAN_IMAGE_FILL_CONST
00286 #undef GAN_IMAGE_GET_ACTIVE_SUBWINDOW
00287 #undef GAN_IMAGE_MASK_WINDOW
00288
00294 #endif