ankush.thakur53
2019-10-8 07:37:00

@ankush.thakur53 has joined the channel


jbclements
2019-10-8 17:10:21

I’m trying to figure out how to manipulate icons in the icon library to create bitmaps for buttons in the stepper. It appears that the icons in the library are bitmap%’s, and the easy way to combine them is with 2htdp/image, but the result is an image, not a bitmap%, even after using freeze, making it unusable with e.g. compiled-bitmap. I can pursue one of two strategies at this point: digging into the 2htdp code to see how to extract a bitmap% from a frozen image, or trying to figure out how to composite bitmap%’s using only gui library functions. Any advice?


soegaard2
2019-10-8 17:11:35

Can you use pict instead of 2htdp/image ?


jbclements
2019-10-8 17:11:52

ooh! I’ll try that. Many thanks!


jbclements
2019-10-8 17:18:48

hmm… actually, pict seems further from bitmap% than image, I can’t even hc-append two bitmaps, and they don’t seem to be “pict-convertible”. Hm.


soegaard2
2019-10-8 17:19:35

In a pinch you can save both 2htdp/image and picts to a file and then load them as bitmaps.


soegaard2
2019-10-8 17:20:25

There is a pict->bitmap in pict.


soegaard2
2019-10-8 17:21:57

And bitmap produces a pict from a bitmap%.


ben
2019-10-8 17:22:52

There’s an example at the top of images/icons that combines icons: https://docs.racket-lang.org/images/Icons.html#(part._.About_.These_.Icons)


jbclements
2019-10-8 17:23:55

Excellent! Okay, looks like going through “pict” is the way to go. Many thanks to both of you.


jbclements
2019-10-8 17:26:58

wait… just saw Neil Toronto’s “flomap” module; might be even better.


jbclements
2019-10-8 17:31:34

oof. no, just kidding.


diegorj100
2019-10-9 06:19:38

@diegorj100 has joined the channel