• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "tools/viewer/Slide.h"
12 
13 class SkSVGDOM;
14 
15 class SvgSlide final : public Slide {
16 public:
17     SvgSlide(const SkString& name, const SkString& path);
18 
19     void load(SkScalar winWidth, SkScalar winHeight) override;
20     void unload() override;
21 
22     SkISize getDimensions() const override;
23 
24     void draw(SkCanvas*) override;
25 private:
26     const SkString  fPath;
27 
28     SkSize          fWinSize = SkSize::MakeEmpty();
29     sk_sp<SkSVGDOM> fDom;
30 
31     typedef Slide INHERITED;
32 };
33 
34 #endif // SvgSlide_DEFINED
35