blob: 69bd94681b47a403c9ae2b93542cecceef935065 [file] [log] [blame]
Florin Malita4aa44412017-12-19 12:21:02 -05001/*
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
13namespace sksg {
14
15Rect::Rect(const SkRect& rect) : fRect(rect) {}
16
17void Rect::onDraw(SkCanvas* canvas, const SkPaint& paint) const {
18 canvas->drawRect(fRect, paint);
19}
20
21SkRect Rect::onComputeBounds() const {
22 return fRect;
23}
24
25} // namespace sksg