pasteboard% generates artifacts when snips are dragged behind each other
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Área
- desktop
Línea de trabajo
Comienza ejecutando la reproducción proporcionada para Racket 8.0 en Windows e inspecciona el dibujo y el manejo del arrastre de pasteboard%, especialmente cómo los snips superpuestos gestionan el contexto de dibujo. Se considera terminado cuando arrastrar el nodo azul posterior sobre el nodo verde no produce artefactos visuales, incluso mientras los nodos se solapan.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.

- Lenguaje dominante
- Racket
- Estrellas
- 68
- Forks
- 83
- Merge medio
- 21 h
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de racket/gui
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de racket/gui
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
home-assistant/installer#321 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
longbridge/gpui-kit#3612 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
area:ide enhancement platform:vscode
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
anthropics/claude-code#103665 ·
Los mantenedores suelen responder en 1 día