I try to create some symbols from bc-logo with pgf. These symbols are defined in .mps file. I have some difficulties with
0 0.19284 dtransform truncate idtransform setlinewidth
pop [] 0 setdash 1 setlinejoin
10 setmiterlimit
I understand some parts but I can't translate this expression with some commands from th system base layer of pgf.
About these functions : for example it's possible to write and the to compile with pdflatex:
\includegraphics[height=3in]{/Users/ego/Desktop/latex/bclogo/latex/bc-dfrance.mps}
You can find this file here : bc-logo So I suppose that the postscript functions used in the bc-dfrance.mps are also PDF functions.
Another function that I found in this file is rlineto. I would like to know if there is an equivalent function in the basic layer of PGF (not in tikz because we can use relative coordinates)
Here a part of my work, I can't use something like scale=2 for example because \pgfsetlinewidth{10pt} are never modified. I think the code below is useful to set up the line width. I need to do the same thing with \pgflinewidth. Is it correct ?
\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\begin{document}
\includegraphics[height=3in]{/Users/ego/Desktop/latex/bclogo/latex/bc-dfrance.mps}
\begin{tikzpicture}[scale=10]
\def\i{\pgfusepath{clip}}
\let\o\pgfpathclose
\let\s\pgfusepathqfillstroke
\def\f{\pgfusepath{fill}}
\def\p #1#2{\pgfqpoint{#1bp}{#2bp}}
\def\m #1 #2 {\pgfpathmoveto{\p{#1}{#2}}}
\def\r #1 #2 #3 #4 {\pgfpathrectangle{\p{#1}{#2}}{\p{#3}{#4}}}
\def\l #1 #2 {\pgfpathlineto{\p{#1}{#2}}}
\def\c #1 #2 #3 #4 #5 #6 {%
\pgfpathcurveto{\p{#1}{#2}}{\p{#3}{#4}}{\p{#5}{#6}}}%
\definecolor{cola}{rgb}{0,0.13672,0.58203}
\definecolor{colb}{rgb}{1,1,1}
\definecolor{colc}{rgb}{ 0.92578,0.16016,0.22266}
\definecolor{cold}{rgb}{ 0,0,0}
\m 69.29587 697.21698
\l 86.23233 697.21698
\l 86.23233 676.1185
\l 69.29587 676.1185
\i
\m 69.68298 690.30095
\l 69.68298 695.78268
\l 70.17444 695.84264
\l 70.63571 695.88812
\l 71.07422 695.91524
\l 71.4901 695.92976
\l 71.88321 695.93361
\l 72.25758 695.92297
\l 72.60909 695.90366
\l 72.94183 695.87366
\l 73.25937 695.832
\l 73.55804 695.78268
\l 73.84538 695.72556
\l 74.11375 695.66171
\l 74.37468 695.59395
\l 74.62419 695.52135
\l 74.86237 695.44586
\l 75.0929 695.36263
\l 75.31598 695.28323
\l 75.53151 695.19711
\l 75.71677 695.12451
\l 75.71677 684.15721
\l 75.53151 684.2288
\l 75.31598 684.31204
\l 75.0929 684.39526
\l 74.86237 684.4785
\l 74.62419 684.554
\l 74.37468 684.62659
\l 74.11375 684.69435
\l 73.84538 684.75821
\l 73.55804 684.81532
\l 73.25937 684.86472
\l 72.94183 684.90245
\l 72.60909 684.93631
\l 72.25758 684.95467
\l 71.88321 684.96631
\l 71.4901 684.96242
\l 71.07422 684.94794
\l 70.63571 684.91693
\l 70.17444 684.87534
\l 69.68298 684.81532
\pgfsetfillcolor{cola}%
\o
\f
\m 75.72807 689.63504
\l 75.74318 695.11388
\l 75.95117 695.03065
\l 76.15906 694.95132
\l 76.36316 694.87193
\l 76.56737 694.79259
\l 76.77525 694.72
\l 76.98703 694.65614
\l 77.19867 694.59222
\l 77.41798 694.539
\l 77.64485 694.49352
\l 77.87924 694.45193
\l 78.1212 694.42577
\l 78.37448 694.40639
\l 78.6391 694.40254
\l 78.91888 694.40639
\l 79.20999 694.42577
\l 79.51622 694.45576
\l 79.83754 694.50516
\l 80.1816 694.56902
\l 80.54076 694.64835
\l 80.65031 694.67451
\l 80.65031 683.70715
\l 80.54076 683.68105
\l 80.1816 683.59781
\l 79.83754 683.5378
\l 79.51622 683.48848
\l 79.20999 683.45456
\l 78.91888 683.43909
\l 78.6391 683.43135
\l 78.37448 683.43909
\l 78.1212 683.45847
\l 77.87924 683.48457
\l 77.64485 683.52232
\l 77.41798 683.5717
\l 77.19867 683.62392
\l 76.98703 683.68494
\l 76.77525 683.75264
\l 76.56737 683.82524
\l 76.36316 683.90463
\l 76.15906 683.98012
\l 75.95117 684.06335
\l 75.71677 684.15721
\pgfsetfillcolor{colb}%
\o
\f
\m 80.65031 689.19278
\l 80.65031 694.67451
\l 80.92256 694.74321
\l 81.3271 694.86035
\l 81.75052 694.9958
\l 82.20036 695.15163
\l 82.67673 695.32872
\l 83.1795 695.52519
\l 83.70882 695.74878
\l 84.26831 695.99463
\l 84.85811 696.2627
\l 85.48186 696.55788
\l 86.13591 696.88306
\l 86.13591 685.91187
\l 85.48186 685.59058
\l 84.85811 685.29533
\l 84.26831 685.02344
\l 83.70882 684.78148
\l 83.1795 684.55789
\l 82.67673 684.36142
\l 82.20036 684.18433
\l 81.75052 684.0285
\l 81.3271 683.89299
\l 80.92256 683.77591
\l 80.65031 683.70715
\pgfsetfillcolor{colc}%
\o
\f
\pgfsetlinewidth{2pt}% this is a problem when i scale the picture
\m 69.68298 690.30095
\l 69.68298 695.78268
\l 70.17444 695.84264
\l 70.63571 695.88812
\l 71.07422 695.91524
\l 71.4901 695.92976
\l 71.88321 695.93361
\l 72.25758 695.92297
\l 72.60909 695.90366
\l 72.94183 695.87366
\l 73.25937 695.832
\l 73.55804 695.78268
\l 73.84538 695.72556
\l 74.11375 695.66171
\l 74.37468 695.59395
\l 74.62419 695.52135
\l 74.86237 695.44586
\l 75.0929 695.36263
\l 75.31598 695.28323
\l 75.53151 695.19711
\l 75.74318 695.11388
\l 75.95117 695.03065
\l 76.15906 694.95132
\l 76.36316 694.87193
\l 76.56737 694.79259
\l 76.77525 694.72
\l 76.98703 694.65614
\l 77.19867 694.59222
\l 77.41798 694.539
\l 77.64485 694.49352
\l 77.87924 694.45193
\l 78.1212 694.42577
\l 78.37448 694.40639
\l 78.6391 694.40254
\l 78.91888 694.40639
\l 79.20999 694.42577
\l 79.51622 694.45576
\l 79.83754 694.50516
\l 80.1816 694.56902
\l 80.54076 694.64835
\l 80.92256 694.74321
\l 81.3271 694.86035
\l 81.75052 694.9958
\l 82.20036 695.15163
\l 82.67673 695.32872
\l 83.1795 695.52519
\l 83.70882 695.74878
\l 84.26831 695.99463
\l 84.85811 696.2627
\l 85.48186 696.55788
\l 86.13591 696.88306
\l 86.13591 685.91187
\l 85.48186 685.59058
\l 84.85811 685.29533
\l 84.26831 685.02344
\l 83.70882 684.78148
\l 83.1795 684.55789
\l 82.67673 684.36142
\l 82.20036 684.18433
\l 81.75052 684.0285
\l 81.3271 683.89299
\l 80.92256 683.77591
\l 80.54076 683.68105
\l 80.1816 683.59781
\l 79.83754 683.5378
\l 79.51622 683.48848
\l 79.20999 683.45456
\l 78.91888 683.43909
\l 78.6391 683.43135
\l 78.37448 683.43909
\l 78.1212 683.45847
\l 77.87924 683.48457
\l 77.64485 683.52232
\l 77.41798 683.5717
\l 77.19867 683.62392
\l 76.98703 683.68494
\l 76.77525 683.75264
\l 76.56737 683.82524
\l 76.36316 683.90463
\l 76.15906 683.98012
\l 75.95117 684.06335
\l 75.74318 684.14658
\l 75.53151 684.2288
\l 75.31598 684.31204
\l 75.0929 684.39526
\l 74.86237 684.4785
\l 74.62419 684.554
\l 74.37468 684.62659
\l 74.11375 684.69435
\l 73.84538 684.75821
\l 73.55804 684.81532
\l 73.25937 684.86472
\l 72.94183 684.90245
\l 72.60909 684.93631
\l 72.25758 684.95467
\l 71.88321 684.96631
\l 71.4901 684.96242
\l 71.07422 684.94794
\l 70.63571 684.91693
\l 70.17444 684.87534
\l 69.68298 684.81532
\pgfsetfillcolor{cold}%
\pgfusepath{stroke}%
\pgfsetlinewidth{10pt}% not fine big problem when I scale
\m 69.68298 676.50563
\l 69.68298 696.82983
\pgfusepath{stroke}
\end{tikzpicture}
\end{document}

Because I don't understand some functions, I get a problem with the width of the lines. I can't scale properly the flag. I can find a personal method but it will be more easy to translate directly the postscript functions with pgf commands.



dtransformis on page 574 of adobe.com/products/postscript/pdfs/PLRM.pdf it translates the specified vector by the current transformation matrix in the graphics state. – David Carlisle Jun 1 '12 at 8:34