Dashes in a line are drawn at a minimum 0.05px before scaling
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: 3.1
* Windows version: Windows 10, Version 1909
* Does the bug reproduce also in WPF for .NET Framework 4.8?: *Partially* (some variations on the bug introduced in Core; see below)
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
**Problem description:**
There are a handful bugs related to dashes. The first one is why I wrote this report, but the other two came up as I tried to create a minimal repro.
1. When a dashed line is drawn in a `DrawingContext` such that *before scaling* the length of the dash is *shorter* than **0.05px**, then the dash is rendered at 0.05px *before scaling*.
2. The final dash in a line may either not be drawn (.NET Framework 4.8) or blink in and out while scrolling horizontally (.NET Core 3.1).
3. The last dash in a line may be longer than the other ones.
**Actual behavior:**
1. When very small dashes are scaled up, they are larger than they should be. e.g. A 0.01px dash before scaling, scaled 100x, should be 1px long. However, it is first rendered at the minimum 0.05px, then scaled 100x to 5px.
2. See above.
3. See above.
**Expected behavior:**
1. Dashes should not have a size cap before scaling.
2. Lines aren't missing any dashes, and they are drawn regardless of scrolling behaviour.
3. All dashes in a line are the same length.
**Minimal repro:**
Core 3.1 and Framework 4.8 demo projects here: https://github.com/ben-reilly/wpf-dash-render-test
Contributor guide
Assessment
This issue has not been assessed yet.