Exd/scripts/demo.pl

43 lines
922 B
Perl
Raw Normal View History

#!/usr/bin/env perl
use v5.40.0;
use strict;
use warnings;
use Exd::Printer;
use Exd::DeviceToImage;
use Exd::DeviceToRawFile;
2024-10-11 18:43:49 +02:00
use Exd::DeviceToBluetooth;
use Exd::Utils;
{
2024-10-11 23:17:50 +02:00
# my $device = Exd::DeviceToBluetooth->new( address => '5A:4A:AE:8C:E9:D2', port => 1 );
2024-10-11 23:53:07 +02:00
my $device =
Exd::DeviceToImage->new( output_file => 'a.png' );
my $printer = Exd::Printer->new( device => $device );
2024-10-11 23:53:07 +02:00
for my $font (
'Z003 Medium Italic',
'Noto Sans CJK JP',
'Shadow Into Light Regular'
)
{
$printer->font($font);
my $hoz = Exd::Utils::get_gd_image('scripts/hoz.jpg');
$printer->print_text(
[
$hoz, ' The best software ' , $hoz , ' belongs to everybody ',
$hoz
],
30
);
$printer->image('scripts/hoz.jpg');
$printer->print_n_lf(4);
$printer->print;
}
}