Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Side by Side Diff: include/views/animated/SkImageView.h

Issue 1745813002: remove unused view files (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/views/animated/SkBorderView.h ('k') | include/views/animated/SkProgressBarView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1
2 /*
3 * Copyright 2006 The Android Open Source Project
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8
9
10 #ifndef SkImageView_DEFINED
11 #define SkImageView_DEFINED
12
13 #include "SkView.h"
14 #include "SkString.h"
15
16 class SkAnimator;
17 class SkBitmap;
18 class SkMatrix;
19
20 class SkImageView : public SkView {
21 public:
22 SkImageView();
23 virtual ~SkImageView();
24
25 void getUri(SkString*) const;
26 void setUri(const char []);
27 void setUri(const SkString&);
28
29
30 enum ScaleType {
31 kMatrix_ScaleType,
32 kFitXY_ScaleType,
33 kFitStart_ScaleType,
34 kFitCenter_ScaleType,
35 kFitEnd_ScaleType
36 };
37 ScaleType getScaleType() const { return (ScaleType)fScaleType; }
38 void setScaleType(ScaleType);
39
40 bool getImageMatrix(SkMatrix*) const;
41 void setImageMatrix(const SkMatrix*);
42
43 protected:
44 // overrides
45 virtual bool onEvent(const SkEvent&);
46 virtual void onDraw(SkCanvas*);
47 virtual void onInflate(const SkDOM&, const SkDOMNode*);
48
49 private:
50 SkString fUri;
51 SkMatrix* fMatrix; // null or copy of caller's matrix ,,,,,
52 union {
53 SkAnimator* fAnim;
54 SkBitmap* fBitmap;
55 } fData;
56 uint8_t fScaleType;
57 SkBool8 fDataIsAnim; // as opposed to bitmap
58 SkBool8 fUriIsValid;
59
60 void onUriChange();
61 bool getDataBounds(SkRect* bounds);
62 bool freeData();
63 bool ensureUriIsLoaded();
64
65 typedef SkView INHERITED;
66 };
67
68 #endif
OLDNEW
« no previous file with comments | « include/views/animated/SkBorderView.h ('k') | include/views/animated/SkProgressBarView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698