image_hdc.h 954 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * File : image_xpm.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2009-10-16 Bernard first version
  13. */
  14. #ifndef __RTGUI_IMAGE_HDC_H__
  15. #define __RTGUI_IMAGE_HDC_H__
  16. #include <rtgui/image.h>
  17. struct rtgui_image_hdcmm
  18. {
  19. struct rtgui_image parent;
  20. /* hdc image information */
  21. rt_uint16_t byte_per_pixel;
  22. rt_uint16_t pitch;
  23. rt_uint8_t *pixels;
  24. };
  25. void rtgui_image_hdc_init(void);
  26. extern const struct rtgui_image_engine rtgui_image_hdcmm_engine;
  27. #define HDC_HEADER_SIZE (5 * 4)
  28. #define RTGUI_IMAGE_HDC_DEF(bpp, w, h, pixels) \
  29. {{w, h, &rtgui_image_hdcmm_engine, RT_NULL}, bpp, (bpp * w), ((rt_uint8_t*)pixels + HDC_HEADER_SIZE)}
  30. #endif