OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef UNICODE | 8 #ifndef UNICODE |
9 #define UNICODE | 9 #define UNICODE |
10 #endif | 10 #endif |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 | 1196 |
1197 this->internalDrawRect(d, r, false, *fillPaint); | 1197 this->internalDrawRect(d, r, false, *fillPaint); |
1198 } | 1198 } |
1199 | 1199 |
1200 void SkXPSDevice::drawRect(const SkDraw& d, | 1200 void SkXPSDevice::drawRect(const SkDraw& d, |
1201 const SkRect& r, | 1201 const SkRect& r, |
1202 const SkPaint& paint) { | 1202 const SkPaint& paint) { |
1203 this->internalDrawRect(d, r, true, paint); | 1203 this->internalDrawRect(d, r, true, paint); |
1204 } | 1204 } |
1205 | 1205 |
| 1206 void SkXPSDevice::drawRRect(const SkDraw& d, |
| 1207 const SkRRect& rr, |
| 1208 const SkPaint& paint) { |
| 1209 SkPath path; |
| 1210 path.addRRect(rr); |
| 1211 this->drawPath(d, path, paint, NULL, true); |
| 1212 } |
| 1213 |
1206 void SkXPSDevice::internalDrawRect(const SkDraw& d, | 1214 void SkXPSDevice::internalDrawRect(const SkDraw& d, |
1207 const SkRect& r, | 1215 const SkRect& r, |
1208 bool transformRect, | 1216 bool transformRect, |
1209 const SkPaint& paint) { | 1217 const SkPaint& paint) { |
1210 //Exit early if there is nothing to draw. | 1218 //Exit early if there is nothing to draw. |
1211 if (d.fClip->isEmpty() || | 1219 if (d.fClip->isEmpty() || |
1212 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) { | 1220 (paint.getAlpha() == 0 && paint.getXfermode() == NULL)) { |
1213 return; | 1221 return; |
1214 } | 1222 } |
1215 | 1223 |
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2444 IID_PPV_ARGS(&this->fXpsFactory)), | 2452 IID_PPV_ARGS(&this->fXpsFactory)), |
2445 "Could not create factory for layer."); | 2453 "Could not create factory for layer."); |
2446 | 2454 |
2447 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), | 2455 HRVM(this->fXpsFactory->CreateCanvas(&this->fCurrentXpsCanvas), |
2448 "Could not create canvas for layer."); | 2456 "Could not create canvas for layer."); |
2449 } | 2457 } |
2450 | 2458 |
2451 bool SkXPSDevice::allowImageFilter(SkImageFilter*) { | 2459 bool SkXPSDevice::allowImageFilter(SkImageFilter*) { |
2452 return false; | 2460 return false; |
2453 } | 2461 } |
OLD | NEW |