App-Guiio
view release on metacpan or search on metacpan
setup/import_export/ascii.pl view on Meta::CPAN
use File::Slurp ;
sub export_ascii
{
my ($self, $elements_to_save, $file) = @_ ;
if($self->{CREATE_BACKUP} && -e $file)
{
use File::Copy;
copy($file,"$file.bak") or die "export_pod: Copy failed while making backup copy: $!";
}
write_file($file, $self->transform_elements_to_ascii_buffer()) ;
#~ open FH, ">:encoding(utf8)", $file_name;
#~ print FH $self->transform_elements_to_ascii_buffer() ;
#~ close FH ;
return ;
}
setup/import_export/guiioe.pl view on Meta::CPAN
#----------------------------------------------------------------------------------------------------------------------------
sub export_guiioe
{
my ($self, $elements_to_save, $file, $data) = @_ ;
if($self->{CREATE_BACKUP} && -e $file)
{
use File::Copy;
copy($file,"$file.bak") or die "export_pod: Copy failed while making backup copy: $!";
}
write_file($file, $self->serialize_self(1) .'$VAR1 ;') ;
return $file ;
}
setup/import_export/perl.pl view on Meta::CPAN
my $longest_line = max( map{length} @ascii_representation) ;
my $compressed_self = compress($self->serialize_self() . '$VAR1 ;') ;
my $base64 =MIME::Base64::encode($compressed_self, '') ;
my $base64_chunk_size = int((length($base64) / @ascii_representation) + 1) ;
if($self->{CREATE_BACKUP} && -e $file)
{
use File::Copy;
copy($file,"$file.bak") or die "export_pod: Copy failed while making backup copy: $!";
}
open POD, ">:encoding(utf8)", $file_name or die "export_pod: can't open file '$file_name'!\n";
print POD $data->{HEADER} || '' ;
print POD "=for guiio $longest_line $base_name\n\n" ;
for my $diagram_line (@ascii_representation)
{
my $padding = ' ' x ($longest_line - length($diagram_line)) ;
setup/import_export/png.pl view on Meta::CPAN
},
) ;
sub export_png
{
my ($self, $elements_to_save, $file) = @_ ;
if($self->{CREATE_BACKUP} && -e $file)
{
use File::Copy;
copy($file,"$file.bak") or die "export_pod: Copy failed while making backup copy: $!";
}
my $alloc = $self->{widget}->allocation;
my $pixbuf = Gtk2::Gdk::Pixbuf->get_from_drawable
(
$self->{PIXMAP},
$self->{widget}->window->get_colormap,
0, 0,
0, 0,
$alloc->width, $alloc->height
( run in 1.312 second using v1.01-cache-2.11-cpan-49f99fa48dc )