Imager::Search::Match - Object describing a successful Imager::Search match |
Imager::Search::Match - Object describing a successful Imager::Search match
Imager::Search::Match is a convenience class that represents the complete geometry of a successful the Imager::Search manpage match.
It is returned by the various search methods in the Imager::Search manpage.
Imager::Search::Match objects are self-contained and anonymous, they do not retain a connection to the original search context.
If the the Imager::Search::Pattern manpage 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.
The top
accessor returns the integer value of the inclusive vertical top
of the search match.
The bottom
accessor returns the integer value of the inclusive vertical
bottom of the search match.
The left
accessor returns the integer value of the inclusive horizontal
left of the search match.
The right
accessor returns the integer value of the inclusive horizontal
right of the search match.
The height
accessor returns the integer value of the vertical height of
the matched area.
The width
accessor returns the integer value of the horizontal width of
the matched area.
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.
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.
See the SUPPORT section of the main the Imager::Search manpage module.
Adam Kennedy <adamk@cpan.org>
Copyright 2007 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Imager::Search::Match - Object describing a successful Imager::Search match |