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 m = ls.lookup(Misc::CreateFrom(paint)); | 200 m = ls.lookup(Misc::CreateFrom(paint)); |
201 | 201 |
202 if (paint.getStyle() == SkPaint::kFill_Style) { | 202 if (paint.getStyle() == SkPaint::kFill_Style) { |
203 fEncoder->fillPath(p, m); | 203 fEncoder->fillPath(p, m); |
204 } else { | 204 } else { |
205 // TODO: handle kStrokeAndFill_Style | 205 // TODO: handle kStrokeAndFill_Style |
206 fEncoder->strokePath(p, m, ls.lookup(Stroke::CreateFrom(paint))); | 206 fEncoder->strokePath(p, m, ls.lookup(Stroke::CreateFrom(paint))); |
207 } | 207 } |
208 } | 208 } |
209 | 209 |
210 void Client::onDrawPaint(const SkPaint& paint) { | |
211 this->onDrawRect(SkRect::MakeLargest(), paint); | |
reed1
2015/10/19 13:28:56
temporary I presume?
this is not a completely saf
| |
212 } | |
213 | |
210 void Client::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { | 214 void Client::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle) { |
211 SkPath path; | 215 SkPath path; |
212 path.addRect(rect); | 216 path.addRect(rect); |
213 this->onClipPath(path, op, edgeStyle); | 217 this->onClipPath(path, op, edgeStyle); |
214 } | 218 } |
215 | 219 |
216 void Client::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { | 220 void Client::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { |
217 SkPath path; | 221 SkPath path; |
218 path.addRRect(rrect); | 222 path.addRRect(rrect); |
219 this->onClipPath(path, op, edgeStyle); | 223 this->onClipPath(path, op, edgeStyle); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
260 } | 264 } |
261 void Server::strokePath(ID path, ID misc, ID stroke) { | 265 void Server::strokePath(ID path, ID misc, ID stroke) { |
262 SkPaint paint; | 266 SkPaint paint; |
263 paint.setStyle(SkPaint::kStroke_Style); | 267 paint.setStyle(SkPaint::kStroke_Style); |
264 fMisc .find(misc ).applyTo(&paint); | 268 fMisc .find(misc ).applyTo(&paint); |
265 fStroke.find(stroke).applyTo(&paint); | 269 fStroke.find(stroke).applyTo(&paint); |
266 fCanvas->drawPath(fPath.find(path), paint); | 270 fCanvas->drawPath(fPath.find(path), paint); |
267 } | 271 } |
268 | 272 |
269 } // namespace SkRemote | 273 } // namespace SkRemote |
OLD | NEW |