Hi Michael,
On 01.08.2012 13:24, Michael Meeks wrote:
I was at GUADEC just now, and trying to get toolbar rendering sorted
out for gtk3 - which turned out to be quite 'fun' ;-) it seems that the
toolbar items we have have a WB_BORDER style set which appears to create
a strange border rendering widget; which renders the entire toolbar
combo-box (eg. the font selector) twice at least. Quite apart from the
wastefulness there, with the new alpha transparent borders - we get a
double compositing which over-darkens the pretty alpha effects there :-)
With gtk3 I see similar effect for normal (not toolbar) buttons, edits
etc. Why do you think this is related to toolbars?
I solved the problem by the following change in renderAreaToPix:
cairo_data[x*4+0] * alpha
@@ -972,9 +972,9 @@ void GtkSalGraphics::renderAreaToPix( cairo_t *cr,
for (int x = 0; x < awidth && y < aheight; ++x)
{
double alpha = ((float)cairo_data[x*4 + 3])/255.0;
- src[x*3 + 0] = src[x*3 + 0] * (1.0 - alpha) +
cairo_data[x*4+0] * alpha;
- src[x*3 + 1] = src[x*3 + 1] * (1.0 - alpha) +
cairo_data[x*4+1] * alpha;
- src[x*3 + 2] = src[x*3 + 2] * (1.0 - alpha) +
cairo_data[x*4+2] * alpha;
+ src[x*3 + 0] = src[x*3 + 0] * (1.0 - alpha) +
cairo_data[x*4+0];
+ src[x*3 + 1] = src[x*3 + 1] * (1.0 - alpha) +
cairo_data[x*4+1];
+ src[x*3 + 2] = src[x*3 + 2] * (1.0 - alpha) +
cairo_data[x*4+2];
}
src += nStride;
cairo_data += cairo_stride;
no idea of what's going on though, because I'm not familiar with alpha
blending.
HTH,
Ivan
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.