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

Fix: don’t redraw everything in mouseMove #34

Open
Mark2Mark opened this issue Feb 25, 2022 · 3 comments
Open

Fix: don’t redraw everything in mouseMove #34

Mark2Mark opened this issue Feb 25, 2022 · 3 comments

Comments

@Mark2Mark
Copy link

I think it’s not the best idea to redraw everything in mouseMove. Maybe better use setNeedsDisplayInRect: for a smaller portion of interest?

Could this be related to #33 ?

@schriftgestalt
Copy link
Collaborator

The tricky part is to make the text big enough to include everything that was drawn for the last mouse move event. We are working on a solution to separate the outline content from temporary (e.g. mouse over) stuff. That should improve performance quite a bit and will allow more effects/animation.

@Mark2Mark
Copy link
Author

Isn’t the mouseMove in Red Arrows only needed for displaying the annotations when the cursor is near an errorous node? Couldn’t said node just get an invisible circle path in which the cursor-point-distance checking happens only when cursor is inside that circle? That way the distance-alpha can stay, but the redraw only happens when the mouse is over that area.

@schriftgestalt
Copy link
Collaborator

The problem is not finding new annotations to draw but to get rid of the ones that are not needed any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants