6

I'm not sure what's the difference between tikzpicture and pgfpicture.

I would like to make the following MWE within a pgfpicture:

\documentclass{article}
\usepackage{tikz}
\begin{document}

\begin{tikzpicture}
  \draw (1,2) -- (3,4) -- (5,8);
  \draw (6,6) circle (3);
  \draw (8,8) .. controls (5,9) .. (1,1);
\end{tikzpicture}
\end{document}
CarLaTeX
  • 62,716
Micha
  • 2,869
  • related https://tex.stackexchange.com/questions/125001/is-there-an-advantage-in-using-the-pgf-basic-layer-over-tikz – percusse May 12 '17 at 20:45

1 Answers1

8

Tikz is a high level language which expands down into pgf which is low level and painful to write manually but much easier to convert to PDFs. Inside a pgfpicture you don't get \draw or anything like that but instead you get commands like \pgfpoint or \pgfrect. These can all be looked up in the tikz and pgf manual.

The first bit of your example would, inside a pgfpicture, look like:

\pgfline{\pgfpoint{1cm}{2cm}}{\pgfpoint{3cm}{4cm}}
\pgfline...
\pgfcircle[fill]{...}{3cm}
...

These are all explained fully and clearly in the tikz and pgf manual which is readily available online.

Moriambar
  • 11,466
  • thanks for the explanation; but how I can draw a curved or bezier line in a pgfpicture? – Micha May 12 '17 at 19:33
  • 4
    @Micha Read part IX The Basic Layer of the manual, it describes all of this. (Skip straight to chapter 97.4 about The Curve-To Path Operation for bezier curves.) – Torbjørn T. May 12 '17 at 21:23