Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
581 B
Raw Blame
/*
 * This file is part of Krita
 *
 * SPDX-FileCopyrightText: 2020 L. E. Segovia <[email protected]>
 *
 *  SPDX-License-Identifier: GPL-2.0-or-later
 */

#include "SeExprVariable.h"

SeExprVariable::SeExprVariable()
    : KSeExpr::ExprVarRef(KSeExpr::ExprType().FP(1).Varying())
    , m_value(0)
{
}

SeExprVariable::SeExprVariable(const double v)
    : KSeExpr::ExprVarRef(KSeExpr::ExprType().FP(1).Varying())
    , m_value(v)
{
}

void SeExprVariable::eval(double *result)
{
    result[0] = m_value;
}

void SeExprVariable::eval(const char **)
{
    Q_ASSERT(!"Sanity check");
}