use
vars
qw(@ISA $VERSION)
;
@ISA
=
qw(PDF::API2::Gfx PDF::API2::Text PDF::API2::Content)
;
(
$VERSION
) =
'$Revisioning: 0.3a11 $'
=~ /\
$Revisioning
:\s+([^\s]+)/;
sub
new {
my
(
$class
)=
@_
;
my
$self
= PDF::API2::Content::new(
@_
);
$self
->{
' font'
}=
undef
;
$self
->{
' fontsize'
}=0;
$self
->{
' charspace'
}=0;
$self
->{
' hspace'
}=100;
$self
->{
' wordspace'
}=0;
$self
->{
' lead'
}=0;
$self
->{
' rise'
}=0;
$self
->{
' render'
}=0;
$self
->{
' matrix'
}=[1,0,0,1,0,0];
$self
->{
' fillcolor'
}=[0];
$self
->{
' strokecolor'
}=[0];
$self
->{
' translate'
}=[0,0];
$self
->{
' scale'
}=[1,1];
$self
->{
' skew'
}=[0,0];
$self
->{
' rotate'
}=0;
return
(
$self
);
}
sub
matrix {
my
(
$self
,
$a
,
$b
,
$c
,
$d
,
$e
,
$f
)=
@_
;
if
(
$self
->{
' apiistext'
} == 1) {
return
PDF::API2::Text::matrix(
@_
);
}
else
{
$self
->add(floats(
$a
,
$b
,
$c
,
$d
,
$e
,
$f
),
'cm'
);
}
return
(
$self
);
}
sub
outobjdeep {
my
(
$self
) =
@_
;
foreach
my
$k
(
qw/ api apipdf apipage font fontsize charspace hspace wordspace lead rise render matrix fillcolor strokecolor translate scale skew rotate /
) {
$self
->{
" $k"
}=
undef
;
delete
(
$self
->{
" $k"
});
}
PDF::API2::Content::outobjdeep(
@_
);
}
sub
transform {
my
(
$self
)=
@_
;
if
(
$self
->{
' apiistext'
} != 1) {
PDF::API2::Content::transform(
@_
);
}
else
{
PDF::API2::Text::transform(
@_
);
}
return
(
$self
);
}
sub
textstart {
my
(
$self
)=
@_
;
if
(!
defined
(
$self
->{
' apiistext'
}) ||
$self
->{
' apiistext'
} != 1) {
$self
->add(
' BT '
);
$self
->{
' apiistext'
}=1;
$self
->{
' font'
}=
undef
;
$self
->{
' fontsize'
}=0;
$self
->{
' charspace'
}=0;
$self
->{
' hspace'
}=100;
$self
->{
' wordspace'
}=0;
$self
->{
' lead'
}=0;
$self
->{
' rise'
}=0;
$self
->{
' render'
}=0;
@{
$self
->{
' matrix'
}}=(1,0,0,1,0,0);
@{
$self
->{
' fillcolor'
}}=(0);
@{
$self
->{
' strokecolor'
}}=(0);
@{
$self
->{
' translate'
}}=(0,0);
@{
$self
->{
' scale'
}}=(1,1);
@{
$self
->{
' skew'
}}=(0,0);
$self
->{
' rotate'
}=0;
}
return
(
$self
);
}
sub
textend {
my
(
$self
)=
@_
;
if
(
$self
->{
' apiistext'
} == 1) {
$self
->add(
' ET '
);
$self
->{
' apiistext'
}=0;
}
return
(
$self
);
}
1;