#include "ui/gfx/animation/tween.h"
#include <math.h>
#include <stdint.h>
#include <algorithm>
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/numerics/safe_conversions.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "ui/gfx/geometry/cubic_bezier.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/size_f.h"
#include "ui/gfx/geometry/three_point_cubic_bezier.h"
#include "ui/gfx/geometry/transform.h"
#include "ui/gfx/geometry/transform_operations.h"
#if BUILDFLAG(IS_WIN)
#include <float.h>
#endif
namespace gfx {
double Tween::CalculateValue(Tween::Type type, double state) { … }
namespace {
uint8_t FloatToColorByte(float f) { … }
uint8_t BlendColorComponents(uint8_t start,
uint8_t target,
float start_alpha,
float target_alpha,
float blended_alpha,
double progress) { … }
float BlendColorComponentsFloat(float start,
float target,
float start_alpha,
float target_alpha,
float blended_alpha,
double progress) { … }
}
SkColor4f Tween::ColorValueBetween(double value,
SkColor4f start,
SkColor4f target) { … }
SkColor Tween::ColorValueBetween(double value, SkColor start, SkColor target) { … }
double Tween::DoubleValueBetween(double value, double start, double target) { … }
float Tween::FloatValueBetween(double value, float start, float target) { … }
float Tween::ClampedFloatValueBetween(const base::TimeTicks& time,
const base::TimeTicks& start_time,
float start,
const base::TimeTicks& target_time,
float target) { … }
int Tween::IntValueBetween(double value, int start, int target) { … }
int Tween::LinearIntValueBetween(double value, int start, int target) { … }
gfx::Rect Tween::RectValueBetween(double value,
const gfx::Rect& start,
const gfx::Rect& target) { … }
gfx::RectF Tween::RectFValueBetween(double value,
const gfx::RectF& start,
const gfx::RectF& target) { … }
gfx::Transform Tween::TransformValueBetween(double value,
const gfx::Transform& start,
const gfx::Transform& target) { … }
gfx::TransformOperations Tween::TransformOperationsValueBetween(
double value,
const gfx::TransformOperations& start,
const gfx::TransformOperations& target) { … }
gfx::Size Tween::SizeValueBetween(double value,
const gfx::Size& start,
const gfx::Size& target) { … }
gfx::SizeF Tween::SizeFValueBetween(double value,
const gfx::SizeF& start,
const gfx::SizeF& target) { … }
}