| 1 | package PDF::API2::Resource::XObject; | ||||||||||
| 2 | |||||||||||
| 3 | 38 | ▶ | use base 'PDF::API2::Resource'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 38 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 38 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 38 | our $VERSION = '2.044'; # VERSION | |||||||||
| 9 | |||||||||||
| 10 | 38 | ▶ | use PDF::API2::Basic::PDF::Utils; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | =head1 NAME | ||||||||||
| 13 | |||||||||||
| 14 | PDF::API2::Resource::XObject - Base class for external objects | ||||||||||
| 15 | |||||||||||
| 16 | =head1 METHODS | ||||||||||
| 17 | |||||||||||
| 18 | =over | ||||||||||
| 19 | |||||||||||
| 20 | =item $xobject = PDF::API2::Resource::XObject->new($pdf, $name) | ||||||||||
| 21 | |||||||||||
| 22 | Creates an XObject resource. | ||||||||||
| 23 | |||||||||||
| 24 | =cut | ||||||||||
| 25 | |||||||||||
| 26 | sub new { | ||||||||||
| 27 | 28 | ▶ | my ($class, $pdf, $name) = @_; | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 28 | 28 | my $self = $class->SUPER::new($pdf, $name); | |||||||||
| 29 | |||||||||||
| 30 | 28 | $self->type('XObject'); | |||||||||
| 31 | |||||||||||
| 32 | 28 | return $self; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | =item $type = $xobject->subtype($type) | ||||||||||
| 36 | |||||||||||
| 37 | Get or set the Subtype of the XObject resource. | ||||||||||
| 38 | |||||||||||
| 39 | =cut | ||||||||||
| 40 | |||||||||||
| 41 | sub subtype { | ||||||||||
| 42 | 28 | ▶ | my $self = shift(); | ||||||||
|
Subroutine
subtype: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 43 | 28 | ▶ | if (scalar @_) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 44 | 28 | $self->{'Subtype'} = PDFName(shift()); | |||||||||
| 45 | } | ||||||||||
| 46 | 28 | return $self->{'Subtype'}->val(); | |||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | =back | ||||||||||
| 50 | |||||||||||
| 51 | =cut | ||||||||||
| 52 | |||||||||||
| 53 | 38 | 1; | |||||||||