# Bitmap pixel test

**URL:** <https://forum.kirupa.com/t/bitmap-pixel-test/314695>\
**Category:** Uncategorized\
**Created:** [October 6, 2010, 12:53pm UTC](https://forum.kirupa.com/t/bitmap-pixel-test/314695 "2010-10-06T12:53:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagguy](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jagguy](https://forum.kirupa.com/u/jagguy)\
**Post date:** [October 6, 2010, 12:53pm UTC](https://forum.kirupa.com/t/bitmap-pixel-test/314695/1 "2010-10-06T12:53:55Z")

</div>

I cant get this bitmapData hit test working.

I have a btmapdata and i want to test a point (10,10) to see if it lies inside the bitmapdata. Not the rectangle the image is in but if a point lies inside a pixel area (not alpha area).

```auto

Now I confused as I thought the paramater is a bitmapdata, 255,Point type, a point,255 
 Access of possibly undefined property x through a reference with static type flash.display:BitmapData.
 if(bmpdata.hitTest(new Point(bmpdata.x, bmpdata.y),
                                                255,
                                                myRect,
                                                new Point(myRect.x, myRect.y),
                                                255 ))
                  {

```
