aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/svg/SkSVGCanvas.cpp
blob: d3511c031f1a0c820dc8daace103f9aa3f8b8df8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
 * Copyright 2015 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "SkSVGCanvas.h"
#include "SkSVGDevice.h"

SkCanvas* SkSVGCanvas::Create(const SkRect& bounds, SkXMLWriter* writer) {
    // TODO: pass full bounds to the device
    SkISize size = bounds.roundOut().size();
    sk_sp<SkBaseDevice> device(SkSVGDevice::Create(size, writer));

    return new SkCanvas(device.get());
}