pasteboard% generates artifacts when snips are dragged behind each other
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 領域
- desktop
調査の方向性
まず、提供されている Racket 8.0 Windows 再現手順を実行し、pasteboard% の描画とドラッグ処理を調査します。特に、重なり合う snip が描画コンテキストをどのように管理しているかを確認します。青い背面のノードを緑のノード上でドラッグしても、ノードが重なっている間を含め、視覚的なアーティファクトが発生しなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
I am using Racket 8.0 on Windows 10. Run the following code.
#lang racket/gui
(struct dc-state (smoothing pen brush font))
(define (capture-dc-state dc)
(dc-state (send dc get-smoothing)
(send dc get-pen)
(send dc get-brush)
(send dc get-font)))
(define (restore-dc-state dc dc-state)
(send dc set-smoothing (dc-state-smoothing dc-state))
(send dc set-pen (dc-state-pen dc-state))
(send dc set-brush (dc-state-brush dc-state))
(send dc set-font (dc-state-font dc-state)))
(define node-snip-class
(make-object
(class snip-class%
(super-new)
(send this set-classname "node-snip"))))
(send (get-the-snip-class-list) add node-snip-class)
(define (set-extent-others others)
(for/list ([other others])
(when other (set-box! other 0.0))))
(define node%
(class snip%
(init-field size color)
(super-new)
(send this set-snipclass node-snip-class)
(define/override (get-extent dc x y width height . others)
(when width (set-box! width size))
(when height (set-box! height size))
(set-extent-others others))
(define/override (draw dc x y . other)
(let ([dc-state (capture-dc-state dc)])
(send dc set-smoothing 'smoothed)
(send dc set-pen "Black" 3 'solid)
(send dc set-brush color 'solid)
(send dc draw-rounded-rectangle x y size size 7)
(restore-dc-state dc dc-state)))
))
(define diagram (new pasteboard%))
(define frame (new frame%
[label "Diagram"]
[width 500]
[height 500]))
(define canvas (new editor-canvas%
[parent frame]
[style '(no-hscroll no-vscroll)]
[horizontal-inset 0]
[vertical-inset 0]
[editor diagram]))
(send diagram insert (new node% [size 50] [color "Pale Green"]) 100 100)
(send diagram insert (new node% [size 50] [color "Pale Turquoise"]) 200 200)
(send frame show #t)
Note that the dc state is captured and restored in the draw override. Drag the green node over the blue one and note that no artifacts occur.

Now drag the blue node, which is behind the green node, and note that artifacts appear, potentially from the smoothing property not being correctly handled by the pasteboard%. Although, I'm not sure where exactly the artifacts are coming from at the moment. Notice that the artifacts only occur while the blue node is being dragged behind the green node and that they stop after the blue node "clears" the green node.

- 主要言語
- Racket
- スター
- 68
- フォーク
- 83
- 平均マージ
- 12日 5時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
racket/gui のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
Colorer messes up when given a lexer that supplies nonzero backups対応中かも @otherjoel が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
似ている issue
-
Locked plugin flip-flops position on every refresh after being disabled対応中かも @Illustar0 が今日担当しました。 オープンissue report
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ModOrganizer2/modorganizer#2449 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
bitwarden/clients#24012 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug module: omni
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
chthollyphile/folia-major#812 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信