[Tex/LaTex] How to change line style while drawing in Tikz

tikz-pgftikz-styles

I'm trying to draw a dotted line from A to B and a straight line from B to C. If I use two draw commands, then there is an obvious break in the line, because I use rounded edges. Just using one draw command I'm stuck.

So is there a command like this:

\draw [rounded corners,dotted] (0,0) -- (1,1) [-]-- (3,1);

MWE:

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
\node  at (0,1.2) {A};
\node  at (1,1.2) {B};
\node  at (3,1.2) {C};
\draw [rounded corners,dotted] (0,0) -- (1,1) -- (3,1);
\draw [rounded corners,dotted] (0,-1) -- (1,0);
\draw (1,0) -- (3,0);
\end{tikzpicture}
\end{document}

Example

Best Answer

This is not very nice, but can help you.

\documentclass[12pt, border=1cm,convert={density=1400}]{standalone}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
  \begin{tikzpicture}
    \path (0,0) coordinate(A) node[left] {A};
    \path (1,1) coordinate(B) node[above left] {B};
    \path (3,1) coordinate(C) node[above] {C};

    \draw [ rounded corners,dotted,
            postaction={draw,line width=.5pt,solid,shorten <=13mm}]
              (A) -- (B) -- (C);
    \begin{scope}[transform canvas={yshift=-3mm}]
      \draw[rounded corners,dotted]  (A) -- (B) -- (C);
      \draw[shorten <=2mm](B) -- (C);
    \end{scope}
  \end{tikzpicture}
\end{document}

enter image description here

EDIT: Another idea is to use clipping. You can draw your path twice and for the first draw you clip half of the path, and for the second you clip the other half.