00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_IMAGE_GL_INT_H
00030 #define _GAN_IMAGE_GL_INT_H
00031
00032 #define GAN_PIXEL int
00033 #define GAN_PIXEL_FORMAT grey-level
00034 #define GAN_PIXEL_TYPE int
00035 #define GAN_IMTYPE i
00036 #define GAN_IMAGE_FORM_GEN gan_image_form_gen_gl_i
00037 #define GAN_IMAGE_SET_GEN gan_image_set_gen_gl_i
00038 #define GAN_IMAGE_ALLOC gan_image_alloc_gl_i
00039 #define GAN_IMAGE_ALLOC_DATA gan_image_alloc_data_gl_i
00040 #define GAN_IMAGE_FORM gan_image_form_gl_i
00041 #define GAN_IMAGE_FORM_DATA gan_image_form_data_gl_i
00042 #define GAN_IMAGE_SET gan_image_set_gl_i
00043 #define GAN_IMAGE_SET_PIX gan_image_set_pix_gl_i
00044 #define GAN_IMAGE_GET_PIX gan_image_get_pix_gl_i
00045 #define GAN_IMAGE_GET_PIXPTR gan_image_get_pixptr_gl_i
00046 #define GAN_IMAGE_GET_PIXARR gan_image_get_pixarr_gl_i
00047 #define GAN_IMAGE_FILL_CONST gan_image_fill_const_gl_i
00048 #define GAN_IMAGE_GET_ACTIVE_SUBWINDOW gan_image_get_active_subwindow_gl_i
00049 #define GAN_IMAGE_MASK_WINDOW gan_image_mask_window_gl_i
00050 #define GAN_IMAGE_CLEAR_WINDOW gan_image_clear_window_gl_i
00051 #define GAN_IMAGE_GET_MINIMUM_PIXEL gan_image_get_minimum_pixel_gl_i
00052 #define GAN_IMAGE_GET_MAXIMUM_PIXEL gan_image_get_maximum_pixel_gl_i
00053
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 #include <stdlib.h>
00089 #include <gandalf/common/misc_defs.h>
00090 #include <gandalf/image/image_defs.h>
00091
00097 #ifdef __cplusplus
00098 extern "C" {
00099 #endif
00100
00101
00102
00110 struct Gan_Image *gan_image_set_gen_gl_i ( Gan_Image *img,
00111 unsigned long height,
00112 unsigned long width,
00113 unsigned long stride,
00114 Gan_Bool alloc_pix_data );
00126 struct Gan_Image *gan_image_form_gen_gl_i (
00127 Gan_Image *img,
00128 unsigned long height,
00129 unsigned long width,
00130 unsigned long stride,
00131 Gan_Bool alloc_pix_data,
00132 int *pix_data, size_t pix_data_size,
00133 int **row_data, size_t row_data_size );
00134
00153 Gan_Bool gan_image_get_active_subwindow_gl_i ( const Gan_Image *image,
00154 Gan_ImageWindow *subwin );
00158 #ifndef NDEBUG
00159
00170 int *gan_image_get_pixptr_gl_i ( const Gan_Image *img,
00171 unsigned row, unsigned col );
00172
00179 int **gan_image_get_pixarr_gl_i ( const Gan_Image *img );
00180
00184 #endif
00185
00195 Gan_Bool gan_image_mask_window_gl_i ( Gan_Image *pImage,
00196 unsigned r0, unsigned c0,
00197 unsigned height, unsigned width );
00198
00203 Gan_Bool gan_image_clear_window_gl_i ( Gan_Image *pImage,
00204 unsigned r0, unsigned c0,
00205 unsigned height, unsigned width );
00210 #if defined(GAN_IMAGE_GET_MINIMUM_PIXEL) && !defined(GAN_BITMAP)
00211
00215 Gan_Bool gan_image_get_minimum_pixel_gl_i ( const Gan_Image *pImage,
00216 const Gan_Image *pMask,
00217 int *minval );
00218 Gan_Bool gan_image_get_maximum_pixel_gl_i ( const Gan_Image *pImage,
00219 const Gan_Image *pMask,
00220 int *maxval );
00224 #endif
00225
00226 #ifdef __cplusplus
00227 }
00228 #endif
00229
00230
00231
00246 Gan_Image *gan_image_alloc_gl_i ( unsigned long height, unsigned long width );
00247
00258 Gan_Image *gan_image_form_gl_i ( Gan_Image *img,
00259 unsigned long height,
00260 unsigned long width );
00261
00278 Gan_Image *gan_image_alloc_data_gl_i ( unsigned long height,
00279 unsigned long width,
00280 unsigned long stride,
00281 int *pix_data, size_t pix_data_size,
00282 int **row_data, size_t row_data_size );
00283
00301 Gan_Image *gan_image_form_data_gl_i ( Gan_Image *img,
00302 unsigned long height,
00303 unsigned long width,
00304 unsigned long stride,
00305 int *pix_data, size_t pix_data_size,
00306 int **row_data, size_t row_data_size );
00307
00327 Gan_Image *gan_image_set_gl_i ( Gan_Image *img,
00328 unsigned long height, unsigned long width );
00329
00346 Gan_Bool gan_image_set_pix_gl_i ( Gan_Image *img,
00347 unsigned row, unsigned col, int pix );
00348
00355 int gan_image_get_pix_gl_i ( const Gan_Image *img,
00356 unsigned row, unsigned col );
00357
00373 Gan_Bool gan_image_fill_const_gl_i ( Gan_Image *img, int pix );
00374
00380 #undef GAN_PIXEL
00381 #undef GAN_PIXEL_FORMAT
00382 #undef GAN_PIXEL_TYPE
00383 #undef GAN_IMTYPE
00384 #undef GAN_IMAGE_FORM_GEN
00385 #undef GAN_IMAGE_SET_GEN
00386 #undef GAN_IMAGE_ALLOC
00387 #undef GAN_IMAGE_ALLOC_DATA
00388 #undef GAN_IMAGE_FORM
00389 #undef GAN_IMAGE_FORM_DATA
00390 #undef GAN_IMAGE_SET
00391 #undef GAN_IMAGE_SET_PIX
00392 #undef GAN_IMAGE_GET_PIX
00393 #undef GAN_IMAGE_GET_PIXPTR
00394 #undef GAN_IMAGE_GET_PIXARR
00395 #undef GAN_IMAGE_FILL_CONST
00396 #undef GAN_IMAGE_GET_ACTIVE_SUBWINDOW
00397 #undef GAN_IMAGE_MASK_WINDOW
00398 #undef GAN_IMAGE_CLEAR_WINDOW
00399 #undef GAN_IMAGE_GET_MINIMUM_PIXEL
00400 #undef GAN_IMAGE_GET_MAXIMUM_PIXEL
00401 #undef GAN_IMAGE_PIXEL_MIN_VAL
00402 #undef GAN_IMAGE_PIXEL_MAX_VAL
00403 #undef GAN_IMAGE_PIXEL_ZERO_VAL
00404 #undef GAN_BITMAP
00405
00411 #endif