Gtk3-ImageView

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      },
      "test" : {
         "recommends" : {
            "CPAN::Meta" : "2.120900"
         },
         "requires" : {
            "Carp::Always" : "0",
            "ExtUtils::MakeMaker" : "0",
            "File::Spec" : "0",
            "File::Temp" : "0",
            "Image::Magick" : "0",
            "MIME::Base64" : "0",
            "Test::Deep" : "0",
            "Test::MockObject" : "0",
            "Test::More" : "0",
            "Try::Tiny" : "0"
         }
      }
   },
   "provides" : {
      "Gtk3::ImageView" : {

META.yml  view on Meta::CPAN

abstract: 'Image viewer widget for Gtk3'
author:
  - 'Jeffrey Ratcliffe <jffry@posteo.net>'
  - 'Alexey Sokolov'
build_requires:
  Carp::Always: '0'
  ExtUtils::MakeMaker: '0'
  File::Spec: '0'
  File::Temp: '0'
  Glib: '1.210'
  Image::Magick: '0'
  MIME::Base64: '0'
  Test::Deep: '0'
  Test::MockObject: '0'
  Test::More: '0'
  Try::Tiny: '0'
configure_requires:
  ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010'
license: perl

Makefile.PL  view on Meta::CPAN

    "base" => 0,
    "if" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "Carp::Always" => 0,
    "ExtUtils::MakeMaker" => 0,
    "File::Spec" => 0,
    "File::Temp" => 0,
    "Image::Magick" => 0,
    "MIME::Base64" => 0,
    "Test::Deep" => 0,
    "Test::MockObject" => 0,
    "Test::More" => 0,
    "Try::Tiny" => 0
  },
  "VERSION" => 12,
  "test" => {
    "TESTS" => "t/*.t"
  }

Makefile.PL  view on Meta::CPAN

my %FallbackPrereqs = (
  "Cairo" => 0,
  "Carp" => 0,
  "Carp::Always" => 0,
  "ExtUtils::MakeMaker" => 0,
  "File::Spec" => 0,
  "File::Temp" => 0,
  "Glib" => "1.210",
  "Glib::Object::Subclass" => 0,
  "Gtk3" => 0,
  "Image::Magick" => 0,
  "List::Util" => 0,
  "MIME::Base64" => 0,
  "Readonly" => 0,
  "Scalar::Util" => 0,
  "Test::Deep" => 0,
  "Test::MockObject" => 0,
  "Test::More" => 0,
  "Try::Tiny" => 0,
  "base" => 0,
  "if" => 0,

t/00-report-prereqs.dd  view on Meta::CPAN

                    },
       'test' => {
                   'recommends' => {
                                     'CPAN::Meta' => '2.120900'
                                   },
                   'requires' => {
                                   'Carp::Always' => '0',
                                   'ExtUtils::MakeMaker' => '0',
                                   'File::Spec' => '0',
                                   'File::Temp' => '0',
                                   'Image::Magick' => '0',
                                   'MIME::Base64' => '0',
                                   'Test::Deep' => '0',
                                   'Test::MockObject' => '0',
                                   'Test::More' => '0',
                                   'Try::Tiny' => '0'
                                 }
                 }
     };
  $x;
 }

t/1_basics.t  view on Meta::CPAN

use warnings;
use strict;
use Try::Tiny;
use File::Temp;
use Image::Magick;
use Test::Deep;
use Test::More tests => 38;

BEGIN {
    use Glib qw/TRUE FALSE/;
    use Gtk3 -init;
    use_ok('Gtk3::ImageView');
}

#########################

my $view = Gtk3::ImageView->new;
isa_ok( $view, 'Gtk3::ImageView' );
isa_ok(
    $view->get_tool,
    'Gtk3::ImageView::Tool::Dragger',
    'get_tool() defaults to dragger'
);

my $tmp   = File::Temp->new( SUFFIX => '.png' );
my $image = Image::Magick->new();
my $x     = $image->Read('rose:');
$x = $image->Write( filename => $tmp );
warn "$x" if "$x";
my $signal;
$signal = $view->signal_connect(
    'offset-changed' => sub {
        my ( $widget, $x, $y ) = @_;
        $view->signal_handler_disconnect($signal);
      SKIP: {
            skip "I don't know how offset is supposed to work with HiDPI", 2

t/2_transparent.t  view on Meta::CPAN

use warnings;
use strict;
use File::Temp;
use Image::Magick;
use Test::More tests => 4;
use MIME::Base64;

BEGIN {
    use Glib qw/TRUE FALSE/;
    use Gtk3 -init;
    use_ok('Gtk3::ImageView');
    Glib::Object::Introspection->setup(
        basename => 'GdkX11',
        version  => '3.0',

t/2_transparent.t  view on Meta::CPAN

        background-image: url('t/transp-blue.svg');
    }
" );
my $view = Gtk3::ImageView->new;
$view->set_pixbuf( Gtk3::Gdk::Pixbuf->new_from_file('t/transp-green.svg'),
    TRUE );
$window->add($view);
$window->show_all;
my $xid = $window->get_window->get_xid;

my $image = Image::Magick->new( magick => 'png' );

Glib::Timeout->add(
    1000,
    sub {
        $image->Read("x:$xid");
        Gtk3::main_quit;
        return FALSE;
    }
);
Gtk3::main;

t/5_filter.t  view on Meta::CPAN

use warnings;
use strict;
use File::Temp;
use Image::Magick;
use Test::More tests => 10;
use MIME::Base64;

BEGIN {
    use Glib qw/TRUE FALSE/;
    use Gtk3 -init;
    use_ok('Gtk3::ImageView');
    Glib::Object::Introspection->setup(
        basename => 'GdkX11',
        version  => '3.0',

t/5_filter.t  view on Meta::CPAN

$window->set_size_request( 300, 200 );
my $view = Gtk3::ImageView->new;
$view->set_pixbuf( Gtk3::Gdk::Pixbuf->new_from_file('t/2color.svg'), TRUE );

$window->add($view);
$window->show_all;
my $xid = $window->get_window->get_xid;
$view->set_zoom(15);

$view->set_interpolation('bilinear');
my $image = Image::Magick->new( magick => 'png' );

Glib::Timeout->add(
    1000,
    sub {
        $image->Read("x:$xid");
        Gtk3::main_quit;
        return FALSE;
    }
);
Gtk3::main;

t/5_filter.t  view on Meta::CPAN

        $found = 1;
        last;
    }
    $x--;
}
is( $found, 1, 'there is blue outside' );
my $fullblue_x = $x;
cmp_ok( $fullblue_x, '<', $blurred_x );

$view->set_interpolation('nearest');
$image = Image::Magick->new( magick => 'png' );

Glib::Timeout->add(
    1000,
    sub {
        $image->Read("x:$xid");
        Gtk3::main_quit;
        return FALSE;
    }
);
Gtk3::main;



( run in 0.527 second using v1.01-cache-2.11-cpan-beeb90c9504 )