# Does \pgflowlevel{\pgftransformscale{}} do the same as normal tikz scale?

I am wondering the following.

Somebody made a complicated tikz figure (our university logo). Now I am having troubles, because the width and height latex is reporting are not the 'real' width and height, a very small box instead.

The beginning of the tikzpicture environment looks like this:

\begin{tikzpicture}%

\pgflowlevel{\pgftransformscale{#1}}%

\pgftransformscale{0.1}%

% Scaled smaller from the large logo
\begin{pgfscope}%


The culprit seems to be in the \pgflowlevel{} line. When I replace this line with a normal scale, like this:

\begin{tikzpicture}[scale=#1]%

\pgftransformscale{0.1}%

% Scaled smaller from the large logo
\begin{pgfscope}%


the logo seems to be rendered the same, except that the width and height are now ok.

What is the difference between the lowlevel command and the tikz scale command, except for messing up the reported dimensions? If none, why would somebody want to use the lowlevel command?

-
Where does the parameter in \pgflowlevel{\pgftransformscale{#1}}% come from? –  Pieter Nov 2 '10 at 10:29
@Pieter This is logo is a macro, so the parameter is a scale. I didn't change it so that it is clear that the code has to work the same for all scales. The 0.1 in the other scale command is fixed. –  Peter Smit Nov 2 '10 at 10:31

\pgflowlevel applies the transformation you feed it to the entire canvas instead of just the coordinates. That means everything (including text and line widths) are scaled without further ado, when applying the transformation to coordinates text remains the same and line widths are taken care of such that they are scaled uniformly.

Examples of this behaviour can be found in Section 52.4 of the PGF/TikZ manual, version 2.0.

As to why the creator of the logo uses this: he wanted to resize line thickness and text size uniformly, so the logo looks the same for all scale factors. What I don't understand is the presence of \pgftransformscale{0.1} in both code snippets and the fact that the logo is rendered the same. Maybe there's no text or fiddling with line thickness in it.

-
There is no real text. Everything in the logo (including the text) are defined with purely only \fill commands. I think the 0.1 is to make that the standard size of the logo has scale 1. –  Peter Smit Nov 2 '10 at 10:48
@Peter Smit: One should also note that, according to the TikZ manual, using these low-level commands ("canvas transformations") will cause PGF to lose track of the bounding box of the picture. This explains your other question. –  Ryan Reich Nov 25 '10 at 6:50