racket / racket/drracket

Large 2htdp/image values displayed in DrRacket interactions get clipped, confusing

Open
#809 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
516
Forks
103
PR merge metrics
No merged PRs in 30d

Description

Because the DrRacket interactions window seems to clip overly-large images, two images that should look very visibly distinct in the interactions window can actually end up resembling one another.

#lang htdp/isl+
(require 2htdp/image)

(define BIG-CIRCLE (circle 3000 "solid" "blue"))

(define ACTUALLY-CLIPPED-CIRCLE
  (crop 0 0 4167 6000 BIG-CIRCLE))

BIG-CIRCLE
ACTUALLY-CLIPPED-CIRCLE
(image-width BIG-CIRCLE)
(image-height BIG-CIRCLE)
(image-width ACTUALLY-CLIPPED-CIRCLE)
(image-height ACTUALLY-CLIPPED-CIRCLE)

When a user copies that clipped image back to the definitions window, the clipped cache silently becomes the copied/exported representation of the full image.

Copying and pasting such an image into a check-expect leads to perhaps-surprising test failure error messages, where the images look the same but its frames that look different.

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the example in the DrRacket interactions window, then compare the displayed large images with their copied representations and the resulting check-expect failure messages. Done means visibly distinct images remain distinguishable after display and copying, without silently changing the representation.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.