Main Page   Modules   Compound List   File List   Compound Members   File Members  

image_pointer.h

Go to the documentation of this file.
00001 
00014 /* This library is free software; you can redistribute it and/or
00015    modify it under the terms of the GNU Lesser General Public
00016    License as published by the Free Software Foundation; either
00017    version 2.1 of the License, or (at your option) any later version.
00018 
00019    This library is distributed in the hope that it will be useful,
00020    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022    Lesser General Public License for more details.
00023 
00024    You should have received a copy of the GNU Lesser General Public
00025    License along with this library; if not, write to the Free Software
00026    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027 */
00028 
00029 #ifndef _GAN_IMAGE_POINTER_H
00030 #define _GAN_IMAGE_POINTER_H
00031 
00032 #define GAN_PIXEL void *
00033 #define GAN_PIXEL_FORMAT grey-level
00034 #define GAN_PIXEL_TYPE void *
00035 #define GAN_IMTYPE p
00036 #define GAN_IMAGE_FORM_GEN gan_image_form_gen_p
00037 #define GAN_IMAGE_SET_GEN gan_image_set_gen_p
00038 #define GAN_IMAGE_ALLOC gan_image_alloc_p
00039 #define GAN_IMAGE_ALLOC_DATA gan_image_alloc_data_p
00040 #define GAN_IMAGE_FORM gan_image_form_p
00041 #define GAN_IMAGE_FORM_DATA gan_image_form_data_p
00042 #define GAN_IMAGE_SET gan_image_set_p
00043 #define GAN_IMAGE_SET_PIX gan_image_set_pix_p
00044 #define GAN_IMAGE_GET_PIX gan_image_get_pix_p
00045 #define GAN_IMAGE_GET_PIXPTR gan_image_get_pixptr_p
00046 #define GAN_IMAGE_GET_PIXARR gan_image_get_pixarr_p
00047 #define GAN_IMAGE_FILL_CONST gan_image_fill_const_p
00048 #define GAN_IMAGE_GET_ACTIVE_SUBWINDOW gan_image_get_active_subwindow_p
00049 #define GAN_IMAGE_MASK_WINDOW gan_image_mask_window_p
00050 
00070 /* This library is free software; you can redistribute it and/or
00071    modify it under the terms of the GNU Lesser General Public
00072    License as published by the Free Software Foundation; either
00073    version 2.1 of the License, or (at your option) any later version.
00074 
00075    This library is distributed in the hope that it will be useful,
00076    but WITHOUT ANY WARRANTY; without even the implied warranty of
00077    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00078    Lesser General Public License for more details.
00079 
00080    You should have received a copy of the GNU Lesser General Public
00081    License along with this library; if not, write to the Free Software
00082    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00083 */
00084 
00085 #include <stdlib.h>
00086 #include <gandalf/common/misc_defs.h>
00087 #include <gandalf/image/image_defs.h>
00088 
00094 #ifdef __cplusplus
00095 extern "C" {
00096 #endif
00097 
00098 /* function declarations */
00099 struct Gan_Image *gan_image_set_gen_p ( struct Gan_Image *img,
00100                                       unsigned long height,
00101                                       unsigned long width,
00102                                       unsigned long stride,
00103                                       Gan_Bool alloc_pix_data );
00104 struct Gan_Image *gan_image_form_gen_p (
00105                                  struct Gan_Image *img,
00106                                  unsigned long height,
00107                                  unsigned long width,
00108                                  unsigned long stride,
00109                                  Gan_Bool alloc_pix_data,
00110                                  void *  *pix_data, size_t pix_data_size,
00111                                  void * **row_data, size_t row_data_size );
00112 Gan_Bool gan_image_get_active_subwindow_p ( Gan_Image *image,
00113                                           Gan_ImageWindow *subwin );
00114 #ifndef NDEBUG
00115 void * *gan_image_get_pixptr_p ( Gan_Image *img,
00116                                   unsigned row, unsigned col );
00117 void * **gan_image_get_pixarr_p ( Gan_Image *img );
00118 #endif /* #ifndef NDEBUG */
00119 Gan_Bool gan_image_mask_window_p ( Gan_Image *pImage,
00120                                  unsigned r0,     unsigned c0,
00121                                  unsigned height, unsigned width );
00122 
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 
00127 /* declarations of macros defined in individual header files */
00128 
00143 Gan_Image *gan_image_alloc_p ( unsigned long height, unsigned long width );
00144 
00155 Gan_Image *gan_image_form_p ( Gan_Image *img,
00156                             unsigned long height,
00157                             unsigned long width );
00158 
00175 Gan_Image *gan_image_alloc_data_p ( unsigned long height,
00176                                   unsigned long width,
00177                                   unsigned long stride,
00178                                   void *  *pix_data, size_t pix_data_size,
00179                                   void * **row_data, size_t row_data_size );
00180 
00198 Gan_Image *gan_image_form_data_p ( Gan_Image *img,
00199                                  unsigned long height,
00200                                  unsigned long width,
00201                                  unsigned long stride,
00202                                  void *  *pix_data, size_t pix_data_size,
00203                                  void * **row_data, size_t row_data_size );
00204 
00224 Gan_Image *gan_image_set_p ( Gan_Image *img,
00225                            unsigned long height, unsigned long width );
00226 
00243 Gan_Bool gan_image_set_pix_p ( Gan_Image *img,
00244                              unsigned row, unsigned col, void * pix );
00245 
00252 void * gan_image_get_pix_p ( Gan_Image *img,
00253                               unsigned row, unsigned col );
00254 
00270 Gan_Bool gan_image_fill_const_p ( Gan_Image *img, void * pix );
00271 
00277 #undef GAN_PIXEL
00278 #undef GAN_PIXEL_FORMAT
00279 #undef GAN_PIXEL_TYPE
00280 #undef GAN_IMTYPE
00281 #undef GAN_IMAGE_FORM_GEN
00282 #undef GAN_IMAGE_SET_GEN
00283 #undef GAN_IMAGE_ALLOC
00284 #undef GAN_IMAGE_ALLOC_DATA
00285 #undef GAN_IMAGE_FORM
00286 #undef GAN_IMAGE_FORM_DATA
00287 #undef GAN_IMAGE_SET
00288 #undef GAN_IMAGE_SET_PIX
00289 #undef GAN_IMAGE_GET_PIX
00290 #undef GAN_IMAGE_GET_PIXPTR
00291 #undef GAN_IMAGE_GET_PIXARR
00292 #undef GAN_IMAGE_FILL_CONST
00293 #undef GAN_IMAGE_GET_ACTIVE_SUBWINDOW
00294 #undef GAN_IMAGE_MASK_WINDOW
00295 #undef GAN_IMAGE_PIXEL_ZERO_VAL
00296 #undef GAN_BITMAP
00297 
00303 #ifdef __cplusplus
00304 extern "C" {
00305 #endif
00306 
00307 #ifdef __cplusplus
00308 }
00309 #endif
00310 
00311 #endif /* #ifndef _GAN_IMAGE_POINTER_H */

Generated on Mon Oct 13 16:14:32 2003 by doxygen1.3-rc1