Unifying Color

Tomaž Vajngerl quikee at gmail.com
Sun Feb 11 19:54:10 UTC 2018


On Sun, Feb 11, 2018 at 10:30 PM, Chris Sherlock
<chris.sherlock79 at gmail.com> wrote:
> I see the error I’ve made now - it’s not possible to move Color to vcl as
> svl uses it.
Well basegfx is allowed for svl.. Anyway, to which module it belongs
is the least of the problems now. Tools is fine for the time being

As for combining BitmapColor and others, look also into my nativealpha
branch, specifically the change to BitmapColor there  [1] where I got
rid of the mbIndex field and re-purposed it to be the alpha channel.
The trick here is that we know from the Bitmap if the colors are
indexed or not so there is no need for mbIndex flag at all. With only
BGRA channels this makes it practically the same as ColorData and
SalColor (supports only RGB, but for nativealpha it was extended to
RGBA). The thing you need to be very careful is the order of fields if
we store the BitmapColor structure into a file or the Metafile.

[1] https://cgit.freedesktop.org/libreoffice/core/commit/?h=feature/nativealpha&id=1aa579feaa841efcaee7389447c15c43a3d15b6d

Regards, Tomaž

More information about the LibreOffice mailing list