Skip to content

Commit

Permalink
further tweak current-point #28
Browse files Browse the repository at this point in the history
After re-read of PDF 2.0 8.5.2.1 If there's no current point the
current-point should be undefined.
  • Loading branch information
dwarring committed Dec 8, 2024
1 parent 8a7cfe9 commit da2e24a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/PDF/Content/Ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ method current-point() returns List

return current point

This method returns the x,y position of current point in a path context, or an empty list otherwise
This method returns the x,y position of current point in a path context, or an undefined list otherwise.

### multi method op

Expand Down
4 changes: 2 additions & 2 deletions lib/PDF/Content/Ops.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ method current-point is rw returns List {
sub FETCH($) {
$!context == Path
?? ($!cur-x, $!cur-y)
!! ()
!! List
}
sub STORE($, Vector \v) {
unless $!context == Path && $!cur-x =~= v[0] && $!cur-x =~= v[1] {
Expand All @@ -894,7 +894,7 @@ method current-point is rw returns List {
}
Proxy.new: :&FETCH, :&STORE;
}
=para This method returns the x,y position of current point in a path context, or an empty list otherwise
=para This method returns the x,y position of current point in a path context, or an undefined list otherwise.
#| process operator quarantined by PDF::Grammar::Content / PDF::Native::COS as either an
#| unknown operator or having an incorrect argument list
Expand Down

0 comments on commit da2e24a

Please sign in to comment.