« blib/lib/App/Asciio/Utils/Presentation.pm
↑ Summary
blib/lib/App/Asciio/setup/actions/default_bindings.pl »
| 1 | |||
| 2 | register_import_export_handlers | ||
| 3 | ( | ||
| 4 | png => | ||
| 5 | { | ||
| 6 | IMPORT => undef , | ||
| 7 | EXPORT => \&export_png, | ||
| 8 | }, | ||
| 9 | ) ; | ||
| 10 | |||
| 11 | sub export_png | ||
| 12 | { | ||
| 13 | # my ($self, $elements_to_save, $file) = @_ ; | ||
| 14 | |||
| 15 | # if($self->{CREATE_BACKUP} && -e $file) | ||
| 16 | # { | ||
| 17 | # use File::Copy; | ||
| 18 | # copy($file,"$file.bak") or die "export_pod: Copy failed while making backup copy: $!"; | ||
| 19 | # } | ||
| 20 | |||
| 21 | # my $alloc = $self->{widget}->allocation; | ||
| 22 | # my $pixbuf = Gtk3::Gdk::Pixbuf->get_from_drawable | ||
| 23 | # ( | ||
| 24 | # $self->{PIXMAP}, | ||
| 25 | # $self->{widget}->window->get_colormap, | ||
| 26 | # 0, 0, | ||
| 27 | # 0, 0, | ||
| 28 | # $alloc->width, $alloc->height | ||
| 29 | # ); | ||
| 30 | |||
| 31 | # return $pixbuf->save($file, "png" ); | ||
| 32 | } | ||
| 33 |