@@ -795,13 +795,13 @@ sub realcoords {
795795}
796796
797797sub checkargs {
798- if (ref $_ [$#_ ] eq " HASH" and $PDL::Graphics::TriD::verbose ) {
798+ if (ref $_ [-1 ] eq " HASH" and $PDL::Graphics::TriD::verbose ) {
799799
800800 print " enter checkargs \n " ;
801801 for ([' KeepTwiddling' ,\&keeptwiddling3d]) {
802802 print " checkargs >$_ <\n " ;
803- if (defined $_ [$#_ ]{$_ -> [0]}) {
804- &{$_ -> [1]}(delete $_ [$#_ ]{$_ -> [0]});
803+ if (defined $_ [-1 ]{$_ -> [0]}) {
804+ &{$_ -> [1]}(delete $_ [-1 ]{$_ -> [0]});
805805 }
806806 }
807807 }
@@ -855,13 +855,15 @@ sub PDL::describe3d {
855855
856856*imagrgb=*imagrgb=\&PDL::imagrgb;
857857sub PDL ::imagrgb {
858- require PDL::Graphics::TriD::Image;
859- my (@data ) = @_ ; &checkargs;
860- my $win = PDL::Graphics::TriD::get_current_window();
861- my $imag = PDL::Graphics::TriD::Image-> new(@data );
862- $win -> clear_viewports();
863- $win -> current_viewport()-> add_object($imag );
864- $win -> twiddle();
858+ require PDL::Graphics::TriD::Image;
859+ my ($color , $opts ) = @_ ; &checkargs;
860+ my $win = PDL::Graphics::TriD::get_current_window();
861+ $opts //= {};
862+ $opts -> {FullScreen } = 1;
863+ my $imag = PDL::Graphics::TriD::Image-> new($color , $opts );
864+ $win -> clear_viewports();
865+ $win -> current_viewport()-> add_object($imag );
866+ $win -> twiddle();
865867}
866868
867869# Plotting routines that use the 3D graph
0 commit comments