33class DropShadowAdapter final :
public AnimatablePropertyContainer {
37 const AnimationBuilder& abuilder) {
39 kShadowColor_Index = 0,
44 kShadowOnly_Index = 5,
49 EffectBinder(jprops, abuilder, adapter.get())
50 .bind(kShadowColor_Index, adapter->fColor )
51 .bind( kOpacity_Index, adapter->fOpacity )
52 .bind( kDirection_Index, adapter->fDirection)
53 .bind( kDistance_Index, adapter->fDistance )
54 .bind( kSoftness_Index, adapter->fSoftness )
55 .bind( kShadowOnly_Index, adapter->fShdwOnly );
64 : fDropShadow(
sksg::DropShadowImageFilter::
Make())
65 , fImageFilterEffect(
sksg::ImageFilterEffect::
Make(
std::move(layer), fDropShadow)) {}
67 void onSync()
override {
80 fDropShadow->setMode(
SkToBool(fShdwOnly)
88 ColorValue fColor = { 0, 0, 0, 1 };
static constexpr SkColor SkColorSetA(SkColor c, U8CPU a)
#define SkDegreesToRadians(degrees)
#define SkScalarSin(radians)
#define SkScalarRoundToInt(x)
#define SkScalarCos(radians)
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
static constexpr bool SkToBool(const T &x)
void attachDiscardableAdapter(sk_sp< T > adapter) const
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
static constexpr float kBlurSizeToSigma
static constexpr SkPoint Make(float x, float y)