ImageEn, unit iemview

TImageEnMView.GetUnfilteredImage

TImageEnMView.GetUnfilteredImage


Declaration

function GetUnfilteredImage(Index: Integer; Direction: Integer = +1; Count: Integer = 0): Integer;


Description

Return the index of a visible frame (i.e one that is not hidden by filtering).
Result is -1 if no visible frames are found.

Parameter Description
Index The index where we still start looking for the next visible image. This value is the index of all images (visible or not). Specify MAXINT to find the last visible image
Direction Whether to look forward (+1) or backward (-1)
Count How many steps to take to find an image. 0 returns just the visible image at that position, 1 returns the first visible image from "Index", 2 would skip that image to find the second one, etc.

Note: This method will function even if filtering is inactive


Examples

// Return the first visible image
idx := GetUnfilteredImage( 0 );

// Return the last visible image
idx := GetUnfilteredImage( MAXINT );

// Return the visible image prior to the current one
idx := GetUnfilteredImage( ImageEnMView1.SelectedImage, -1, 1 );

// Return the visible image after to the current one
idx := GetUnfilteredImage( ImageEnMView1.SelectedImage, +1, 1 );

// Return the third visible image
idx := GetUnfilteredImage( 0, +1, 3 );