Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
tools
viewer
ImageSlide.h
Go to the documentation of this file.
1
/*
2
* Copyright 2016 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 ImageSlide_DEFINED
9
#define ImageSlide_DEFINED
10
11
#include "
include/core/SkImage.h
"
12
#include "
include/core/SkRefCnt.h
"
13
#include "
include/core/SkScalar.h
"
14
#include "
include/core/SkSize.h
"
15
#include "
include/core/SkString.h
"
16
#include "
tools/viewer/Slide.h
"
17
18
class
SkCanvas
;
19
20
class
ImageSlide
:
public
Slide
{
21
public
:
22
ImageSlide
(
const
SkString
&
name
,
const
SkString
& path);
23
ImageSlide
(
const
SkString
&
name
,
sk_sp<SkImage>
image
);
24
25
SkISize
getDimensions
()
const override
;
26
27
void
draw
(
SkCanvas
* canvas)
override
;
28
void
load
(
SkScalar
winWidth,
SkScalar
winHeight)
override
;
29
void
unload
()
override
;
30
31
private
:
32
SkString
fPath;
33
sk_sp<SkImage>
fImage;
34
bool
fRetainImage =
false
;
35
};
36
37
#endif
SkImage.h
SkRefCnt.h
SkScalar.h
SkSize.h
SkString.h
Slide.h
ImageSlide
Definition
ImageSlide.h:20
ImageSlide::getDimensions
SkISize getDimensions() const override
Definition
ImageSlide.cpp:26
ImageSlide::unload
void unload() override
Definition
ImageSlide.cpp:44
ImageSlide::load
void load(SkScalar winWidth, SkScalar winHeight) override
Definition
ImageSlide.cpp:35
ImageSlide::draw
void draw(SkCanvas *canvas) override
Definition
ImageSlide.cpp:30
SkCanvas
Definition
SkCanvas.h:106
SkString
Definition
SkString.h:118
Slide
Definition
Slide.h:29
sk_sp
Definition
SkRefCnt.h:220
image
sk_sp< SkImage > image
Definition
examples.cpp:29
SkScalar
float SkScalar
Definition
extension.cpp:12
name
const char * name
Definition
fuchsia.cc:50
SkISize
Definition
SkSize.h:16
Generated on Fri Apr 26 2024 06:18:14 for Flutter Engine by
1.9.8