Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions test/baseline/psxy.dvc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
outs:
- md5: 7b323ca3e95771d2e957825b6200bff0.dir
- md5: fd04135cb8226c86f8f109e5dca463fe.dir
nfiles: 147
path: psxy
hash: md5
size: 9545412
14 changes: 12 additions & 2 deletions test/psxy/bezier_demo_quadratic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Test Q (quadratic Bezier) command in custom symbol macro language.
# Uses share/custom/leaf.def (closed leaf shape from two Q curves)
# and @qbezier_test.def (open parabolic arc).
# and qbezier_test.def (open parabolic arc).

ps=bezier_demo_quadratic.ps

Expand All @@ -15,9 +15,18 @@ for lon in -4 -2 0 2 4; do
echo "$lon -2" | gmt psxy -R -J -Skleaf/2.5c -Gdarkgreen -W1p,black -O -K >> $ps
done

cat > qbezier_test.def << EOF
# Test quadratic Bezier Q command
# Draws a simple parabolic arc from (-0.5,0) to (0.5,0) curving up to (0,0.5)
# M = moveto start, Q = quadratic bezier, S = stroke
-0.5 0.0 M
0.0 0.5 0.5 0.0 Q
S
EOF

# Parabolic arc symbol (open path, just stroked)
for lon in -3 -1 1 3; do
echo "$lon 3.2" | gmt psxy -R -J -Sk@qbezier_test/1.5c -W1.5p,red -O -K >> $ps
echo "$lon 3.2" | gmt psxy -R -J -Skqbezier_test/1.5c -W1.5p,red -O -K >> $ps
done

# Labels
Expand All @@ -29,3 +38,4 @@ gmt pstext -R -J -F+f9p+jCM -O >> $ps << EOF
0 0.7 2.0c leaves
0 -1.3 2.5c leaves
EOF
rm qbezier_test.def
6 changes: 6 additions & 0 deletions test/psxy/qbezier_test.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Test quadratic Bezier Q command
# Draws a simple parabolic arc from (-0.5,0) to (0.5,0) curving up to (0,0.5)
# M = moveto start, Q = quadratic bezier, S = stroke
-0.5 0.0 M
0.0 0.5 0.5 0.0 Q
S
Loading