Issue 102109 - Transparent graph lines are not antialiased
Summary: Transparent graph lines are not antialiased
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: wolframgarten
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-21 01:05 UTC by ace_dent
Modified: 2017-05-20 11:41 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Graph showing line with and without antialised edge due to transparency (6.27 KB, image/png)
2009-05-21 01:13 UTC, ace_dent
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description ace_dent 2009-05-21 01:05:57 UTC
Setting a line graph to semi-transparent, will be correctly antialiased when
editing but then displayed with NO edge smoothing when viewed without editing.

1. Enter some values in three rows (1,2,3, etc.)
2. Select cells and plot a line graph.
3. Exit graph editing. Graph should appear identical before and after.
4. Edit graph and change line properties to 5% transparent.
5. While editing graph line displayed correctly with antialiased edge.
6. Exit editing the graph. The line is now displayed differently with no smoothing.

This effects all lines plotted on graphs.

Regards
Andrew
Comment 1 ace_dent 2009-05-21 01:13:27 UTC
Created attachment 62399 [details]
Graph showing line with and without antialised edge due to transparency
Comment 2 kla 2009-05-26 11:43:56 UTC
I can only reproduce, if i switch back from 3D to 2D graph. IHA, pls have a look.
Comment 3 IngridvdM 2009-05-26 11:59:58 UTC
@aw, this is your area I think.
Comment 4 Armin Le Grand 2009-07-21 18:09:30 UTC
AW: Added to CWS aw075, taking a look. The difference between activated and
non-activated chart is that the latter uses a MetaFile to paint. Ckecking which
actions are used to do that...
Comment 5 Armin Le Grand 2009-07-21 19:00:11 UTC
AW: It's not a thick line in the MetaFile; MetaFiles do not support transparent
line drawing; it's a (actually two, one for the ledgend)
MetaFloatTransparentAction. It opens a buffer-VDev and the lines are not as
lines in the MetaFile, but as filled PolyPolygons. That's the problem with
MetaFiles: They are a PAINT RECORDING, not a scene graph. Ahhh :-(
To make this work with AA, the OutputDevice::DrawTransparent methods (there are
two; one with a gradient and one with a percentage transparency) need rework.
This will be some stuff to do.
More and more work surfaces from the fact that MetaFiles need to be used for
inactivated OLE visualisations. Maybe we should think again about using
primitives in some savable/loadable form for at least our own OLEs...
Comment 6 Armin Le Grand 2009-07-22 11:11:58 UTC
AW: Checking OutputDevice::DrawTransparent (the TransparenceGradient version).
The AntiAliasing state is not copied from the current OutDev when the
buffer-VDev is created. After adding, the AA Polygon painters are used. The
result is corrupted by pVDev->DrawMask(...) (...) where the previously painted
mask is added to the VDev. Need to debug DrawMask and check if it can be made
working wit alpha, too...
Comment 7 Armin Le Grand 2009-07-22 11:54:08 UTC
AW: Created extra code for OutputDevice::DrawTransparent which will do extra
stuff when AA is on. Instead of trying to create a mask (which would involve
mixing the alpha-based mask with the gradient as mask) it does what the
VclPrimitiveRenderer does: Copy from source, draw to it, create alpha using the
gradient and copy back. This is still tricky stuff due to all the MapModes,
offsets and pixel/logic values involved. Works now and fixes this current case.
Doing some more testst with this solution...
Comment 8 Armin Le Grand 2009-07-22 12:00:51 UTC
AW: Works well and is good for now. It shows the necessity to implement a
decomposition for MetaFile primitive and to paint MetaFiles using the primitive
renderers in the future.
Checked in, done.
Comment 9 Armin Le Grand 2009-08-04 16:56:00 UTC
AW: Need to use AlphaMask instead of Bitmap for aAlpha. Changed, commited.
Comment 10 Armin Le Grand 2009-08-06 13:44:39 UTC
AW->WG: Please review as described
Comment 11 Armin Le Grand 2009-08-06 13:57:19 UTC
AW: Adapted target to 3.2
Comment 12 wolframgarten 2009-08-10 10:27:17 UTC
Verified in CWS.