Skip to content

Fix: Clamp clip coordinates in CanvasRasterer.fillOutsideAreas() - #1664

Merged
devemux86 merged 2 commits into
mapsforge:masterfrom
Sublimis:fix-fill-outside
Feb 27, 2025
Merged

devemux86 merged 2 commits into
mapsforge:masterfrom
Sublimis:fix-fill-outside

Conversation

@Sublimis

@Sublimis Sublimis commented Feb 26, 2025 •

Copy link
Copy Markdown
Contributor
  • Fix: Clamp clip coordinates in CanvasRasterer.fillOutsideAreas() to prevent overwhelming the canvas with extreme coordinate values

#1659

…t overwhelming the canvas with extreme coordinate values
@devemux86

Copy link
Copy Markdown
Collaborator

Thanks, however it does not seem to work correctly.

The test was done setting map-background-outside="#ff0000" in the theme.

master Pull request

…t overwhelming the canvas with extreme coordinate values
@Sublimis

Copy link
Copy Markdown
Contributor Author

Take 2.

Now, the most elegant solution to all of this would be to simply clear the MapView with map-background-outside color before drawing, and not delegate that to the renderer, isn't it so? In that scenario, this should only be considered a temporary solution...

@devemux86 devemux86 added this to the 0.24.0 milestone Feb 27, 2025
@devemux86
devemux86 merged commit b358a27 into mapsforge:master Feb 27, 2025
@devemux86

Copy link
Copy Markdown
Collaborator

@Sublimis Thanks, this seems to work much better.

@Sublimis Sublimis changed the title * Fix: Normalize input to CanvasRasterer.fillOutsideAreas() Fix: Clamp clip coordinates in CanvasRasterer.fillOutsideAreas() Feb 27, 2025
@Sublimis

Copy link
Copy Markdown
Contributor Author

the most elegant solution to all of this would be to simply clear the MapView with map-background-outside color before drawing, and not delegate that to the renderer

It works, although it's probably not as general solution as it could be, so what about this?
This seems easily implementable by providing the map-background-outside value to this line:

canvas.fillColor(this.displayModel.getBackgroundColor());

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants