Renard-Incunabula-Format-PDF
view release on metacpan or search on metacpan
"Test::Pod::Coverage" : "1.08",
"Test::Spelling" : "0.12",
"strict" : "0",
"warnings" : "0"
}
},
"runtime" : {
"requires" : {
"Cairo" : "0",
"Function::Parameters" : "0",
"Math::Polygon" : "0",
"Math::Trig" : "0",
"Moo" : "0",
"MooX::HandlesVia" : "0",
"POSIX" : "0",
"Renard::Incunabula::Common::Setup" : "0",
"Renard::Incunabula::Common::Types" : "0",
"Renard::Incunabula::Document" : "0",
"Renard::Incunabula::Document::Types" : "0",
"Renard::Incunabula::MuPDF::mutool" : "0",
"Renard::Incunabula::Outline" : "0",
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Renard-Incunabula-Format-PDF
requires:
Cairo: '0'
Function::Parameters: '0'
Math::Polygon: '0'
Math::Trig: '0'
Moo: '0'
MooX::HandlesVia: '0'
POSIX: '0'
Renard::Incunabula::Common::Setup: '0'
Renard::Incunabula::Common::Types: '0'
Renard::Incunabula::Document: '0'
Renard::Incunabula::Document::Types: '0'
Renard::Incunabula::MuPDF::mutool: '0'
Renard::Incunabula::Outline: '0'
Makefile.PL view on Meta::CPAN
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Renard-Incunabula-Format-PDF",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.010",
"NAME" => "Renard::Incunabula::Format::PDF",
"PREREQ_PM" => {
"Cairo" => 0,
"Function::Parameters" => 0,
"Math::Polygon" => 0,
"Math::Trig" => 0,
"Moo" => 0,
"MooX::HandlesVia" => 0,
"POSIX" => 0,
"Renard::Incunabula::Common::Setup" => 0,
"Renard::Incunabula::Common::Types" => 0,
"Renard::Incunabula::Document" => 0,
"Renard::Incunabula::Document::Types" => 0,
"Renard::Incunabula::MuPDF::mutool" => 0,
"Renard::Incunabula::Outline" => 0
Makefile.PL view on Meta::CPAN
"VERSION" => "0.004",
"test" => {
"TESTS" => "t/Renard/Incunabula/Format/PDF/*.t"
}
);
my %FallbackPrereqs = (
"Cairo" => 0,
"Function::Parameters" => 0,
"Math::Polygon" => 0,
"Math::Trig" => 0,
"Moo" => 0,
"MooX::HandlesVia" => 0,
"POSIX" => 0,
"Renard::Incunabula::Common::Setup" => 0,
"Renard::Incunabula::Common::Types" => 0,
"Renard::Incunabula::Devel::TestHelper" => 0,
"Renard::Incunabula::Document" => 0,
"Renard::Incunabula::Document::Types" => 0,
"Renard::Incunabula::MuPDF::mutool" => 0,
lib/Renard/Incunabula/Format/PDF/Document.pm view on Meta::CPAN
package Renard::Incunabula::Format::PDF::Document;
# ABSTRACT: document that represents a PDF file
$Renard::Incunabula::Format::PDF::Document::VERSION = '0.004';
use Moo;
use Renard::Incunabula::MuPDF::mutool;
use Renard::Incunabula::Format::PDF::Page;
use Renard::Incunabula::Outline;
use Renard::Incunabula::Document::Types qw(PageNumber ZoomLevel);
use Math::Trig;
use Math::Polygon;
use Function::Parameters;
extends qw(Renard::Incunabula::Document);
has _raw_bounds => (
is => 'lazy', # _build_raw_bounds
);
method _build_last_page_number() :ReturnType(PageNumber) {
lib/Renard/Incunabula/Format/PDF/Document.pm view on Meta::CPAN
);
}
method _build_identity_bounds() {
my $compute_rotate_dim = sub {
my ($info) = @_;
my $theta_deg = $info->{rotate} // 0;
my $theta_rad = $theta_deg * pi / 180;
my ($x, $y) = ($info->{x}, $info->{y});
my $poly = Math::Polygon->new(
points => [
[0, 0],
[$x, 0],
[$x, $y],
[0, $y],
],
);
my $rotated_poly = $poly->rotate(
degrees => $theta_deg,
( run in 0.425 second using v1.01-cache-2.11-cpan-0a6323c29d9 )