Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransformedBounds is never set with composition renderer #9308

Closed
amwx opened this issue Oct 31, 2022 · 3 comments
Closed

TransformedBounds is never set with composition renderer #9308

amwx opened this issue Oct 31, 2022 · 3 comments
Labels
area-composition bug by-design The behavior reported in the issue is actually correct.

Comments

@amwx
Copy link
Contributor

amwx commented Oct 31, 2022

Describe the bug
image

Also affects HitTestCustom if visual doesn't implement ICustomSimpleHitTest since the fallback is to test the point in the TransformedBounds

public static bool HitTestCustom(this IVisual visual, Point point)
=> (visual as ICustomSimpleHitTest)?.HitTest(point) ?? visual.TransformedBounds?.Contains(point) == true;

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows, Mac, Linux (State distribution)]
  • Version [e.g. 0.10.0-rc1 or 0.9.12]

Additional context
Add any other context about the problem here.

@amwx amwx added the bug label Oct 31, 2022
@maxkatz6
Copy link
Member

I believe it's by design and TransformedBounds was planned to be removed and alternative solutions provided.
CC @kekekeks

@maxkatz6 maxkatz6 added by-design The behavior reported in the issue is actually correct. area-composition and removed by-design The behavior reported in the issue is actually correct. labels Oct 31, 2022
@kekekeks
Copy link
Member

We can add GetTransformedBounds method which would read the most-recent value. We can't have a property with change notification.

@amwx
Copy link
Contributor Author

amwx commented Oct 31, 2022

BTW this is fine - I was only using indirectly from .HitTestCustom() which I've removed now anyway.

Was this in the change log with the new renderer? If so, that's my bad. If not I'd add it. This threw me for a loop briefly after moving to 11.0 and This comment indicates other libraries use this property

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-composition bug by-design The behavior reported in the issue is actually correct.
Projects
None yet
Development

No branches or pull requests

3 participants