|
Revision 4, 1.3 kB
(checked in by jms, 8 months ago)
|
Chargement de jps2ps dans le SVN.
|
| Line | |
|---|
| 1 |
%%%%%%%%%%%%%%%% les deplacements a l echelle %%%%%%%%%%%%%%%%%%% |
|---|
| 2 |
|
|---|
| 3 |
/v@ct_I {xunit 0} def |
|---|
| 4 |
/v@ct_J {angle_repere cos yunit mul angle_repere sin yunit mul} def |
|---|
| 5 |
|
|---|
| 6 |
/xscale {} def |
|---|
| 7 |
/yscale {} def |
|---|
| 8 |
|
|---|
| 9 |
/xscale-1 {} def |
|---|
| 10 |
/yscale-1 {} def |
|---|
| 11 |
|
|---|
| 12 |
/gtransform {} def |
|---|
| 13 |
/gtransform-1 {} def |
|---|
| 14 |
|
|---|
| 15 |
/jtoppoint { |
|---|
| 16 |
2 dict begin |
|---|
| 17 |
gtransform |
|---|
| 18 |
/y exch yscale def |
|---|
| 19 |
/x exch xscale def |
|---|
| 20 |
v@ct_I x mulv |
|---|
| 21 |
v@ct_J y mulv |
|---|
| 22 |
addv |
|---|
| 23 |
end |
|---|
| 24 |
} def |
|---|
| 25 |
|
|---|
| 26 |
/rptojpoint { |
|---|
| 27 |
xtranslate ytranslate |
|---|
| 28 |
3 1 roll %% xA yB yA xB |
|---|
| 29 |
4 1 roll %% xB xA yB yA |
|---|
| 30 |
sub neg 3 1 roll %% yB-yA xB xA |
|---|
| 31 |
sub neg exch |
|---|
| 32 |
ptojpoint |
|---|
| 33 |
} def |
|---|
| 34 |
|
|---|
| 35 |
/rptoppoint { |
|---|
| 36 |
xtranslate ytranslate |
|---|
| 37 |
3 1 roll %% xA yB yA xB |
|---|
| 38 |
4 1 roll %% xB xA yB yA |
|---|
| 39 |
sub neg 3 1 roll %% yB-yA xB xA |
|---|
| 40 |
sub neg exch |
|---|
| 41 |
} def |
|---|
| 42 |
|
|---|
| 43 |
/ptojpoint { |
|---|
| 44 |
4 dict begin |
|---|
| 45 |
/Y exch yscale-1 def |
|---|
| 46 |
/X exch xscale-1 def |
|---|
| 47 |
/y Y yunit angle_repere sin mul div def |
|---|
| 48 |
/x X y yunit mul angle_repere cos mul sub xunit div def |
|---|
| 49 |
x y |
|---|
| 50 |
gtransform-1 |
|---|
| 51 |
end |
|---|
| 52 |
} def |
|---|
| 53 |
|
|---|
| 54 |
/smoveto { |
|---|
| 55 |
jtoppoint |
|---|
| 56 |
moveto |
|---|
| 57 |
} def |
|---|
| 58 |
|
|---|
| 59 |
/srmoveto { |
|---|
| 60 |
jtoppoint |
|---|
| 61 |
rmoveto |
|---|
| 62 |
} def |
|---|
| 63 |
|
|---|
| 64 |
/slineto { |
|---|
| 65 |
jtoppoint |
|---|
| 66 |
lineto |
|---|
| 67 |
} def |
|---|
| 68 |
|
|---|
| 69 |
/srlineto { |
|---|
| 70 |
jtoppoint |
|---|
| 71 |
rlineto |
|---|
| 72 |
} def |
|---|
| 73 |
|
|---|
| 74 |
/stranslate { |
|---|
| 75 |
jtoppoint |
|---|
| 76 |
translate |
|---|
| 77 |
} def |
|---|
| 78 |
|
|---|
| 79 |
/jtopnumber { |
|---|
| 80 |
dup jtoppoint pop |
|---|
| 81 |
} def |
|---|
| 82 |
|
|---|
| 83 |
/ptojnumber { |
|---|
| 84 |
dup ptojpoint pop |
|---|
| 85 |
} def |
|---|
| 86 |
|
|---|
| 87 |
/coords { |
|---|
| 88 |
jtoppoint |
|---|
| 89 |
} def |
|---|
| 90 |
|
|---|