I am trying to draw a line between rectangles with rounded corners. However, I'd like the line to touch the corners. What happens is that the line ends as if the rectangle did not have rounded corners.
I remember I already encountered this problem, but I can not remember how I solved it (maybe I just removed the rounded corners, but this time I can not).
Does anyone have suggestion on how to remove the gap ?
N.B.: I can not draw a line to the center of the rectangle, then draw the rectangle above the line, as I will have custom endings for the line (not shown in the MWE).
N.B.2: I have to work with quite a lot of such rectangles, which are not always positioned like the MWE. I am looking for a general method, not for an ad-hoc one.
\documentclass[12pt,a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{
positioning
}
\begin{document}
\begin{tikzpicture}
\node [draw, rectangle, rounded corners] (A) {A};
\node [draw, rectangle, rounded corners] (B) [below left = 0.5cm and 0.25cm of A] {B};
\draw (A) -- (B);
\end{tikzpicture}
\end{document}