Allow units in ChopH/ChopV

This commit is contained in:
John Whitington 2024-08-31 19:06:48 +01:00
parent a17bd08e4f
commit d576946270
1 changed files with 4 additions and 4 deletions

View File

@ -1652,10 +1652,10 @@ let setchop s =
setop (Chop (int_of_float x, int_of_float y)) () setop (Chop (int_of_float x, int_of_float y)) ()
let setchopv x = let setchopv x =
setop (ChopHV (false, x)) () setop (ChopHV (false, Cpdfcoord.parse_single_number (Pdf.empty ()) x)) ()
let setchoph y = let setchoph y =
setop (ChopHV (true, y)) () setop (ChopHV (true, Cpdfcoord.parse_single_number (Pdf.empty ()) y)) ()
let setreplacedictentry s = let setreplacedictentry s =
setop (ReplaceDictEntry s) () setop (ReplaceDictEntry s) ()
@ -2311,10 +2311,10 @@ and specs =
Arg.String setchop, Arg.String setchop,
" Chop x by y"); " Chop x by y");
("-chop-h", ("-chop-h",
Arg.Float setchoph, Arg.String setchoph,
" Chop horizontally"); " Chop horizontally");
("-chop-v", ("-chop-v",
Arg.Float setchopv, Arg.String setchopv,
" Chop horizontally"); " Chop horizontally");
("-chop-columns", ("-chop-columns",
Arg.Unit (fun () -> args.impose_columns <- true), Arg.Unit (fun () -> args.impose_columns <- true),