hittest

IsMouseOver returning False when over a ContextMenu or Validation Error?

I have a control which expands when IsMouseOver is set to true using a trigger. Within that control, there is some textboxes that have some basic validation. My problem is that when a validation error occurs and the user mouses over the Red border around the textbox (almost guarenteed to happen as user moves the mouse to center of textbo...

CALayer -hitTest: not respecting containsPoint: overload

Back again and have a different question with the same function that I posted before: - (AIEnemyUnit *) hitTestForEnemyUnit:(CGPoint)where { CALayer * layer = [self hitTest:where]; while (layer) { if ([layer isKindOfClass:[AIEnemyUnit class]]) { return (AIEnemyUnit *)layer; } else { layer...

BitmapData.draw() Matrix problem

Hello, I've run into an issue where the BitmapData.draw() method isn't accurately subtracting image data from a .png that uses transparency. I've put together a test file that shows this behavior, it's located here: http://www.filedropper.com/shield_1 In a nutshell, a sprite drops from the top of the screen and when it intersects with...

Hit test on group on Subviews

I have a UIView as the container/holder view. Inside that i have a group of UIViews (icons) Think of this as similar to the iPhone's SpringBoard- you have an SBIconList (UIView subclass) with a group of SBIcons (also UIView subclasses) So far, each icon of my icons is draggable, but i'm having problems writing the collision detection c...

[WPF] ItemsControl : how to do hittest to find item / index under mouse position ?

In my Canvas I have children with a specific design which includes an ItemsControl. In the OnPreviewLeftMouseButtonDown handler of my canvas, I perform a hittest using VisualTreeHelper, and when I find a specific ItemsControl I'd like to know which item / item-index the mouse was over. Does anybody know how to do this ? ...

What is the best way to have only non-transparent pixel hit testable in images in Silverlight?

According to msdn in Silverlight images are hit testable over their image/media display areas, basically their Height and Width. Transparent / full alpha pixels in the image file are still hit testable. My question is now, what is the best way to have only non-transparent pixel hit testable in images in Silverlight? ...

hitTest returns wrong UIView

I have a view hierarchy which contains smaller views on a scroll view. Each view can have subviews in it such as buttons etc. For some reason, buttons on the view aren't clicked; exploring this further showed that while the scroll view receives the touchBegan event, the button does not. Calling the hitTest:event: message shows that the...

Xcode - HitTesting returns 3 times

Hey all! I have a UIView subclass where hitTest: withEvent: is overridden. Every time a hit test registers, the view logs its tag. Ex: Click Console: You Touched View: 3 You Touched View: 3 You Touched View: 3 My question: Why does it do it three times? I need it to trigger something other than an NSLog and I'm afraid that it will t...

Where Should Collision Detection Code Be?

Hi guys, I'm writing a pong game and I have a ball class that has velocity x, y, positions and all that stuff that every frame is updated by calling @ball.update, this moves the ball forward by its x_vel and Y_vel etc. My question is Should my collision code be in the loop or in the update method of the ball class? Or should it all be in...