how to identify whether x and y coordinates are in rectangel using ontouchlistener?
<pre><code>public void hatdraw(Canvas canvas,float x,float y) {
     mBitmaps = BitmapFactory.decodeResource(this.getResources(),
            R.drawable.hat);
     srcRect=new Rect(0,0,60,60);
     xrect=(int)x;
     yrect=(int)y;
    Log.d("hatdraw","xrect,yrect"+xrect    +yrect);
    desRect=new Rect(xrect,yrect, xrect+ (srcRect.right - srcRect.left),
            yrect + (srcRect.bottom -srcRect.top));
    canvas.drawBitmap(mBitmaps,srcRect,desRect, null);


}
</code></pre>
