jeapostrophe / mode-lambda

mode-lambda - sprite-based 2D graphics engine
Other
39 stars 8 forks source link

Transparent background text is no longer transparent #20

Closed srfoster closed 5 years ago

srfoster commented 5 years ago

On Windows and Linux, we're experiencing a regression after the most recent commit:

https://github.com/jeapostrophe/mode-lambda/commit/a8c2a3a4eb03f26be630caa9ababfe3128a1dd59

Namely, backgrounds on rendered text are not transparent anymore.

mode-lambda-text-bug

aBlender commented 5 years ago

I think the issue is the change on line 56 of mode-lambda/text/static.rkt, where make-bitmap is changed to make-screen-bitmap.

make-screen-bitmap uses make-platform-bitmap which doesn't have an alpha channel on Windows and Linux.

jeapostrophe commented 5 years ago

I believe you are correct @aBlender

I changed it to get the backing scale correct Retina fonts on OS X. I think I may want to do (make-object bitmap% w h #f #t (get-display-backing-scale)). Can you check if that is good for you @srfoster ?

aBlender commented 5 years ago

Thank you @jeapostrophe for your quick response. Using (make-object bitmap% width height #f #t (get-display-backing-scale)) does fix the alpha issue on our windows and linux machines.

jeapostrophe commented 5 years ago

Awesome, I just pushed that