Debian Codegraph @

tools/viewer/SvgSlide.h

raw
1 /*
2 * Copyright 2018 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 #ifndef SvgSlide_DEFINED
9 #define SvgSlide_DEFINED
10
11 #include "include/core/SkRefCnt.h"
12 #include "include/core/SkScalar.h"
13 #include "include/core/SkString.h"
14 #include "tools/viewer/Slide.h"
15
16 class SkCanvas;
17 class SkSVGDOM;
18
19 class SvgSlide final : public Slide {
20 public:
21 SvgSlide(const SkString& name, const SkString& path);
22 ~SvgSlide() override;
23
24 void load(SkScalar winWidth, SkScalar winHeight) override;
25 void unload() override;
26 void resize(SkScalar, SkScalar) override;
27
28 void draw(SkCanvas*) override;
29 private:
30 const SkString fPath;
31
32 sk_sp<SkSVGDOM> fDom;
33 };
34
35 #endif // SvgSlide_DEFINED