Issue 84 in sekati: Add isPointWithinRectangle to Point class.

0 views
Skip to first unread message

sek...@googlecode.com

unread,
Oct 6, 2010, 1:41:57 PM10/6/10
to sekat...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Enhancement Priority-Low Milestone-0.x.x.x

New issue 84 by iworkinprogress: Add isPointWithinRectangle to Point class.
http://code.google.com/p/sekati/issues/detail?id=84

public function isPointWithinRectangle(rectangle : Rectangle) : Boolean {
if(x >= rectangle.x && x <= rectangle.x + rectangle.width && y >=
rectangle.y && y <= rectangle.y + rectangle.height) {
return true;
} else {
return false;
}
}

// also a nice shortcut for checking if a point is within a sprite
public function isPointWithinSprite(sprite : Sprite) : Boolean {
return isPointWithinRectangle(new Rectangle( sprite.x, sprite.y,
sprite.width, sprite.height ) );
}

sek...@googlecode.com

unread,
Dec 1, 2010, 12:08:05 PM12/1/10
to sekat...@googlegroups.com
Updates:
Status: WontFix

Comment #1 on issue 84 by sekati: Add isPointWithinRectangle to Point class.
http://code.google.com/p/sekati/issues/detail?id=84

Similar functionality is already available in DisplayObject per
histTestPoint() & HitTestObject().

WF / NAB :-)

Reply all
Reply to author
Forward
0 new messages