Fossil SCM

Add new example pikchr to /pikchrshow.

stephan 2023-08-30 19:21 trunk
Commit ff1c48a9bfbd48db9ccc8de947c0ed0b2d7c348514a2276da659b0d07d949e43
--- src/fossil.page.pikchrshowasm.js
+++ src/fossil.page.pikchrshowasm.js
@@ -61,11 +61,11 @@
6161
zoneInputButtons: E('.zone-wrapper.input > legend > .button-bar'),
6262
zoneOutputButtons: E('.zone-wrapper.output > legend > .button-bar'),
6363
outText: E('#pikchr-output-text'),
6464
pikOutWrapper: E('#pikchr-output-wrapper'),
6565
pikOut: E('#pikchr-output'),
66
- btnRender: E('#btn-render')
66
+ btnRender: E('#btn-render')
6767
},
6868
renderModes: ['svg'/*SVG must be at index 0*/,'markdown', 'wiki', 'text'],
6969
renderModeLabels: {
7070
svg: 'SVG', markdown: 'Markdown', wiki: 'Fossil Wiki', text: 'Text'
7171
},
@@ -677,10 +677,48 @@
677677
text "HIGH" big bold "QUALITY" big bold at 0.9 heading -120 from O color blue
678678
679679
text "EXPENSIVE" at 0.55 below O color cyan
680680
text "SLOW" at 0.55 heading -60 from O color magenta
681681
text "POOR" "QUALITY" at 0.55 heading 60 from O color gold
682
+`},{name:"Precision Arrows",code:`
683
+# Source: https://pikchr.org/home/forumpost/7f2f9a03eb
684
+define quiver {
685
+ dot invis at 0.5 < $1.ne , $1.e >
686
+ dot invis at 0.5 < $1.nw , $1.w >
687
+ dot invis at 0.5 < $1.se , $1.e >
688
+ dot invis at 0.5 < $1.sw , $1.w >
689
+
690
+ dot at $2 right of 4th previous dot
691
+ dot at $3 right of 4th previous dot
692
+ dot at $4 right of 4th previous dot
693
+ dot at $5 right of 4th previous dot
694
+ arrow <- from previous dot to 2nd previous dot
695
+ arrow -> from 3rd previous dot to 4th previous dot
696
+}
697
+
698
+define show_compass_l {
699
+ dot color red at $1.e " .e" ljust
700
+ dot same at $1.ne " .ne" ljust above
701
+ line thick color green from previous to 2nd last dot
702
+}
703
+
704
+define show_compass_r {
705
+ dot color red at $1.w " .w" ljust
706
+ dot same at $1.nw " .nw" ljust above
707
+ line thick color green from previous to 2nd last dot
708
+}
709
+
710
+PROGRAM: file "Program" rad 45px
711
+show_compass_l(PROGRAM)
712
+QUIVER: box invis ht 0.75
713
+DATABASE: oval "Database" ht 0.75 wid 1.1
714
+show_compass_r(DATABASE)
715
+
716
+quiver(QUIVER, 5px, -5px, 5px, 0px)
717
+
718
+text "Query" with .c at 0.1in above last arrow
719
+text "Records" with .c at 0.1in below 2nd last arrow
682720
`}
683721
];
684722
685723
686724
})(window.fossil);
687725
--- src/fossil.page.pikchrshowasm.js
+++ src/fossil.page.pikchrshowasm.js
@@ -61,11 +61,11 @@
61 zoneInputButtons: E('.zone-wrapper.input > legend > .button-bar'),
62 zoneOutputButtons: E('.zone-wrapper.output > legend > .button-bar'),
63 outText: E('#pikchr-output-text'),
64 pikOutWrapper: E('#pikchr-output-wrapper'),
65 pikOut: E('#pikchr-output'),
66 btnRender: E('#btn-render')
67 },
68 renderModes: ['svg'/*SVG must be at index 0*/,'markdown', 'wiki', 'text'],
69 renderModeLabels: {
70 svg: 'SVG', markdown: 'Markdown', wiki: 'Fossil Wiki', text: 'Text'
71 },
@@ -677,10 +677,48 @@
677 text "HIGH" big bold "QUALITY" big bold at 0.9 heading -120 from O color blue
678
679 text "EXPENSIVE" at 0.55 below O color cyan
680 text "SLOW" at 0.55 heading -60 from O color magenta
681 text "POOR" "QUALITY" at 0.55 heading 60 from O color gold
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
682 `}
683 ];
684
685
686 })(window.fossil);
687
--- src/fossil.page.pikchrshowasm.js
+++ src/fossil.page.pikchrshowasm.js
@@ -61,11 +61,11 @@
61 zoneInputButtons: E('.zone-wrapper.input > legend > .button-bar'),
62 zoneOutputButtons: E('.zone-wrapper.output > legend > .button-bar'),
63 outText: E('#pikchr-output-text'),
64 pikOutWrapper: E('#pikchr-output-wrapper'),
65 pikOut: E('#pikchr-output'),
66 btnRender: E('#btn-render')
67 },
68 renderModes: ['svg'/*SVG must be at index 0*/,'markdown', 'wiki', 'text'],
69 renderModeLabels: {
70 svg: 'SVG', markdown: 'Markdown', wiki: 'Fossil Wiki', text: 'Text'
71 },
@@ -677,10 +677,48 @@
677 text "HIGH" big bold "QUALITY" big bold at 0.9 heading -120 from O color blue
678
679 text "EXPENSIVE" at 0.55 below O color cyan
680 text "SLOW" at 0.55 heading -60 from O color magenta
681 text "POOR" "QUALITY" at 0.55 heading 60 from O color gold
682 `},{name:"Precision Arrows",code:`
683 # Source: https://pikchr.org/home/forumpost/7f2f9a03eb
684 define quiver {
685 dot invis at 0.5 < $1.ne , $1.e >
686 dot invis at 0.5 < $1.nw , $1.w >
687 dot invis at 0.5 < $1.se , $1.e >
688 dot invis at 0.5 < $1.sw , $1.w >
689
690 dot at $2 right of 4th previous dot
691 dot at $3 right of 4th previous dot
692 dot at $4 right of 4th previous dot
693 dot at $5 right of 4th previous dot
694 arrow <- from previous dot to 2nd previous dot
695 arrow -> from 3rd previous dot to 4th previous dot
696 }
697
698 define show_compass_l {
699 dot color red at $1.e " .e" ljust
700 dot same at $1.ne " .ne" ljust above
701 line thick color green from previous to 2nd last dot
702 }
703
704 define show_compass_r {
705 dot color red at $1.w " .w" ljust
706 dot same at $1.nw " .nw" ljust above
707 line thick color green from previous to 2nd last dot
708 }
709
710 PROGRAM: file "Program" rad 45px
711 show_compass_l(PROGRAM)
712 QUIVER: box invis ht 0.75
713 DATABASE: oval "Database" ht 0.75 wid 1.1
714 show_compass_r(DATABASE)
715
716 quiver(QUIVER, 5px, -5px, 5px, 0px)
717
718 text "Query" with .c at 0.1in above last arrow
719 text "Records" with .c at 0.1in below 2nd last arrow
720 `}
721 ];
722
723
724 })(window.fossil);
725

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button