This extension offers control over how the window looks in a number of ways:
- Shapes: these use
SetWindowRgnand GDI regions. - Chromakey: mark a single color to be transparent.
- Per-pixel alpha: partial transparency, as if your window was a surface.
- Alpha: a simple multiplier that works with any of above
GDI regions are vector-based (consisting of rectangles, polygons, and ellipses) rather than pixel-based, which means that you can't have semi-transparent pixels on the window edge, but you can do binary operations on shapes (like combining them together or applying a mask).
If you've ever worked with vector graphics editors, this should sound familiar.
Some functions consume the inputs, meaning that the underlying native object is destroyed and the reference is invalidated - you don't have to call window_shape_destroy on them and you cannot use them in further functions.
Changing a window's shape forces a redraw, so you'll usually want to apply a shape once per frame at most.