Yes exactly. If your user is going to draw a line on a web page, you'll need the starting point (X1 and Y1) and the ending point (X2 and Y2). Then you can pass these as parameters to the TCPDF Line function: $pdf->Line(X1, Y1, X2, Y2, $style);
Depending on the shapes your drawing this may get much more complex. Also, you may have to change the coordinates depending on where you want the graphic to show up in your PDF.