image_9patch.h 614 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * File : image_9patch.h
  3. * COPYRIGHT (C) 2012-2017, Shanghai Real-Thread Technology Co., Ltd
  4. *
  5. * Change Logs:
  6. * Date Author Notes
  7. * 2017-11-05 realthread the first version
  8. */
  9. #pragma once
  10. #include <pm_image.h>
  11. namespace Persimmon
  12. {
  13. class Image9Patch : public Image
  14. {
  15. public:
  16. Image9Patch(const char* filename);
  17. virtual ~Image9Patch();
  18. virtual void render(struct rtgui_dc* dc, const Rect& rect);
  19. virtual void render(struct rtgui_dc* dc, const Point& point);
  20. private:
  21. int top_x, top_width;
  22. int left_y, left_height;
  23. struct rtgui_dc *buffer;
  24. };
  25. }