Flutter Engine
The Flutter Engine
Classes | Namespaces | Functions | Variables
SkDrawShadowInfo.h File Reference
#include "include/core/SkColor.h"
#include "include/core/SkPoint.h"
#include "include/core/SkPoint3.h"
#include "include/core/SkScalar.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkFloatingPoint.h"
#include "include/private/base/SkTPin.h"
#include <algorithm>
#include <cstdint>

Go to the source code of this file.

Classes

struct  SkDrawShadowRec
 

Namespaces

namespace  SkDrawShadowMetrics
 

Functions

static float SkDrawShadowMetrics::divide_and_pin (float numer, float denom, float min, float max)
 
SkScalar SkDrawShadowMetrics::AmbientBlurRadius (SkScalar height)
 
SkScalar SkDrawShadowMetrics::AmbientRecipAlpha (SkScalar height)
 
SkScalar SkDrawShadowMetrics::SpotBlurRadius (SkScalar occluderZ, SkScalar lightZ, SkScalar lightRadius)
 
void SkDrawShadowMetrics::GetSpotParams (SkScalar occluderZ, SkScalar lightX, SkScalar lightY, SkScalar lightZ, SkScalar lightRadius, SkScalar *blurRadius, SkScalar *scale, SkVector *translate)
 
void SkDrawShadowMetrics::GetDirectionalParams (SkScalar occluderZ, SkScalar lightX, SkScalar lightY, SkScalar lightZ, SkScalar lightRadius, SkScalar *blurRadius, SkScalar *scale, SkVector *translate)
 
bool SkDrawShadowMetrics::GetSpotShadowTransform (const SkPoint3 &lightPos, SkScalar lightRadius, const SkMatrix &ctm, const SkPoint3 &zPlaneParams, const SkRect &pathBounds, bool directional, SkMatrix *shadowTransform, SkScalar *radius)
 
void SkDrawShadowMetrics::GetLocalBounds (const SkPath &path, const SkDrawShadowRec &rec, const SkMatrix &ctm, SkRect *bounds)
 

Variables

static constexpr auto SkDrawShadowMetrics::kAmbientHeightFactor = 1.0f / 128.0f
 
static constexpr auto SkDrawShadowMetrics::kAmbientGeomFactor = 64.0f
 
static constexpr auto SkDrawShadowMetrics::kMaxAmbientRadius = 300*kAmbientHeightFactor*kAmbientGeomFactor