Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Software rotation of test is cool but cpu heavy (at the time)

Given the lag the current wx11 start menu animations illicit in slower machines, I'm not surprised they used to value speed over complexity.



I'd think for a relatively modest use case like the menu title bar, you could rotate the necessary glyphs once and cache them.


In a photo editor and use bitmaps


Seems like a localization nightmare though. :)


then you have to deal with cache invalidation, you need to have triggers in all places that change the look of the menu, for example when you install a new program, change the OS language, etc.


This is talking about the Windows NT Workstation (or Windows 95 etc.) banner on the left of the original start menu. It doesn’t change when you add programs, and I don’t think the edition branding changes between languages (at least the French versions are still Windows NT Workstation / Server, and if the French didn’t force Microsoft to localise the edition names, I doubt any else would manage). So you could just render once on startup / first menu draw then cache the bitmap. Or just prerender the bitmap as a graphical resource and store it on disc…


the rotation would only happened once and would then have been written to the device context. once its in a DC you can manipulate it with memcpy. A device context is a pointer to the window "surface" and maps a memory area.

I write this from memory so its possible that i misremember :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: