180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru/*
380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Copyright 2006 The Android Open Source Project
480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Use of this source code is governed by a BSD-style license that can be
680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * found in the LICENSE file.
780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru */
880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#ifndef SkDisplayRandom_DEFINED
1180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#define SkDisplayRandom_DEFINED
1280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#include "SkDisplayable.h"
1480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#include "SkMemberInfo.h"
1580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#include "SkRandom.h"
1680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#ifdef min
1880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#undef min
1980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
2080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
2180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#ifdef max
2280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#undef max
2380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
2480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
2580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queruclass SkDisplayRandom : public SkDisplayable {
2680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    DECLARE_DISPLAY_MEMBER_INFO(Random);
2780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SkDisplayRandom();
2880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#ifdef SK_DUMP_ENABLED
2980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    virtual void dump(SkAnimateMaker* );
3080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
3180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    virtual bool getProperty(int index, SkScriptValue* value) const;
3280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    virtual bool setProperty(int index, SkScriptValue& );
3380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queruprivate:
3480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SkScalar blend;
3580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SkScalar min;
3680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    SkScalar max;
3780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    mutable SkRandom fRandom;
3880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru};
3980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
4080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif // SkDisplayRandom_DEFINED
41