• 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     void resize(SkScalar, SkScalar) override;
22 
23     SkISize getDimensions() const override;
24 
25     void draw(SkCanvas*) override;
26 private:
27     const SkString  fPath;
28 
29     SkSize          fWinSize = SkSize::MakeEmpty();
30     sk_sp<SkSVGDOM> fDom;
31 
32     using INHERITED = Slide;
33 };
34 
35 #endif // SvgSlide_DEFINED
36