I have a filldraw rectangle with custom fading (i.e. more than just top fill = color1, bottom fill = color2 for instance), that is defined using the \shade option following this post by Tobias Brink.
There are two edits that I would like to achieve:
- Draw a border that does not fade with the fill, but vanishes wherever the transparency is set to 100 (i.e. the white parts)
- Round the north east and south east corners only? This has been answered for
nodessuch as in this post, but I can't get it to work here. - The text should appear without transparency.
MWE
\documentclass[tikz]{standalone} \usetikzlibrary{fadings}
\begin{tikz fadinfrompicture}[name=myfading]
\clip (0,0) rectangle (2,2);
\shade [top color=transparent!100, bottom color=transparent!0] (0,0) rectangle (2,0.38);
\shade [top color=transparent!10, bottom color=transparent!100] (0,0.68) rectangle (2,0.92);
\shade [top color=transparent!100, bottom color=transparent!10] (0,0.92) rectangle (2,1.16);
\shade [top color=transparent!0, bottom color=transparent!100] (0,1.59) rectangle (2,2);
\end{tikzfadingfrompicture}
\begin{document}
\begin{tikzpicture}
\filldraw [blue, path fading=myfading, draw=black, line width=1mm, text opacity = 1] (10,0) rectangle (19,-11.5) node[pos=.5,text width=8 cm] {Some text without transparency};
\end{tikzpicture}
\end{document}
This generates the following output





text opacity = 1with no luck. I'll edit the MWE to have that included. – Sid Nov 11 '20 at 15:20path pictureinstead. – Nov 11 '20 at 17:38path picture. – Nov 11 '20 at 20:40path picture. Also a separate answer would be useful. – Sid Nov 11 '20 at 23:22