Bug 114787 - Transparent text not drawn properly
Summary: Transparent text not drawn properly
Status: RESOLVED LATER
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-20 23:26 UTC by Andrew Walker
Modified: 2007-04-04 21:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Example of the problem (49.27 KB, image/png)
2007-04-04 21:38 UTC, Andrew Walker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2005-10-20 23:26:38 UTC
Version:           HEAD (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources
OS:                Linux

PROBLEM:
When a label is added to a plot with the transparent flag set the resulting text is drawn properly if, and only if, the background color of text happens to match the overall color of the plot on which it is drawn.

STEPS TO REPRODUCE:
Create a new label on a plot that is predominantly white
Set the background color of the label to be red
Make the label transparent

RESULTS:
The text is drawn with a red "halo" around the letters

EXPECTED RESULTS:
No such "halo" is visible


The problem results from the use of createHeuristicMask() which is used to create a clip region. This leaves a region around each letter that is not clipped, as well as leaving regions within the central areas of letters such as ABDOPQR. These regions will be drawn in the background color of the label even though the label is transparent.
Comment 1 Netterfield 2005-10-21 00:09:01 UTC
If we are going to use anti-aliasing (not using antialiasing is much more ugly in the common case), and we want to cache the label (not convinced we do... if the label has a scalar, then it will probably get re-drawn in real time mode - the only time we care - anyway) then this is pretty much our only option for now.  The work-around is to make sure that your label has the same background as the plot if you want transparency.  But even then it also shows up if the label is over thick data lines...  

It does not show up in ps or eps plots.
Comment 2 George Staikos 2005-10-21 07:29:53 UTC
Yeah this is an X11/Qt limitation at this point.  There is nothing we can do to do this properly and still maintain the performance we need.  Qt4+KDE4 will help.
Comment 3 Andrew Walker 2007-04-04 21:38:18 UTC
Created attachment 20182 [details]
Example of the problem

A screenshot showing the problem. This is not an issue when exporting to a
graphics file or printing as the entire clipping mechanism is discarded for
those operations.