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_PLATFORM_DEVICE_WIN_H_ | 5 #ifndef SKIA_EXT_PLATFORM_DEVICE_WIN_H_ |
6 #define SKIA_EXT_PLATFORM_DEVICE_WIN_H_ | 6 #define SKIA_EXT_PLATFORM_DEVICE_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // source device will be copied. | 45 // source device will be copied. |
46 virtual void DrawToNativeContext(HDC dc, int x, int y, | 46 virtual void DrawToNativeContext(HDC dc, int x, int y, |
47 const RECT* src_rect) = 0; | 47 const RECT* src_rect) = 0; |
48 | 48 |
49 // Sets the opacity of each pixel in the specified region to be opaque. | 49 // Sets the opacity of each pixel in the specified region to be opaque. |
50 virtual void MakeOpaque(int x, int y, int width, int height) { } | 50 virtual void MakeOpaque(int x, int y, int width, int height) { } |
51 | 51 |
52 // Returns if GDI is allowed to render text to this device. | 52 // Returns if GDI is allowed to render text to this device. |
53 virtual bool IsNativeFontRenderingAllowed() { return true; } | 53 virtual bool IsNativeFontRenderingAllowed() { return true; } |
54 | 54 |
| 55 // True if AlphaBlend() was called during a |
| 56 // BeginPlatformPaint()/EndPlatformPaint() pair. |
| 57 // Used by the printing subclasses. See |VectorPlatformDeviceEmf|. |
| 58 virtual bool AlphaBlendUsed() const { return false; } |
| 59 |
55 // Loads a SkPath into the GDI context. The path can there after be used for | 60 // Loads a SkPath into the GDI context. The path can there after be used for |
56 // clipping or as a stroke. Returns false if the path failed to be loaded. | 61 // clipping or as a stroke. Returns false if the path failed to be loaded. |
57 static bool LoadPathToDC(HDC context, const SkPath& path); | 62 static bool LoadPathToDC(HDC context, const SkPath& path); |
58 | 63 |
59 // Loads a SkRegion into the GDI context. | 64 // Loads a SkRegion into the GDI context. |
60 static void LoadClippingRegionToDC(HDC context, const SkRegion& region, | 65 static void LoadClippingRegionToDC(HDC context, const SkRegion& region, |
61 const SkMatrix& transformation); | 66 const SkMatrix& transformation); |
62 | 67 |
63 protected: | 68 protected: |
64 // Arrays must be inside structures. | 69 // Arrays must be inside structures. |
(...skipping 11 matching lines...) Expand all Loading... |
76 static void LoadTransformToDC(HDC dc, const SkMatrix& matrix); | 81 static void LoadTransformToDC(HDC dc, const SkMatrix& matrix); |
77 | 82 |
78 // Transforms SkPath's paths into a series of cubic path. | 83 // Transforms SkPath's paths into a series of cubic path. |
79 static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath); | 84 static bool SkPathToCubicPaths(CubicPaths* paths, const SkPath& skpath); |
80 }; | 85 }; |
81 | 86 |
82 } // namespace skia | 87 } // namespace skia |
83 | 88 |
84 #endif // SKIA_EXT_PLATFORM_DEVICE_WIN_H_ | 89 #endif // SKIA_EXT_PLATFORM_DEVICE_WIN_H_ |
85 | 90 |
OLD | NEW |