29class RectangleGeometryAdapter final :
30 public DiscardableAdapterBase<RectangleGeometryAdapter, sksg::RRect> {
33 const AnimationBuilder* abuilder) {
36 this->node()->setInitialPointIndex(2);
38 this->bind(*abuilder, jrect[
"s"], fSize );
39 this->bind(*abuilder, jrect[
"p"], fPosition );
40 this->bind(*abuilder, jrect[
"r"], fRoundness);
44 void onSync()
override {
46 fPosition.y - fSize.y / 2,
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
void attachDiscardableAdapter(sk_sp< T > adapter) const
static sk_sp< sksg::GeometryNode > AttachRRectGeometry(const skjson::ObjectValue &, const AnimationBuilder *)
Optional< SkRect > bounds
T ParseDefault(const skjson::Value &v, const T &defaultValue)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)