From 1e3de98b8ade472a661d9749585b24fe9f45c18d Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de> Date: Sat, 18 Mar 2017 12:32:05 +0100 Subject: [PATCH] Rigorous simplification of box macros. itest/p2d to generate 2D plot. --- pub/itest/p2d.f2t | 6 +++++ pub/plot/ps_plotter.cpp | 2 +- pub/share/wups17a.ps | 55 +++++++++++------------------------------ 3 files changed, 21 insertions(+), 42 deletions(-) create mode 100755 pub/itest/p2d.f2t diff --git a/pub/itest/p2d.f2t b/pub/itest/p2d.f2t new file mode 100755 index 00000000..ce0262ce --- /dev/null +++ b/pub/itest/p2d.f2t @@ -0,0 +1,6 @@ +#!/usr/bin/env frida +fl grid40x20 +gt+ +p +gp! ~/P.ps +qui diff --git a/pub/plot/ps_plotter.cpp b/pub/plot/ps_plotter.cpp index eb2acfcf..65b8f3d1 100644 --- a/pub/plot/ps_plotter.cpp +++ b/pub/plot/ps_plotter.cpp @@ -221,7 +221,7 @@ namespace { string ps_colorscale() { - return "%TODO colorscale\n"; + return "pop %TODO colorscale\n"; } string ps_slice_header( diff --git a/pub/share/wups17a.ps b/pub/share/wups17a.ps index a3947bef..676d3805 100644 --- a/pub/share/wups17a.ps +++ b/pub/share/wups17a.ps @@ -690,7 +690,7 @@ WuGdict17a begin black } def /BoxBackground { - 0 0 10 10 boxit gsave setboxbackgroundcolor fill grestore + 0 10 0 10 rect gsave setboxbackgroundcolor fill grestore } def /setboxbackgroundcolor { white } def @@ -1232,8 +1232,7 @@ WuGdict17a begin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /t2d { - icCol - { fill } execRectangle3 + icCol rect fill black } def @@ -1338,17 +1337,19 @@ WuGdict17a begin %% Boxes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -/boxLLHH { % xl yl xh yh | - %%% INCOMPATIBLE with boxit, contains cp - 4 copy 8 copy - pop pop np mv - 3 1 roll pop pop li - li pop pop - 4 1 roll exch li pop pop +/rect { % xl xh yl yh | - [path -> rectangle] + ym /qqyh x def + ym /qqyl x def + xm /qqxh x def + xm /qqxl x def + np + qqxl qqyl mv + qqxh qqyl li + qqxh qqyh li + qqxl qqyh li cp } def -/execOval2 { % xl xh yl yh dr { proc } | - - gsave - 6 1 roll +/oval { % xl xh yl yh dr | - [path -> oval] fm /qqdr x def ym /qqyh x def ym /qqyl x def @@ -1363,35 +1364,7 @@ WuGdict17a begin qqxh qqdr sub qqyl qqdr add qqdr 0 -90 arcn qqxl qqdr add qqyl li qqxl qqdr add qqyl qqdr add qqdr -90 -180 arcn - cp exec grestore - } def -/execRectangle3 { % xl xh yl yh {proc} | - - 5 1 roll - gsave - ym /qqyh x def - ym /qqyl x def - xm /qqxh x def - xm /qqxl x def - np - qqxl qqyl mv - qqxh qqyl li - qqxh qqyh li - qqxl qqyh li - cp exec grestore - } def -/coordRectangle { % xl xh yl yh (all in plot coords) {proc} | - - 5 1 roll - gsave - /qqyh x def - /qqyl x def - /qqxh x def - /qqxl x def - np - qqxl xm qqyl ym mv - qqxh xm qqyl ym li - qqxh xm qqyh ym li - qqxl xm qqyh ym li - cp exec grestore + cp } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- GitLab