root/trunk/jps2ps/pps/arrowpaths.pps

Revision 4, 1.2 kB (checked in by jms, 8 months ago)

Chargement de jps2ps dans le SVN.

Line 
1 %% syntaxe : arrowpaths --> depose sur la pile les 2 sous chemins
2 %% en provenance du chemin courant necessaires a gere_arrowhead
3 /arrowpaths {
4 3 dict begin
5    currentcppathobj
6    /path exch def
7 %   cvx exec
8 %   /les_xy exch def
9 %   /les_t exch def
10 %   /ell les_xy longueur def %% longueur de la courbe en picas
11 %   /ell path cpathlongueur def %% longueur de la courbe en picas
12
13    %% pour visualiser
14    %/les_XY path cpathpointstable {ptojpoint} papply def
15    %/les_t path cpathparamtable {ptojpoint} papply def
16    %les_t {les_t les_XY interpolparamfunct times} apply
17    %les_t length ==
18
19    path cpathlongueur ahlength lt {
20       50 path splitcpath
21    } {
22       0 100 .01 {
23          path cpathelongueur ahlength sub
24       } dich_solve /t1 exch def
25    
26       0 100 .01 {
27          path cpathslongueur ahlength sub
28       } dich_solve /t2 exch def
29       t2 path splitcpath pop cppathtocpath reversecpathobj
30       t1 path splitcpath exch pop cppathtocpath
31    } ifelse
32
33 %%       0 100 .01 {
34 %%          path cpathelongueur ahlength sub
35 %%       } dich_solve /t1 exch def
36 %%   
37 %%       0 100 .01 {
38 %%          path cpathslongueur ahlength sub
39 %%       } dich_solve /t2 exch def
40 %%       t2 path splitcpath pop cppathtocpath reversecpathobj
41 %%       t1 path splitcpath exch pop cppathtocpath
42
43 end
44 } def
Note: See TracBrowser for help on using the browser.