Skip to content

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

@jasonhemann

Description

@jasonhemann

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions