Graphics2D.pm (PDL-2.074) | : | Graphics2D.pm (PDL-2.075) | ||
---|---|---|---|---|
skipping to change at line 615 | skipping to change at line 615 | |||
the input image with 1:1 aspect ratio for pixels. The window | the input image with 1:1 aspect ratio for pixels. The window | |||
resize is constrained to the actual ratio of the image | resize is constrained to the actual ratio of the image | |||
dimensions. The initial display size is currently a 200x200 | dimensions. The initial display size is currently a 200x200 | |||
window to prevent things from being too small by default. | window to prevent things from being too small by default. | |||
The image to display can have dimensions ($c,$M,$N) where for | The image to display can have dimensions ($c,$M,$N) where for | |||
$c==4 the display is in GL_RGBA, for $c==3 the display is GL_RGB, | $c==4 the display is in GL_RGBA, for $c==3 the display is GL_RGB, | |||
for $c==2 the display is GL_LUMINANCE_ALPHA, and for $c==1 or for | for $c==2 the display is GL_LUMINANCE_ALPHA, and for $c==1 or for | |||
for dimensions ($M,$N) then the display is GL_LUMINANCE. | for dimensions ($M,$N) then the display is GL_LUMINANCE. | |||
This routine does not yet thread but multiple images may be | This routine does not yet broadcast but multiple images may be | |||
viewed at the same time in separate windows by multiple | viewed at the same time in separate windows by multiple | |||
calls to imag2d(). TriD graphics visualization windows and the | calls to imag2d(). TriD graphics visualization windows and the | |||
imag2d() windows may be created and used independently. | imag2d() windows may be created and used independently. | |||
NOTE: If you are twiddling a TriD window, the imag2d() | NOTE: If you are twiddling a TriD window, the imag2d() | |||
windows are active as well. If you call twiddle() | windows are active as well. If you call twiddle() | |||
the sub, only the imag2d() windows will update correctly. | the sub, only the imag2d() windows will update correctly. | |||
=for usage | =for usage | |||
skipping to change at line 914 | skipping to change at line 914 | |||
print STDERR "Type Q or q to stop twiddling...\n"; | print STDERR "Type Q or q to stop twiddling...\n"; | |||
while ($imag2d_is_twiddling && scalar(@imag2d_list)) { | while ($imag2d_is_twiddling && scalar(@imag2d_list)) { | |||
glutMainLoopEvent(); | glutMainLoopEvent(); | |||
} | } | |||
print STDERR "Stopped twiddle-ing!\n"; | print STDERR "Stopped twiddle-ing!\n"; | |||
} | } | |||
glutMainLoopEvent(); | glutMainLoopEvent(); | |||
} | } | |||
#------------------------------------------------------------------------ | #------------------------------------------------------------------------ | |||
# Threaded image display as tiles (code from PDL::Graphics::TriD::Image) | # Broadcasted image display as tiles (code from PDL::Graphics::TriD::Image) | |||
#------------------------------------------------------------------------ | #------------------------------------------------------------------------ | |||
# N-D ndarray -> 2-D | # N-D ndarray -> 2-D | |||
sub flatten { | sub flatten { | |||
my ($this,$bin_align) = @_; | my ($this,$bin_align) = @_; | |||
my @dims = $this->dims; | my @dims = $this->dims; | |||
my $imdim0 = shift @dims; # get rid of the '3' | my $imdim0 = shift @dims; # get rid of the '3' | |||
my $xd = $dims[0]; my $yd = $dims[1]; | my $xd = $dims[0]; my $yd = $dims[1]; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |