Skip to content

Commit

Permalink
Use Rakudo built-in are() method
Browse files Browse the repository at this point in the history
  • Loading branch information
dwarring committed Jan 1, 2025
1 parent 9f7b748 commit 850e223
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion META6.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"build-depends": [
],
"depends": [
"are",
"Base64::Native",
"Color",
"Compress::Zlib::Raw",
Expand Down
3 changes: 1 addition & 2 deletions lib/PDF/Content.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ use PDF::Content::Font;
use PDF::Content::Font::CoreFont;
use PDF::Content::FontObj;
use X::PDF::Content;
use are;

has Str $.actual-text is rw;

Expand All @@ -56,7 +55,7 @@ my subset Valign of Str where 'top' | 'center' | 'bottom';
my subset XPos-Pair of Pair where {.key ~~ Align && .value ~~ Numeric}
my subset YPos-Pair of Pair where {.key ~~ Valign && .value ~~ Numeric}
my subset Position of List where { .elems <= 2 }
my subset Vector of Position where { .&are ~~ Numeric }
my subset Vector of Position where { .are ~~ Numeric }

#| Add a graphics block
method graphics( &meth! ) {
Expand Down
3 changes: 1 addition & 2 deletions lib/PDF/Content/Ops.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ use PDF::Content::Matrix :inverse, :multiply, :is-identity, :TransformMatrix;
use PDF::Content::Tag;
use X::PDF::Content;
use JSON::Fast;
use are;

has Block @.callback is rw;
has Pair @.ops;
Expand Down Expand Up @@ -879,7 +878,7 @@ method is-graphics-op($op-name) {
$op-name GraphicsOps;
}

my subset Vector of List is export(:Vector) where {.elems == 2 && .&are ~~ Numeric}
my subset Vector of List is export(:Vector) where {.elems == 2 && .are ~~ Numeric}
#| return current point
method current-point is rw returns List {
sub FETCH($) {
Expand Down

0 comments on commit 850e223

Please sign in to comment.