Florin Malita | 4aa4441 | 2017-12-19 12:21:02 -0500 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2017 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #include "SkSGRect.h" |
| 9 | |
| 10 | #include "SkCanvas.h" |
| 11 | #include "SkPaint.h" |
| 12 | |
| 13 | namespace sksg { |
| 14 | |
| 15 | Rect::Rect(const SkRect& rect) : fRect(rect) {} |
| 16 | |
| 17 | void Rect::onDraw(SkCanvas* canvas, const SkPaint& paint) const { |
| 18 | canvas->drawRect(fRect, paint); |
| 19 | } |
| 20 | |
| 21 | SkRect Rect::onComputeBounds() const { |
| 22 | return fRect; |
| 23 | } |
| 24 | |
| 25 | } // namespace sksg |