inconsistent line width from draw-line on Windows

オープン
#234 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
領域
desktop

調査の方向性

提供されている Racket GUI の例と canvas の on-paint エントリポイントから始め、backing scale が 1.5 の Windows 上で 2 つの draw-line 呼び出しを再現します。equivalent な水平線の幅が、smoothing mode 'aligned." に依存せず一貫するようになれば、issue は完了です。

索引モデルが issue の本文から書いたものです。

説明

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)

image

Setting smoothing mode to 'aligned could alleviate this problem.

主要言語
Racket
スター
68
フォーク
83
平均マージ
4日 4時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

racket/gui のほかの issue

racket/gui の issue をすべて見る

似ている issue

Desktop Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。