VisibleRect.h 580 B

12345678910111213141516171819202122232425
  1. #ifndef __VISIBLERECT_H__
  2. #define __VISIBLERECT_H__
  3. #include "cocos2d.h"
  4. class VisibleRect
  5. {
  6. public:
  7. static cocos2d::Rect getVisibleRect();
  8. static cocos2d::Vec2 left();
  9. static cocos2d::Vec2 right();
  10. static cocos2d::Vec2 top();
  11. static cocos2d::Vec2 bottom();
  12. static cocos2d::Vec2 center();
  13. static cocos2d::Vec2 leftTop();
  14. static cocos2d::Vec2 rightTop();
  15. static cocos2d::Vec2 leftBottom();
  16. static cocos2d::Vec2 rightBottom();
  17. private:
  18. static void lazyInit();
  19. static cocos2d::Rect s_visibleRect;
  20. };
  21. #endif /* __VISIBLERECT_H__ */