brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 109 forks source link

`scale-xy` doesn't draw anything with negative scale factors #1122

Closed blerner closed 6 years ago

blerner commented 7 years ago

I'd expect scale-xy(-1, 1, an-image) to produce a flipped image. At the REPL, at least, it doesn't display anything at all. @schanzer is this a bounding-box issue, a rendering issue, or just some dumb little bug somewhere?

schanzer commented 7 years ago

On WeScheme, negative values result in a runtime error. I have no objection to this behavior switching to "flip"

blerner commented 7 years ago

I'd like to see it flip -- if you imagine an animation scale-xy(t, 1, some-image) as t goes from positive numbers to negative numbers, it's a natural interpretation for the right side of the image to compress to zero width and keep going past the left side of the image, i.e. flipping horizontally.

If we don't do flipping then we must raise an error. Leaving a blank image isn't a good outcome.

ds26gte commented 7 years ago

As this is a code.pyret.org rather than pyret-lang issue, I've submitted a PR there: brownplt/code.pyret.org#209

schanzer commented 6 years ago

Since it's not a pyret-lang issue, can we close this?

blerner commented 6 years ago

We can close this, so long as we don't forget about Dorai's PR. :)