31class DirectionalBlurAdapter final :
public DiscardableAdapterBase<DirectionalBlurAdapter,
32 sksg::ExternalImageFilter> {
35 const AnimationBuilder& abuilder)
40 kBlurLength_Index = 1,
44 EffectBinder(jprops, abuilder,
this)
45 .bind( kDirection_Index, fDirection)
46 .bind( kBlurLength_Index, fBlurLength);
49 void onSync()
override {
50 const auto rot = fDirection - 90;
57 this->node()->setImageFilter(std::move(filter));
63 using INHERITED = DiscardableAdapterBase<DirectionalBlurAdapter, sksg::ExternalImageFilter>;
#define INHERITED(method,...)
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > MatrixTransform(const SkMatrix &matrix, const SkSamplingOptions &sampling, sk_sp< SkImageFilter > input)
static SkMatrix RotateDeg(SkScalar deg)
void attachDiscardableAdapter(sk_sp< T > adapter) const
static sk_sp< RenderNode > Make(sk_sp< RenderNode > child, sk_sp< ImageFilter > filter)
SK_API sk_sp< SkDocument > Make(SkWStream *dst, const SkSerialProcs *=nullptr, std::function< void(const SkPicture *)> onEndPage=nullptr)
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr float kBlurSizeToSigma