godot/thirdparty/thorvg/src/renderer/tvgFill.cpp

/*
 * Copyright (c) 2020 - 2024 the ThorVG project. All rights reserved.

 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:

 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#include "tvgFill.h"

/************************************************************************/
/* Internal Class Implementation                                        */
/************************************************************************/

Fill* RadialGradient::Impl::duplicate()
{}


Result RadialGradient::Impl::radial(float cx, float cy, float r, float fx, float fy, float fr)
{
    if (r < 0 || fr < 0) return Result::InvalidArguments;

    this->cx = cx;
    this->cy = cy;
    this->r = r;
    this->fx = fx;
    this->fy = fy;
    this->fr = fr;

    return Result::Success;
};


Fill* LinearGradient::Impl::duplicate()
{
    auto ret = LinearGradient::gen();
    if (!ret) return nullptr;

    ret->pImpl->x1 = x1;
    ret->pImpl->y1 = y1;
    ret->pImpl->x2 = x2;
    ret->pImpl->y2 = y2;

    return ret.release();
};


/************************************************************************/
/* External Class Implementation                                        */
/************************************************************************/

Fill::Fill():{}


Fill::~Fill()
{}


Result Fill::colorStops(const ColorStop* colorStops, uint32_t cnt) noexcept
{}


uint32_t Fill::colorStops(const ColorStop** colorStops) const noexcept
{}


Result Fill::spread(FillSpread s) noexcept
{}


FillSpread Fill::spread() const noexcept
{}


Result Fill::transform(const Matrix& m) noexcept
{}


Matrix Fill::transform() const noexcept
{}


Fill* Fill::duplicate() const noexcept
{}


uint32_t Fill::identifier() const noexcept
{}


RadialGradient::RadialGradient():{}


RadialGradient::~RadialGradient()
{}


Result RadialGradient::radial(float cx, float cy, float r) noexcept
{}


Result RadialGradient::radial(float* cx, float* cy, float* r) const noexcept
{}


unique_ptr<RadialGradient> RadialGradient::gen() noexcept
{}


uint32_t RadialGradient::identifier() noexcept
{}


LinearGradient::LinearGradient():{}


LinearGradient::~LinearGradient()
{}


Result LinearGradient::linear(float x1, float y1, float x2, float y2) noexcept
{}


Result LinearGradient::linear(float* x1, float* y1, float* x2, float* y2) const noexcept
{}


unique_ptr<LinearGradient> LinearGradient::gen() noexcept
{}


uint32_t LinearGradient::identifier() noexcept
{}