Open jestarray opened 3 years ago
Note that rotate
works on text, so it should be relatively easy to do some things here.
I think all we need to do is to delete this check? : https://github.com/racket/htdp/blob/6d8926510bd48aaeec3f6dba9364f3d08e8e1601/htdp-lib/2htdp/private/image-more.rkt#L1002
[(text? atomic-shape)
(error 'flip "cannot flip shapes that contain text")]
but I don't know how to have racket require my local modified version of htdp. Can someone test this? Thanks.
By removing said check above I get:
../../usr/share/racket/pkgs/htdp-lib/2htdp/private/image-more.rkt:964:21: flip-atomic: broke its own contract
promised: np-atomic-shape?
produced: #<void>
in: the range of
(-> np-atomic-shape? np-atomic-shape?)
contract from: (function flip-atomic)
blaming: (function flip-atomic)
(assuming the contract is correct)
at: <pkgs>/htdp-lib/2htdp/private/image-more.rkt:966:18
So it's not just removing 1 line.. Edit: so it seems cairo can do these text flipping transformations since im testing it atm in C.
There are a number of methods for flipped text that need to be implemented, notably image equality. I believe the internal data structure has to change to accommodate flipped text. (It isn't just about drawing things.)
is it possible to make flip-horizontal and flip-vertical work with text images in 2htdp/image ? Arguably the color parameter is not needed for emojis. I can think of a few emoji centric games that could be fun to students. 🚣♂️ A fun game I can think of is rowing a boat left and right to avoid a shark from underneath or something, and getting flip-horizontal to change the boat facing direction. Thanks