Subversion Repositories Kolibri OS

Rev

Rev 3301 | Blame | Last modification | View Log | Download | RSS feed

  1. #ifndef __PIXLIB2_H__
  2. #define __PIXLIB2_H__
  3.  
  4. #include <stdint.h>
  5.  
  6. #define HW_BIT_BLIT         (1<<0)      /* BGRX blitter             */
  7. #define HW_TEX_BLIT         (1<<1)      /* stretch blit             */
  8. #define HW_VID_BLIT         (1<<2)      /* planar and packed video  */
  9.  
  10. typedef struct
  11. {
  12.     uint32_t  handle;
  13.     uint8_t  *data;
  14.  
  15.     uint32_t  width;
  16.     uint32_t  height;
  17.     uint32_t  pitch;
  18.  
  19.     uint32_t  max_width;
  20.     uint32_t  max_height;
  21.     uint32_t  flags;
  22. }bitmap_t;
  23.  
  24. uint32_t init_pixlib(uint32_t flags);
  25. void done_pixlib();
  26.  
  27. int create_bitmap(bitmap_t *bitmap);
  28. int destroy_bitmap(bitmap_t *bitmap);
  29.  
  30. int lock_bitmap(bitmap_t *bitmap);
  31. int resize_bitmap(bitmap_t *bitmap);
  32.  
  33. int blit_bitmap(bitmap_t * bitmap, int dst_x, int dst_y,
  34.                 int w, int h, int src_x, int src_y);
  35.  
  36.  
  37.  
  38. #endif
  39.  
  40.