Design Patterns
image.h
Go to the documentation of this file.
1 // Based on "Design Patterns: Elements of Reusable Object-Oriented Software"
2 // book by Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm
3 //
4 // Created by Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan.
5 
6 #ifndef STRUCTURAL_PROXY_IMAGE_H_
7 #define STRUCTURAL_PROXY_IMAGE_H_
8 
9 #include "event.h"
10 #include "graphic_interface.h"
11 
12 #include "../commons/point.h"
13 
14 namespace structural
15 {
16 namespace proxy
17 {
18 class Image : public GraphicInterface
19 {
20  public:
21  explicit Image(const std::string& file_name);
22  virtual ~Image();
23 
24  virtual void Draw(const commons::Point<float>& at) override;
25  virtual void HandleMouse(Event& event) override;
26  virtual void Load(std::istream& from) override;
27  virtual void Save(std::ostream& to) override;
28  const commons::Point<float> &GetExtent() override;
29 
30  private:
31  commons::Point<float> extent_;
32 };
33 }
34 }
35 
36 #endif
37 
Definition: shape_interface.h:11
Definition: graphic_interface.h:17
virtual void HandleMouse(Event &event) override
Definition: image.cc:31
virtual void Load(std::istream &from) override
Definition: image.cc:33
const commons::Point< float > & GetExtent() override
Definition: image.cc:37
Definition: event.h:13
virtual ~Image()
Definition: image.cc:17
Definition: image.h:18
Image(const std::string &file_name)
Definition: image.cc:12
virtual void Save(std::ostream &to) override
Definition: image.cc:35
virtual void Draw(const commons::Point< float > &at) override
Definition: image.cc:19