inconsistent line width from draw-line on Windows
Open
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 68
- Forks
- 82
- PR merge metrics
- No merged PRs in 30d
Description
I am using Racket 8.2. The width of line with odd y is larger. The backing scale reported by dc is 1.5.
#lang racket
(require racket/gui/base)
(define f (new frame% [label "test"] [width 320] [height 240]))
(define c (new (class canvas%
(inherit get-dc)
(super-new)
(define/override (on-paint)
(define dc (get-dc))
(send dc draw-line 10 10 100 10)
(send dc draw-line 10 21 100 21)))
[parent f]))
(send f show #t)

Setting smoothing mode to 'aligned could alleviate this problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided Racket GUI example and the canvas on-paint entry point, then reproduce the two draw-line calls on Windows with a backing scale of 1.5. The issue is done when equivalent horizontal lines have consistent widths without relying on smoothing mode 'aligned.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100