OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ppapi/c/pp_input_event.h" | 5 #include "ppapi/c/pp_input_event.h" |
6 #include "ppapi/cpp/graphics_2d.h" | 6 #include "ppapi/cpp/graphics_2d.h" |
7 #include "ppapi/cpp/image_data.h" | 7 #include "ppapi/cpp/image_data.h" |
8 #include "ppapi/cpp/input_event.h" | 8 #include "ppapi/cpp/input_event.h" |
9 #include "ppapi/cpp/instance.h" | 9 #include "ppapi/cpp/instance.h" |
10 #include "ppapi/cpp/module.h" | 10 #include "ppapi/cpp/module.h" |
11 #include "ppapi/cpp/paint_manager.h" | |
12 #include "ppapi/cpp/size.h" | 11 #include "ppapi/cpp/size.h" |
| 12 #include "ppapi/utility/graphics/paint_manager.h" |
13 | 13 |
14 // Number of pixels to each side of the center of the square that we draw. | 14 // Number of pixels to each side of the center of the square that we draw. |
15 static const int kSquareRadius = 2; | 15 static const int kSquareRadius = 2; |
16 | 16 |
17 // We identify our square by the center point. This computes the rect for the | 17 // We identify our square by the center point. This computes the rect for the |
18 // square given that point. | 18 // square given that point. |
19 pp::Rect SquareForPoint(int x, int y) { | 19 pp::Rect SquareForPoint(int x, int y) { |
20 return PP_MakeRectFromXYWH(x - kSquareRadius, y - kSquareRadius, | 20 return PP_MakeRectFromXYWH(x - kSquareRadius, y - kSquareRadius, |
21 kSquareRadius * 2 + 1, kSquareRadius * 2 + 1); | 21 kSquareRadius * 2 + 1, kSquareRadius * 2 + 1); |
22 } | 22 } |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 }; | 151 }; |
152 | 152 |
153 namespace pp { | 153 namespace pp { |
154 | 154 |
155 // Factory function for your specialization of the Module object. | 155 // Factory function for your specialization of the Module object. |
156 Module* CreateModule() { | 156 Module* CreateModule() { |
157 return new MyModule(); | 157 return new MyModule(); |
158 } | 158 } |
159 | 159 |
160 } // namespace pp | 160 } // namespace pp |
OLD | NEW |