180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru/*
380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Copyright 2011 Google Inc.
480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru *
580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * Use of this source code is governed by a BSD-style license that can be
680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru * found in the LICENSE file.
780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru */
880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#ifndef SkCubicInterval_DEFINED
980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#define SkCubicInterval_DEFINED
1080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#include "SkPoint.h"
1280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1380bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste QueruSkScalar SkEvalCubicInterval(SkScalar x1, SkScalar y1,
1480bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru                             SkScalar x2, SkScalar y2,
1580bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru                             SkScalar unitX);
1680bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
1780bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Querustatic inline SkScalar SkEvalCubicInterval(const SkPoint pts[2], SkScalar x) {
1880bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru    return SkEvalCubicInterval(pts[0].fX, pts[0].fY,
1980bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru                               pts[1].fX, pts[1].fY, x);
2080bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru}
2180bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru
2280bacfeb4bda06541e8695bd502229727bccfeaJean-Baptiste Queru#endif
23