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

[Feature]: Additional options for displaying grid lines #3840

Open
bubblobill opened this issue Feb 17, 2023 · 5 comments · May be fixed by #4105
Open

[Feature]: Additional options for displaying grid lines #3840

bubblobill opened this issue Feb 17, 2023 · 5 comments · May be fixed by #4105
Labels
feature Adding functionality that adds value

Comments

@bubblobill
Copy link
Collaborator

Feature Request

The current implementation for displaying grid lines is (at best) naff.
Zooming out can eventually leave you with more grid lines on screen than map
image

Equally frustrating can be finding a single colour that doesn't disappear on sections of a map
image

The minimum grid line width can be too wide, and when you increase the grid line width the ugly gets multiplied.

The Solution you'd like

I want to see additional grid rendering options.
These examples are built by varying the rendering stroke, the colour opacity, and the number of times the grid is drawn.
Implementing different blend modes like burn, dodge, darken, difference, exclusion, hard_light, lighten, multiply, overlay, screen, soft_light, etc. would be additional awesome but that seems a bit harder without JavaFX.

High contrast semi-transparent skinnier grid lines are nicer
Width = 1
image
Width = 5
image

Dashed gridlines are more subtle
image

As are dotted grid lines
image

Just marking grid intersections is my favourite
image

Alternatives that you've considered.

No response

Additional Context

No response

@bubblobill bubblobill added the feature Adding functionality that adds value label Feb 17, 2023
@Phergus
Copy link
Contributor

Phergus commented Feb 17, 2023

Any changes will have to support all 3 grid types (square, hex, iso) and will need to be checked for performance issues.

Also MT stops rendering grids at 10% zoom I believe.

@bubblobill
Copy link
Collaborator Author

Any changes will have to support all 3 grid types (square, hex, iso) and will need to be checked for performance issues.
I plan on getting it working well before I measure performance (doubt it will be much of an impact).

Also MT stops rendering grids at 10% zoom I believe.
Correct

@FullBleed
Copy link

They look like nice options. Will be interested in seeing if there is a performance impact. The slight increase in image scaling quality that Craig added had significantly more impact than expected.

I want to see additional grid rendering options. These examples are built by varying the rendering stroke, the colour opacity, and the number of times the grid is drawn. Implementing different blend modes like burn, dodge, darken, difference, exclusion, hard_light, lighten, multiply, overlay, screen, soft_light, etc. would be additional awesome but that seems a bit harder without JavaFX.

It seems like we're not going to get any good blending methods until we get libGDX.

@goblin-3
Copy link

hi i would like to try and add the additional dash and intersection grid type.(partially for a school project). any tips for where to start?

@bubblobill
Copy link
Collaborator Author

hi i would like to try and add the additional dash and intersection grid type.(partially for a school project). any tips for where to start?
For each grid type you need to change the rendered shape to be something that uses BasicStroke, basically a Path. Then you need to set the dash array so the dashes line up nicely. I doubt this will make any sense to you but this is what I was playing with.
https://github.com/bubblobill/maptool/blob/playGrid/src/main/java/net/rptools/maptool/client/ui/zone/GridRenderer.java

@cwisniew cwisniew linked a pull request Jun 8, 2023 that will close this issue
bubblobill added a commit to bubblobill/maptool that referenced this issue Nov 24, 2023
added multiple gridTypes for SquareGrid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants