I want to make rounded corners on one side only like this:
\tikz{
\fill[red]
(0,0) +(8pt,8pt) arc (0:-90:8pt) -- (0,1) arc (90:0:8pt)
}
The points (0,0)
and (0,1)
in the above are placeholders. I actually want to use the lower and upper right corners of a node. Thus:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikz{
\node[inner sep=8, fill=red](subh){
\parbox{2cm}{
some multiline text
}
\hspace{-8pt}
}
\fill[red]
(subh.below right) +(8pt,8pt) arc (0:-90:8pt) -- (subh.above right) arc (90:0:8pt);
}
\end{document}
This causes XeLaTeX to start an apparently neverending compilation. How to make it work? (I'm asking for a solution in this vein. What I'm actually going to try next, as I need the result quickly, is to make a 2x3 table with text spanning the first column, it and the middle cell of the second one having blue background and with TikZ-made quarter-circles in the rest.)
\documentclass[tikz,border=3.14mm]{standalone} \begin{document} \tikz{ \node[inner sep=8, fill=red,text width=2cm](subh){some multiline text}; \fill[red](subh.-45) +(8pt,8pt) arc (0:-90:8pt) -- (subh.45) arc (90:0:8pt); } \end{document}
\node
is an abbreviation for\path node
(p.222, pgfmanual, v3.1)\node
is a\path
operation. This explains the addition of;
at the end (as for all\path
).