chromium/ui/gfx/geometry/cubic_bezier.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/354829279): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ui/gfx/geometry/cubic_bezier.h"

#include <algorithm>
#include <cmath>
#include <limits>

#include "base/check_op.h"

namespace gfx {

namespace {

const int kMaxNewtonIterations =;

}  // namespace

static const double kBezierEpsilon =;

double CubicBezier::ToFinite(double value) {}

CubicBezier::CubicBezier(double p1x, double p1y, double p2x, double p2y) {}

CubicBezier::CubicBezier(const CubicBezier& other) = default;

void CubicBezier::InitCoefficients(double p1x,
                                   double p1y,
                                   double p2x,
                                   double p2y) {}

void CubicBezier::InitGradients(double p1x,
                                double p1y,
                                double p2x,
                                double p2y) {}

// This works by taking taking the derivative of the cubic bezier, on the y
// axis. We can then solve for where the derivative is zero to find the min
// and max distance along the line. We the have to solve those in terms of time
// rather than distance on the x-axis
void CubicBezier::InitRange(double p1y, double p2y) {}

void CubicBezier::InitSpline() {}

double CubicBezier::GetDefaultEpsilon() {}

double CubicBezier::SolveCurveX(double x, double epsilon) const {}

double CubicBezier::Solve(double x) const {}

double CubicBezier::SlopeWithEpsilon(double x, double epsilon) const {}

double CubicBezier::Slope(double x) const {}

double CubicBezier::GetX1() const {}

double CubicBezier::GetY1() const {}

double CubicBezier::GetX2() const {}

double CubicBezier::GetY2() const {}

}  // namespace gfx