8#ifndef SkDrawShadowInfo_DEFINED
9#define SkDrawShadowInfo_DEFINED
60 return lightRadius*
divide_and_pin(occluderZ, lightZ - occluderZ, 0.0f, 0.95f);
67 *blurRadius = lightRadius*zRatio;
75 *blurRadius = lightRadius*occluderZ;
88 const SkRect& pathBounds,
bool directional,
static constexpr float sk_ieee_float_divide(float numer, float denom)
#define SK_ScalarNearlyZero
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
static float max(float r, float g, float b)
static float min(float r, float g, float b)
bool GetSpotShadowTransform(const SkPoint3 &lightPos, SkScalar lightRadius, const SkMatrix &ctm, const SkPoint3 &zPlaneParams, const SkRect &pathBounds, bool directional, SkMatrix *shadowTransform, SkScalar *radius)
static constexpr auto kMaxAmbientRadius
static float divide_and_pin(float numer, float denom, float min, float max)
static constexpr auto kAmbientHeightFactor
void GetLocalBounds(const SkPath &path, const SkDrawShadowRec &rec, const SkMatrix &ctm, SkRect *bounds)
SkScalar AmbientRecipAlpha(SkScalar height)
static constexpr auto kAmbientGeomFactor
void GetDirectionalParams(SkScalar occluderZ, SkScalar lightX, SkScalar lightY, SkScalar lightZ, SkScalar lightRadius, SkScalar *blurRadius, SkScalar *scale, SkVector *translate)
SkScalar AmbientBlurRadius(SkScalar height)
void GetSpotParams(SkScalar occluderZ, SkScalar lightX, SkScalar lightY, SkScalar lightZ, SkScalar lightRadius, SkScalar *blurRadius, SkScalar *scale, SkVector *translate)
SkScalar SpotBlurRadius(SkScalar occluderZ, SkScalar lightZ, SkScalar lightRadius)
Optional< SkRect > bounds
static constexpr SkPoint Make(float x, float y)