OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "skia/ext/vector_platform_device_emf_win.h" | 5 #include "skia/ext/vector_platform_device_emf_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 if (!Rectangle(dc, SkScalarRound(rect.fLeft), | 204 if (!Rectangle(dc, SkScalarRound(rect.fLeft), |
205 SkScalarRound(rect.fTop), | 205 SkScalarRound(rect.fTop), |
206 SkScalarRound(rect.fRight), | 206 SkScalarRound(rect.fRight), |
207 SkScalarRound(rect.fBottom))) { | 207 SkScalarRound(rect.fBottom))) { |
208 SkASSERT(false); | 208 SkASSERT(false); |
209 } | 209 } |
210 EndPlatformPaint(); | 210 EndPlatformPaint(); |
211 Cleanup(); | 211 Cleanup(); |
212 } | 212 } |
213 | 213 |
| 214 void VectorPlatformDeviceEmf::drawRRect(const SkDraw& draw, const SkRRect& rr, |
| 215 const SkPaint& paint) { |
| 216 SkPath path; |
| 217 path.addRRect(rr); |
| 218 this->drawPath(draw, path, paint, NULL, true); |
| 219 } |
| 220 |
214 void VectorPlatformDeviceEmf::drawPath(const SkDraw& draw, | 221 void VectorPlatformDeviceEmf::drawPath(const SkDraw& draw, |
215 const SkPath& path, | 222 const SkPath& path, |
216 const SkPaint& paint, | 223 const SkPaint& paint, |
217 const SkMatrix* prePathMatrix, | 224 const SkMatrix* prePathMatrix, |
218 bool pathIsMutable) { | 225 bool pathIsMutable) { |
219 CHECK_FOR_NODRAW_ANNOTATION(paint); | 226 CHECK_FOR_NODRAW_ANNOTATION(paint); |
220 if (paint.getPathEffect()) { | 227 if (paint.getPathEffect()) { |
221 // Apply the path effect forehand. | 228 // Apply the path effect forehand. |
222 SkPath path_modified; | 229 SkPath path_modified; |
223 paint.getFillPath(path, &path_modified); | 230 paint.getFillPath(path, &path_modified); |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 pixels, | 985 pixels, |
979 reinterpret_cast<const BITMAPINFO*>(&hdr), | 986 reinterpret_cast<const BITMAPINFO*>(&hdr), |
980 DIB_RGB_COLORS, | 987 DIB_RGB_COLORS, |
981 SRCCOPY); | 988 SRCCOPY); |
982 } | 989 } |
983 EndPlatformPaint(); | 990 EndPlatformPaint(); |
984 Cleanup(); | 991 Cleanup(); |
985 } | 992 } |
986 | 993 |
987 } // namespace skia | 994 } // namespace skia |
OLD | NEW |