-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Julien Danjou wrote:
> Hi,
>
> At 1243625625 time_t, Uli Schlachter wrote:
>> Should I try to do so or are there some issues with the current code that
>> would
>> have to be sorted out first? (E.g. farhaven suggested to load the mask for
>> the
>> rounded corners from a file instead of generating it, I dunno...)
>
> Seems pretty ok. Maybe it'd need some rearrangement to be more readable,
> and also respect a little more STYLES, but seems ok as far as I
> understand it.
Uhm, yeah, I bet it would at least cause some warnings with awesome's CFLAGS.
> What's your userland API proposal for this feature ?
Uhm, the plan so far was to have a corner_size and for each corner a setting
whether it should be rounded or not. Originally I planned a corner_size setting
for each corner, but maths defeated me (There were rounding issues).
> Because I'm wondering if exporting rounded corner is enough. I'd suggest
> we export more or less XShape to Lua and then add rounded corner, which
> is a particular usage of XShape, to awful.
Uhm... Actually, this could be done quite easy *if* someone adds some API for
drawing 1bit depth (black and white) pixmaps via some lua api :P
> YMMV, and I know nothing about XShape. :)
You create a 1bit pixmap (size doesn't really matter, it will be clipped to the
window's geometry) for your window. Everything which is black will be
transparent, the white part is what actually stays visible. Then you do one
single XShape call and the window got the pixmap's shape.
Well... XShape can do more than this and I just remember that I have to check
how it affects window borders. The spec allow you to set three pixmaps (I forgot
how those are called). One is describes the... uhm... shape? of the window.
Another one defines which part of the window is the border (the difference
between this pixmap and the last one is the window border) and XShape 1.1 adds a
new option which is the "input area". I'm not exactly sure what this does, but I
guess it does something input related. ;)
Looking at the current image lua API, I kinda doubt that it's worth to use this
for generating a 1bit pixmap. Plus, if a window is resized you pretty much have
to set a new pixmap. Everything else would look ugly or make the resize
pointless.
I think it's better to just have rounded via some C code for now...
Cheers,
Uli
P.S.: Since a 1bit pixmap is used there can be no gray involved and thus no
anti-aliasing is possible. I'd doubt if some fancy-shape window with rough
corners would look good...
- --
"Do you know that books smell like nutmeg or some spice from a foreign land?"
-- Faber in Fahrenheit 451
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iQEcBAEBCAAGBQJKIPNZAAoJECLkKOvLj8sGBGAH/i1f2Ys3w/HvTx/LC373mfF7
Zuxt7ztlEXgsJ5jeOmt53xYhB0z0lbKIlOAJ3woXhIEDxKApZWmZuyzi3RDOd4uo
R00+9jsr0AV2/95m4BBtnSznXdVnvVDp/tCSh/01797lufNlyME+EUiJdPREiEoi
0ONRpXEXB6yypmRg4SgQDsKHkEyVsDcgJDq5XAUvcUNE4LPoaloiqEs4pHpqmnUt
/ekBEbM/3QhHQWqf1697/nFdfR7Y9ABQfu4cJ4QSIyhdiBkO2YehPgO/nMSOQr0B
XuzSi10EcwdQ8DxPjuxNQcghAiD0z+tD+K78Nz5+bgwSQe0PPObSu+/9Nfa2e+s=
=KZBR
-----END PGP SIGNATURE-----
--
To unsubscribe, send mail to [email protected].