Skip to content

Conversation

@nedtwigg
Copy link

@HeikoKlare
Copy link
Contributor

I added my comment on why this will not work to the preceeding discussion: #1711 (comment)

public Rectangle translateFromDisplayCoordinates(Rectangle rect, int zoom) {
Monitor monitor = rect instanceof MonitorAwareRectangle monitorAwareRect ? monitorAwareRect.getMonitor() : null;
return translateRectangleInPixelsToPoints(rect.x, rect.y, rect.width, rect.height, monitor);
Monitor monitor = null;
Copy link
Member

Choose a reason for hiding this comment

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

Here's where you loose the information about the monitor that the MonitorAwareRectangle had, which breaks the whole thing. Same for translateToDisplayCoordinates(Point, int)

@nedtwigg
Copy link
Author

@nedtwigg nedtwigg closed this Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants