blob: b6634b8a1db538df765335b3960f30b2fe5cb3d7 [file] [log] [blame]
fmalita2aafe6f2015-02-06 12:51:10 -08001/*
2 * Copyright 2015 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 "SkSVGCanvas.h"
9#include "SkSVGDevice.h"
10
11SkCanvas* SkSVGCanvas::Create(const SkRect& bounds, SkXMLWriter* writer) {
12 // TODO: pass full bounds to the device
13 SkISize size = bounds.roundOut().size();
14 SkAutoTUnref<SkBaseDevice> device(SkSVGDevice::Create(size, writer));
15
halcanary385fe4d2015-08-26 13:07:48 -070016 return new SkCanvas(device);
fmalita2aafe6f2015-02-06 12:51:10 -080017}