OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkDisplayRandom_DEFINED | 10 #ifndef SkDisplayRandom_DEFINED |
11 #define SkDisplayRandom_DEFINED | 11 #define SkDisplayRandom_DEFINED |
12 | 12 |
13 #include "SkDisplayable.h" | 13 #include "SkDisplayable.h" |
14 #include "SkMemberInfo.h" | 14 #include "SkMemberInfo.h" |
15 #include "SkRandom.h" | 15 #include "SkRandom.h" |
16 | 16 |
17 #ifdef min | 17 #ifdef min |
18 #undef min | 18 #undef min |
19 #endif | 19 #endif |
20 | 20 |
21 #ifdef max | 21 #ifdef max |
22 #undef max | 22 #undef max |
23 #endif | 23 #endif |
24 | 24 |
25 class SkDisplayRandom : public SkDisplayable { | 25 class SkDisplayRandom : public SkDisplayable { |
26 DECLARE_DISPLAY_MEMBER_INFO(Random); | 26 DECLARE_DISPLAY_MEMBER_INFO(Random); |
27 SkDisplayRandom(); | 27 SkDisplayRandom(); |
28 #ifdef SK_DUMP_ENABLED | 28 #ifdef SK_DUMP_ENABLED |
29 void dump(SkAnimateMaker* ) SK_OVERRIDE; | 29 void dump(SkAnimateMaker* ) override; |
30 #endif | 30 #endif |
31 bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; | 31 bool getProperty(int index, SkScriptValue* value) const override; |
32 bool setProperty(int index, SkScriptValue& ) SK_OVERRIDE; | 32 bool setProperty(int index, SkScriptValue& ) override; |
33 private: | 33 private: |
34 SkScalar blend; | 34 SkScalar blend; |
35 SkScalar min; | 35 SkScalar min; |
36 SkScalar max; | 36 SkScalar max; |
37 mutable SkRandom fRandom; | 37 mutable SkRandom fRandom; |
38 }; | 38 }; |
39 | 39 |
40 #endif // SkDisplayRandom_DEFINED | 40 #endif // SkDisplayRandom_DEFINED |
OLD | NEW |