Log in

View Full Version : [BUG] Drawing 0.01 width line shows as 0.0 width line.



Carlos
November 14th, 2020, 03:34
Summary: Drawing 0.01 width line shows as 0.0 width line.
Ruleset(s): Dungeons & Dragons (5E)
New Campaign / FGC Migrated Campaign: New campaign for testing.
Extensions/Themes: None.
Modules Loaded: None.
Operating System / Language Setting: Windows 10, English (United States)

Steps to Reproduce:

Latest version: v4.0.1 ULTIMATE (2020-11-11)

Steps to reproduce:

Open a map.
Add a painting layer.
Select line.
Under size type "0.01" and hit enter.
Draw a line.


Expected behaviour:

Width appears as "0.01" (one-hundredth the width of the grid)
Height appears as "0.01"
Line drawn is very thin. Approximately 1/100th the grid width, took a screenshot and counted to confirm (129 pixel wide grid and line is 1 pixel wide [minimum sized])


Observed behaviour:

Width appears as "0.0" (BUG)
Height appears as "0.0" (BUG)
Line draw is very thin.


Notes:

To be clear I WANT to draw a very thin line. I'm VERY happy to see a 1/100th grid line width because it lets me draw really fine details on the map. Please don't change this, but instead allow 0.01 to exist.
When you change to any other map context e.g. fx, wall, mask, grid, layers, or play and back again to paint the width resets to 0.1.

Sulimo
November 14th, 2020, 04:22
I believe Moon (might have been Carl) mentioned a while back that this was expected. The size is good to more than one decimal place (I forget what it is exactly), but it only displays to 1 decimal place, so in your case it displays as 0.0, even though it will draw at 0.01.

Here is an image where I tried 0.01, 0.1, and 1.0 line sizes.

https://i.imgur.com/0yLOt9c.png

I cannot find the thread where I saw that at the moment.

Carlos
November 14th, 2020, 12:27
It might be that we support it in the sense that "it's not a bug it's a feature!" :-)

We do not correctly support drawing at 0.01 size in FGU. For example, as noted in my notes, if you switch back and forth from play to paint the UI code will reset the 0.01 width back to 0.1 (the smallest width) when you start drawing. There is clearly code running which assumes 0.1 is the smallest supported width. All other widths do not reset the UI in this way.

If we actually support 0.01 widths then we should display them and we should not reset the settings in the UI when switching back and forth between contexts.

Kelrugem
November 14th, 2020, 16:00
It might be that we support it in the sense that "it's not a bug it's a feature!" :-)

We do not correctly support drawing at 0.01 size in FGU. For example, as noted in my notes, if you switch back and forth from play to paint the UI code will reset the 0.01 width back to 0.1 (the smallest width) when you start drawing. There is clearly code running which assumes 0.1 is the smallest supported width. All other widths do not reset the UI in this way.

If we actually support 0.01 widths then we should display them and we should not reset the settings in the UI when switching back and forth between contexts.

I think displaying them can become difficult, because I also remember Carl's answer and there were a lot of allowed decimal places :D But a second digit shown sounds nice :)

Carlos
November 15th, 2020, 01:55
I think displaying them can become difficult, because I also remember Carl's answer and there were a lot of allowed decimal places :D But a second digit shown sounds nice :)

The UI is workable. I doubt anyone wants lines thinner than 1/1000th the square size and so you need only display "0.001" at most (4 chars and a period for total width in a non-monospace font). So limit the width at that, and place all 3 element boxes in a row.

Like this: 41128

Displaying them doesn't become difficult. Their visibility is a function of your zoom level and displayed resolution. Either you are zoomed in enough for them to be drawn or you are not.

The interesting question is: How do you *find* tiny secret drawings?

To answer that you probably have to consider some kind of "highlight" mode where selecting a paint layer for the DM will draw all lines at "false widths" that are enough to display them regardless of their current thickness e.g. All lines whose thickness would round to zero at display time are otherwise rounded up to 1 pixel width. That way when you select Layers and click the layer the extents view (with the white vertexes for layer manipulation) you see all the lines.