This commit is contained in:
John Whitington 2022-12-21 16:40:13 +00:00
parent f0d503a983
commit 512122d405
3 changed files with 16 additions and 2 deletions

View File

@ -1822,6 +1822,12 @@ let strokefill () =
let strokefillevenodd () = let strokefillevenodd () =
addop Cpdfdraw.FillStrokeEvenOdd addop Cpdfdraw.FillStrokeEvenOdd
let clip () =
addop Cpdfdraw.Clip
let clipevenodd () =
addop Cpdfdraw.ClipEvenOdd
let closepath () = let closepath () =
addop Cpdfdraw.ClosePath addop Cpdfdraw.ClosePath
@ -2706,9 +2712,11 @@ and specs =
("-fillcol", Arg.String setfill, " Set fill colour"); ("-fillcol", Arg.String setfill, " Set fill colour");
("-stroke", Arg.Unit stroke, " Stroke"); ("-stroke", Arg.Unit stroke, " Stroke");
("-fill", Arg.Unit fill, " Fill"); ("-fill", Arg.Unit fill, " Fill");
("-filleo", Arg.Unit fill, " Fill, even odd"); ("-filleo", Arg.Unit fillevenodd, " Fill, even odd");
("-strokefill", Arg.Unit strokefill, " Stroke and fill"); ("-strokefill", Arg.Unit strokefill, " Stroke and fill");
("-strokefilleo", Arg.Unit strokefillevenodd, " Stroke and fill, even odd"); ("-strokefilleo", Arg.Unit strokefillevenodd, " Stroke and fill, even odd");
("-clip", Arg.Unit clip, " Clip");
("-clipeo", Arg.Unit clipevenodd, " Clip, even odd");
("-close", Arg.Unit closepath, " Close path"); ("-close", Arg.Unit closepath, " Close path");
("-thick", Arg.String setthickness, " Set stroke thickness"); ("-thick", Arg.String setthickness, " Set stroke thickness");
("-cap", Arg.String setcap, " Set cap"); ("-cap", Arg.String setcap, " Set cap");

View File

@ -27,6 +27,8 @@ type drawops =
| Stroke | Stroke
| FillStroke | FillStroke
| FillStrokeEvenOdd | FillStrokeEvenOdd
| Clip
| ClipEvenOdd
| SoftXObject of drawops list | SoftXObject of drawops list
| HardXObject of drawops list | HardXObject of drawops list
@ -58,7 +60,9 @@ let rec ops_of_drawop = function
| Stroke -> [Pdfops.Op_S] | Stroke -> [Pdfops.Op_S]
| FillStroke -> [Pdfops.Op_B] | FillStroke -> [Pdfops.Op_B]
| FillStrokeEvenOdd -> [Pdfops.Op_B'] | FillStrokeEvenOdd -> [Pdfops.Op_B']
| SetLineThickness t -> [Pdfops.Op_w t] | Clip -> [Pdfops.Op_W; Pdfops.Op_n]
| ClipEvenOdd -> [Pdfops.Op_W']
| SetLineThickness t -> [Pdfops.Op_w t; Pdfops.Op_n]
| SetLineCap c -> [Pdfops.Op_J c] | SetLineCap c -> [Pdfops.Op_J c]
| SetLineJoin j -> [Pdfops.Op_j j] | SetLineJoin j -> [Pdfops.Op_j j]
| SetMiterLimit m -> [Pdfops.Op_M m] | SetMiterLimit m -> [Pdfops.Op_M m]

View File

@ -25,6 +25,8 @@ type drawops =
| Stroke | Stroke
| FillStroke | FillStroke
| FillStrokeEvenOdd | FillStrokeEvenOdd
| Clip
| ClipEvenOdd
| SoftXObject of drawops list | SoftXObject of drawops list
| HardXObject of drawops list | HardXObject of drawops list