bad export of transparent rectangle annotation
Closed this issue · 3 comments
Reported by Kai Shi on FEX page on Feb 3, 2015:
I added a rectangle box in the figure and change the transparency of the box to 0.3. However, when I export the figure into latex. The transparency of the box is still 100%. With and without the -transparent
option shows the same results. The code of generating the box is shown below:
annotation(hCCs, 'rectangle',rectSize, 'FaceColor','r', 'FaceAlpha',0.3, 'LineStyle','none');
The default export renderer (which is painters for vectorized formats such as EPS or PDF) does not support transparency (same in Matlab figures). I modified it so that if the figure contains any patches or transparent annotations, then the default renderer will become OpenGL. This should also solve issue #44.
This causes me problems. My OpenGL implementation is fckd up because of Haswell GMA+Radeon and Ubuntu, so I switch Matlab to use software OpenGL rendering. But the software renderer shows to be quite bad - even less featureful than the painters
renderer. So I'd like to still have an option to forbid the use of opengl entirely.
I'm sorry, my bad. I noticed that when I specify the -painters
option, then the opengl is not being used. Sorry for false alarm...