Brilliant… and nostalgic. Windows 3’s control panel had a facility to draw tiled pixel patterns which was a simpler version of this. It was called the Pattern: https://swiat-owocow.pl/grafiki/wallpaper-win30.png
wow , I had forgotten all about that -- when I saw the sub window I was hit with some serious nostalgia.
3.x had some interesting priorities with regards to what a user may want to do, you don't realize (remember..) that in some ways the users of the past were more empowered than they are now until something like that is thrown in front of you to remember.
Or presumably a custom one, since the data just seems to be the pixels to colour, but I'm not sure in what format. I just tried it with Tulip though and now I have a desktop tulip pattern!
Thank you for posting this. I spent a long time hating on “M$” back in the day when they were embracing and extending everything, including the web. As the years go by though, I have built only an ever increasing respect for how Windows manages to retain backwards comparability with the Neolithic ages. …and now, this. Incredible.
The numbers themselves look to be eight bytes of eight bits. The 50% gray gives it away:
>>> 0b01010101
85
>>> 0b10101010
170
What happens if you put more than 8 bytes in there? Or a negative number? What about “ ªU ªU ªU ªU”, the bytes for the grayscale? Give it a poke!
It’s probably a funny artifact of the architecture and the impracticality of image-based background on the hardware of the day that this was made available.
PatBlt() was a fast way to fill a given rectangle with a color (or xor it), but it was also a fast way to blit the pattern brush currently selected to the device context (hdc). No doubt the 2D accelerated hardware capability this was made to work with was tied up in being able to quickly scan out to the clip region while selecting the corresponding byte per line.
Win GDI was a fascinating hardware centric abstraction.
I just tried it for the first time on a laptop; there, when squares light up in the symmetric cells as you mouse over a target, it's a bit more intuitive. On mobile, it's a lot harder to figure out.
Wow! This reminds me of something similar I did and am proud of. I gave the tools to designers/developers in companies that we were pitching to help them design "smooth rounded corners" in either CSS or Flash during the early 2000s.
I don't remember the years but around 2004-2006, smooth rounded corners were still hard to do if you do not know "feathering" in the graphic software and then using it in CSS or as sprites for Flash.
Very cool, would be great to have a way to share these or to view ones others have made as presets/templates. Here is a 'double bevelled' border: https://imgur.com/wPxvdCZ
Copy the CSS in the second text box. It's generating a PNG border-image and encoding it as a base64 dat url so that it can be embedded directly in the CSS.