blob: 0311a7c1411e496c121392fca8a342264c145288 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
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
reed@android.com8a1c16f2008-12-17 15:59:43 +00009
10#ifndef SkDisplayMath_DEFINED
11#define SkDisplayMath_DEFINED
12
13#include "SkDisplayable.h"
14#include "SkMemberInfo.h"
15#include "SkRandom.h"
16
17class SkDisplayMath : public SkDisplayable {
18 DECLARE_DISPLAY_MEMBER_INFO(Math);
tfarinaf4219dd2015-04-27 17:18:28 -070019 void executeFunction(SkDisplayable* , int index,
reed@android.com8a1c16f2008-12-17 15:59:43 +000020 SkTDArray<SkScriptValue>& parameters, SkDisplayTypes type,
mtklein36352bf2015-03-25 18:17:31 -070021 SkScriptValue* ) override;
22 const SkFunctionParamType* getFunctionsParameters() override;
23 bool getProperty(int index, SkScriptValue* value) const override;
reed@android.com8a1c16f2008-12-17 15:59:43 +000024private:
25 mutable SkRandom fRandom;
26 static const SkScalar gConstants[];
27 static const SkFunctionParamType fFunctionParameters[];
28
29};
rmistry@google.comd6176b02012-08-23 18:14:13 +000030
reed@android.com8a1c16f2008-12-17 15:59:43 +000031#endif // SkDisplayMath_DEFINED