12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #ifndef HEADER_FLEXLAY_GRAPHIC_CONTEXT_STATE_HPP
- #define HEADER_FLEXLAY_GRAPHIC_CONTEXT_STATE_HPP
- #include <ClanLib/Core/Math/rect.h>
- #include <memory>
- class CL_GraphicContext;
- class GraphicContextStateImpl;
- class GraphicContextState
- {
- public:
- GraphicContextState();
- GraphicContextState(int w, int h);
- void set_size(int w, int h);
- void push(CL_GraphicContext* gc = 0) const;
- void pop (CL_GraphicContext* gc = 0) const;
-
- CL_Rectf get_clip_rect() const;
- int get_width() const;
- int get_height() const;
-
- void set_rotation(float angle);
-
- float get_rotation() const;
-
- void set_pos(const CL_Pointf& pos);
- CL_Pointf get_pos() const;
-
- void set_zoom(CL_Pointf pos, float z);
- void set_zoom(float z);
- float get_zoom() const;
- void zoom_to (const CL_Rectf& rect);
- CL_Pointf screen2world(const CL_Point& pos);
- private:
- std::shared_ptr<GraphicContextStateImpl> impl;
- };
- #endif
|