Skip to content

Conversation

@liyuqian
Copy link
Contributor

@liyuqian liyuqian commented Aug 17, 2018

This fixes #20483 by letting InkWell do its own clipping.

PathOp.intersect is not used because we have too many unit tests that rely on clipping (e.g., paints..clipXXX()..drawCircle())

The goldens are updated due to small AA changes of the additional clipPath.

Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of this method is the same for InkSplash and InkRipple (as it was before).

If _borderRadius, _customBorder, _clipCallback, _radius were factored into a common InkSplash and InkRipple mixin, then you could also factor out something like:
void paintInkCircle(Canvas canvas, Matrix4 transform, Paint paint, Offset center)

It doesn't seem essential to do that; just an observation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion! Yes, I also found it ugly to write the almost identical code twice. I guess that I'll leave the cleaning change to the next PR just to make each PR as small as possible. Added to my TODO list.

liyuqian added a commit to flutter/goldens that referenced this pull request Aug 21, 2018
@liyuqian liyuqian merged commit ee8754d into flutter:master Aug 22, 2018
liyuqian added a commit to liyuqian/flutter that referenced this pull request Aug 22, 2018
This reverts commit 8de0e15 and
updates the goldens versoin.

This requires flutter#20751 to
land first.
liyuqian added a commit that referenced this pull request Aug 24, 2018
This reverts commit 8de0e15 and
updates the goldens versoin.

This requires #20751 to
land first.
@liyuqian liyuqian deleted the inkwellclip branch August 27, 2018 23:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FloatingActionButton InkWell is not clipped (rectangle instead of circle)

3 participants