(まあこの場合なら pt_in_rect(px0, py0, xmin, xmax, ymin, ymax) 関数とか書くだろうけど)