| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #include "SkPath.h" | 8 #include "SkPath.h" |
| 9 #include "SkRect.h" | 9 #include "SkRect.h" |
| 10 #include "SkRemote.h" | 10 #include "SkRemote.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 path.addOval(oval); | 200 path.addOval(oval); |
| 201 this->onDrawPath(path, paint); | 201 this->onDrawPath(path, paint); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void Client::onDrawRect(const SkRect& rect, const SkPaint& paint) { | 204 void Client::onDrawRect(const SkRect& rect, const SkPaint& paint) { |
| 205 SkPath path; | 205 SkPath path; |
| 206 path.addRect(rect); | 206 path.addRect(rect); |
| 207 this->onDrawPath(path, paint); | 207 this->onDrawPath(path, paint); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void Client::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { |
| 211 SkPath path; |
| 212 path.addRRect(rrect); |
| 213 this->onDrawPath(path, paint); |
| 214 } |
| 215 |
| 210 void Client::onDrawDRRect(const SkRRect& outside, | 216 void Client::onDrawDRRect(const SkRRect& outside, |
| 211 const SkRRect& inside, | 217 const SkRRect& inside, |
| 212 const SkPaint& paint) { | 218 const SkPaint& paint) { |
| 213 SkPath path; | 219 SkPath path; |
| 214 path.addRRect(outside); | 220 path.addRRect(outside); |
| 215 path.addRRect(inside, SkPath::kCCW_Direction); | 221 path.addRRect(inside, SkPath::kCCW_Direction); |
| 216 this->onDrawPath(path, paint); | 222 this->onDrawPath(path, paint); |
| 217 } | 223 } |
| 218 | 224 |
| 219 void Client::onDrawPath(const SkPath& path, const SkPaint& paint) { | 225 void Client::onDrawPath(const SkPath& path, const SkPaint& paint) { |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } | 292 } |
| 287 void Server::strokePath(ID path, ID misc, ID stroke) { | 293 void Server::strokePath(ID path, ID misc, ID stroke) { |
| 288 SkPaint paint; | 294 SkPaint paint; |
| 289 paint.setStyle(SkPaint::kStroke_Style); | 295 paint.setStyle(SkPaint::kStroke_Style); |
| 290 fMisc .find(misc ).applyTo(&paint); | 296 fMisc .find(misc ).applyTo(&paint); |
| 291 fStroke.find(stroke).applyTo(&paint); | 297 fStroke.find(stroke).applyTo(&paint); |
| 292 fCanvas->drawPath(fPath.find(path), paint); | 298 fCanvas->drawPath(fPath.find(path), paint); |
| 293 } | 299 } |
| 294 | 300 |
| 295 } // namespace SkRemote | 301 } // namespace SkRemote |
| OLD | NEW |