OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef VectorDevice_h | 5 #ifndef VectorDevice_h |
6 #define VectorDevice_h | 6 #define VectorDevice_h |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "skia/ext/platform_device_win.h" | 9 #include "skia/ext/platform_device_win.h" |
10 #include "SkMatrix.h" | 10 #include "SkMatrix.h" |
11 #include "SkRegion.h" | 11 #include "SkRegion.h" |
12 | 12 |
13 namespace gfx { | 13 namespace skia { |
14 | 14 |
15 // A device is basically a wrapper around SkBitmap that provides a surface for | 15 // A device is basically a wrapper around SkBitmap that provides a surface for |
16 // SkCanvas to draw into. This specific device is not not backed by a surface | 16 // SkCanvas to draw into. This specific device is not not backed by a surface |
17 // and is thus unreadable. This is because the backend is completely vectorial. | 17 // and is thus unreadable. This is because the backend is completely vectorial. |
18 // This device is a simple wrapper over a Windows device context (HDC) handle. | 18 // This device is a simple wrapper over a Windows device context (HDC) handle. |
19 class VectorDevice : public PlatformDeviceWin { | 19 class VectorDevice : public PlatformDeviceWin { |
20 public: | 20 public: |
21 // Factory function. The DC is kept as the output context. | 21 // Factory function. The DC is kept as the output context. |
22 static VectorDevice* create(HDC dc, int width, int height); | 22 static VectorDevice* create(HDC dc, int width, int height); |
23 | 23 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 // Previously selected brush before the current drawing. | 107 // Previously selected brush before the current drawing. |
108 HGDIOBJ previous_brush_; | 108 HGDIOBJ previous_brush_; |
109 | 109 |
110 // Previously selected pen before the current drawing. | 110 // Previously selected pen before the current drawing. |
111 HGDIOBJ previous_pen_; | 111 HGDIOBJ previous_pen_; |
112 | 112 |
113 DISALLOW_COPY_AND_ASSIGN(VectorDevice); | 113 DISALLOW_COPY_AND_ASSIGN(VectorDevice); |
114 }; | 114 }; |
115 | 115 |
116 } // namespace gfx | 116 } // namespace skia |
117 | 117 |
118 #endif // VectorDevice_h | 118 #endif // VectorDevice_h |
119 | 119 |
OLD | NEW |