Renard-Block-Format-PDF

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "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::API::MuPDF::mutool" : "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",

META.yml  view on Meta::CPAN

dynamic_config: 0
generated_by: 'Dist::Zilla version 6.015, 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-Block-Format-PDF
requires:
  Cairo: '0'
  Function::Parameters: '0'
  Math::Polygon: '0'
  Math::Trig: '0'
  Moo: '0'
  MooX::HandlesVia: '0'
  POSIX: '0'
  Renard::API::MuPDF::mutool: '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'

Makefile.PL  view on Meta::CPAN

  "CONFIGURE_REQUIRES" => {
    "ExtUtils::MakeMaker" => 0
  },
  "DISTNAME" => "Renard-Block-Format-PDF",
  "LICENSE" => "perl",
  "MIN_PERL_VERSION" => "5.010",
  "NAME" => "Renard::Block::Format::PDF",
  "PREREQ_PM" => {
    "Cairo" => 0,
    "Function::Parameters" => 0,
    "Math::Polygon" => 0,
    "Math::Trig" => 0,
    "Moo" => 0,
    "MooX::HandlesVia" => 0,
    "POSIX" => 0,
    "Renard::API::MuPDF::mutool" => 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,

Makefile.PL  view on Meta::CPAN

  "VERSION" => "0.005",
  "test" => {
    "TESTS" => "t/Renard/Block/Format/PDF/*.t"
  }
);


my %FallbackPrereqs = (
  "Cairo" => 0,
  "Function::Parameters" => 0,
  "Math::Polygon" => 0,
  "Math::Trig" => 0,
  "Moo" => 0,
  "MooX::HandlesVia" => 0,
  "POSIX" => 0,
  "Renard::API::MuPDF::mutool" => 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,

lib/Renard/Block/Format/PDF/Document.pm  view on Meta::CPAN

# ABSTRACT: document that represents a PDF file
$Renard::Block::Format::PDF::Document::VERSION = '0.005';
use Moo;
use Renard::API::MuPDF::mutool;
use Renard::Block::Format::PDF::Page;
use Renard::Incunabula::Outline;
use Renard::Incunabula::Document::Types qw(PageNumber ZoomLevel);
use Renard::Incunabula::Common::Types qw(InstanceOf);

use Math::Trig;
use Math::Polygon;

use String::Tagged;

use Function::Parameters;

extends qw(Renard::Incunabula::Document);

has _raw_bounds => (
	is => 'lazy', # _build_raw_bounds
);

lib/Renard/Block/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.719 second using v1.01-cache-2.11-cpan-0a6323c29d9 )