dc_trans.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef __RTGUI_DC_TRANS_H__
  2. #define __RTGUI_DC_TRANS_H__
  3. #include <rtgui/dc.h>
  4. #include <rtgui/matrix.h>
  5. struct rtgui_dc_trans;
  6. /** Create a dc translator on the dc @owner
  7. *
  8. * @return RT_NULL is there is no memory.
  9. */
  10. struct rtgui_dc_trans* rtgui_dc_trans_create(struct rtgui_dc *owner);
  11. /** Rotate the dc clockwise.
  12. *
  13. * @param degree the degree to rotate.
  14. */
  15. void rtgui_dc_trans_rotate(struct rtgui_dc_trans *dct, double degree);
  16. void rtgui_dc_trans_set_aa(struct rtgui_dc_trans *dct, int use_aa);
  17. void rtgui_dc_trans_scale(struct rtgui_dc_trans *dct, double sx, double sy);
  18. /** Move the dc
  19. *
  20. * The unit of @dx and @dy is pixel.
  21. */
  22. void rtgui_dc_trans_move(struct rtgui_dc_trans *dct, int dx, int dy);
  23. void rtgui_dc_trans_get_new_wh(struct rtgui_dc_trans *dct, int *new_w, int *new_h);
  24. void rtgui_dc_trans_blit(struct rtgui_dc_trans *dct,
  25. struct rtgui_point *dc_point,
  26. struct rtgui_dc *dest,
  27. struct rtgui_rect *rect);
  28. void rtgui_dc_trans_destroy(struct rtgui_dc_trans *dct);
  29. #endif