Imager::Search::Match - Object describing a successful Imager::Search match


Imager-Search documentation  | view source Contained in the Imager-Search distribution.

Index


NAME

Top

Imager::Search::Match - Object describing a successful Imager::Search match

DESCRIPTION

Top

Imager::Search::Match is a convenience class that represents the complete geometry of a successful Imager::Search match.

It is returned by the various search methods in Imager::Search.

Imager::Search::Match objects are self-contained and anonymous, they do not retain a connection to the original search context.

METHODS

Top

name

If the Imager::Search::Pattern that was used to generate the match object had a name, then the match will inherit that name as well.

Returns the pattern name as a string, or undef if the pattern was anonymous.

top

The top accessor returns the integer value of the inclusive vertical top of the search match.

bottom

The bottom accessor returns the integer value of the inclusive vertical bottom of the search match.

left

Top

The left accessor returns the integer value of the inclusive horizontal left of the search match.

right

Top

The right accessor returns the integer value of the inclusive horizontal right of the search match.

height

Top

The height accessor returns the integer value of the vertical height of the matched area.

width

Top

The width accessor returns the integer value of the horizontal width of the matched area.

center_x

Top

The center_x accessor returns the integer value of the horizontal centre pixel of the matched image. If the matched image has an even number of horizonal pixels, the value will be rounded to the left.

center_y

Top

The center_y accessor returns the integer value of the vertical centre pixel of the matched image. If the matched image has an even number of vertical pixels, the value will be rounded to the top.

SUPPORT

Top

See the SUPPORT section of the main Imager::Search module.

AUTHOR

Top

Adam Kennedy <adamk@cpan.org>

COPYRIGHT

Top


Imager-Search documentation  | view source Contained in the Imager-Search distribution.