blob: 05c1fe46b7462e59cafcdada250e0b8651ef4904 [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);
rmistry@google.comd6176b02012-08-23 18:14:13 +000019 virtual void executeFunction(SkDisplayable* , int index,
reed@android.com8a1c16f2008-12-17 15:59:43 +000020 SkTDArray<SkScriptValue>& parameters, SkDisplayTypes type,
tfarinaaa458fb2015-01-05 17:18:51 -080021 SkScriptValue* ) SK_OVERRIDE;
mtklein72c9faa2015-01-09 10:06:39 -080022 const SkFunctionParamType* getFunctionsParameters() SK_OVERRIDE;
23 bool getProperty(int index, SkScriptValue* value) const SK_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