ScreenHelper.h 628 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * ScreenHelper.h
  3. *
  4. * Created on: Oct 12, 2017
  5. * Author: guoxs
  6. */
  7. #ifndef _UTILS_SCREEN_HELPER_H_
  8. #define _UTILS_SCREEN_HELPER_H_
  9. #include <stdio.h>
  10. #include <stdint.h>
  11. class ScreenHelper {
  12. public:
  13. /**
  14. * @brief 获取屏幕宽度
  15. */
  16. static int getScreenWidth();
  17. /**
  18. * @brief 获取屏幕高度
  19. */
  20. static int getScreenHeight();
  21. /**
  22. * @brief 获取屏幕坐标像素点颜色值
  23. */
  24. static uint32_t getPixelColor(int x, int y);
  25. /**
  26. * @brief 屏幕快照
  27. * @param pSavePath BMP图片保存路径
  28. */
  29. static bool screenShot(const char *pSavePath);
  30. };
  31. #endif /* _UTILS_SCREEN_HELPER_H_ */