1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/animator/SkDisplayRandom.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,40 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2006 The Android Open Source Project 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 + 1.12 + 1.13 +#ifndef SkDisplayRandom_DEFINED 1.14 +#define SkDisplayRandom_DEFINED 1.15 + 1.16 +#include "SkDisplayable.h" 1.17 +#include "SkMemberInfo.h" 1.18 +#include "SkRandom.h" 1.19 + 1.20 +#ifdef min 1.21 +#undef min 1.22 +#endif 1.23 + 1.24 +#ifdef max 1.25 +#undef max 1.26 +#endif 1.27 + 1.28 +class SkDisplayRandom : public SkDisplayable { 1.29 + DECLARE_DISPLAY_MEMBER_INFO(Random); 1.30 + SkDisplayRandom(); 1.31 +#ifdef SK_DUMP_ENABLED 1.32 + virtual void dump(SkAnimateMaker* ); 1.33 +#endif 1.34 + virtual bool getProperty(int index, SkScriptValue* value) const; 1.35 + virtual bool setProperty(int index, SkScriptValue& ); 1.36 +private: 1.37 + SkScalar blend; 1.38 + SkScalar min; 1.39 + SkScalar max; 1.40 + mutable SkRandom fRandom; 1.41 +}; 1.42 + 1.43 +#endif // SkDisplayRandom_DEFINED