CAM-PDF
view release on metacpan or search on metacpan
lib/CAM/PDF/GS.pm view on Meta::CPAN
}
=item $self->Td($x, $y)
=cut
sub Td
{
my $self = shift;
my $x = shift;
my $y = shift;
$self->applyMatrix([1,0,0,1,$x,$y], $self->{Tlm});
@{$self->{Tm}} = @{$self->{Tlm}};
return;
}
=item $self->TD($x, $y)
=cut
sub TD
{
my $self = shift;
my $x = shift;
my $y = shift;
$self->TL(-$y);
$self->Td($x,$y);
return;
}
=item $self->Tj($string)
=cut
sub Tj
{
my $self = shift;
my $string = shift;
@{$self->{last}} = $self->textToUser(0,0);
$self->_Tj($string);
@{$self->{current}} = $self->textToUser(0,0);
return;
}
sub _Tj
{
my $self = shift;
my $string = shift;
if (!$self->{refs}->{fm})
{
die "No font metrics for font $self->{Tf}";
}
my @parts;
if ($self->{mode} eq 'c' || $self->{wm} == 1)
{
@parts = split m//xms, $string;
}
else
{
@parts = ($string);
}
foreach my $substr (@parts)
{
my $dw = $self->{refs}->{doc}->getStringWidth($self->{refs}->{fm}, $substr);
$self->renderText($substr, $dw);
$self->Tadvance($dw);
}
return;
}
=item $self->TJ($arrayref)
=cut
sub TJ
{
my $self = shift;
my $array = shift;
@{$self->{last}} = $self->textToUser(0,0);
foreach my $node (@{$array})
{
if ($node->{type} eq 'number')
{
my $dw = -$node->{value} / 1000.0;
$self->Tadvance($dw);
}
else
{
$self->_Tj($node->{value});
}
}
@{$self->{current}} = $self->textToUser(0,0);
return;
}
=item $self->quote($string)
=cut
sub quote
{
my $self = shift;
my $string = shift;
@{$self->{last}} = $self->textToUser(0,0);
$self->Tstar();
$self->_Tj($string);
@{$self->{current}} = $self->textToUser(0,0);
return;
}
=item $self->doublequote($tw, $tc, $string)
=cut
( run in 0.336 second using v1.01-cache-2.11-cpan-483215c6ad5 )