| 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 #ifndef SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ | 5 #ifndef SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ |
| 6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ | 6 #define SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "skia/ext/platform_device.h" | 10 #include "skia/ext/platform_device.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 const SkPaint& paint) override; | 72 const SkPaint& paint) override; |
| 73 virtual void drawDevice(const SkDraw& draw, SkBaseDevice*, int x, int y, | 73 virtual void drawDevice(const SkDraw& draw, SkBaseDevice*, int x, int y, |
| 74 const SkPaint&) override; | 74 const SkPaint&) override; |
| 75 | 75 |
| 76 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, | 76 virtual void setMatrixClip(const SkMatrix& transform, const SkRegion& region, |
| 77 const SkClipStack&) override; | 77 const SkClipStack&) override; |
| 78 | 78 |
| 79 void LoadClipRegion(); | 79 void LoadClipRegion(); |
| 80 | 80 |
| 81 protected: | 81 protected: |
| 82 virtual SkBaseDevice* onCreateDevice(const SkImageInfo& info, | 82 virtual SkBaseDevice* onCreateCompatibleDevice(const CreateInfo& info) overrid
e; |
| 83 Usage usage) override; | |
| 84 | 83 |
| 85 private: | 84 private: |
| 86 // Applies the SkPaint's painting properties in the current GDI context, if | 85 // Applies the SkPaint's painting properties in the current GDI context, if |
| 87 // possible. If GDI can't support all paint's properties, returns false. It | 86 // possible. If GDI can't support all paint's properties, returns false. It |
| 88 // doesn't execute the "commands" in SkPaint. | 87 // doesn't execute the "commands" in SkPaint. |
| 89 bool ApplyPaint(const SkPaint& paint); | 88 bool ApplyPaint(const SkPaint& paint); |
| 90 | 89 |
| 91 // Selects a new object in the device context. It can be a pen, a brush, a | 90 // Selects a new object in the device context. It can be a pen, a brush, a |
| 92 // clipping region, a bitmap or a font. Returns the old selected object. | 91 // clipping region, a bitmap or a font. Returns the old selected object. |
| 93 HGDIOBJ SelectObject(HGDIOBJ object); | 92 HGDIOBJ SelectObject(HGDIOBJ object); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 133 |
| 135 typedef void (*SkiaEnsureTypefaceCharactersAccessible) | 134 typedef void (*SkiaEnsureTypefaceCharactersAccessible) |
| 136 (const LOGFONT& font, const wchar_t* text, unsigned int text_length); | 135 (const LOGFONT& font, const wchar_t* text, unsigned int text_length); |
| 137 | 136 |
| 138 SK_API void SetSkiaEnsureTypefaceCharactersAccessible( | 137 SK_API void SetSkiaEnsureTypefaceCharactersAccessible( |
| 139 SkiaEnsureTypefaceCharactersAccessible func); | 138 SkiaEnsureTypefaceCharactersAccessible func); |
| 140 | 139 |
| 141 } // namespace skia | 140 } // namespace skia |
| 142 | 141 |
| 143 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ | 142 #endif // SKIA_EXT_VECTOR_PLATFORM_DEVICE_EMF_WIN_H_ |
| OLD | NEW |