30class TritoneAdapter final :
public AnimatablePropertyContainer {
34 const AnimationBuilder& abuilder) {
38 const auto& node()
const {
return fCF; }
43 const AnimationBuilder& abuilder)
47 , fCF(
sksg::GradientColorFilter::
Make(
std::move(layer),
48 { fLoColorNode, fMiColorNode, fHiColorNode })) {
53 kBlendAmount_Index = 3,
56 EffectBinder(jprops, abuilder,
this)
57 .bind( kHiColor_Index, fHiColor)
58 .bind( kMiColor_Index, fMiColor)
59 .bind( kLoColor_Index, fLoColor)
60 .bind(kBlendAmount_Index, fWeight );
63 void onSync()
override {
64 fLoColorNode->setColor(fLoColor);
65 fMiColorNode->setColor(fMiColor);
66 fHiColorNode->setColor(fHiColor);
69 fCF->setWeight((100 - fWeight) / 100);
constexpr SkColor SK_ColorBLACK
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)
SK_API sk_sp< SkShader > Color(SkColor)