hitTestOSC(atMousePositionX:mousePositionY:activePart:at:)
Figures out which part of the onscreen control was hit.
Declaration
func hitTestOSC(atMousePositionX mousePositionX: Double, mousePositionY: Double, activePart: UnsafeMutablePointer<Int>!, at time: CMTime)Parameters
- mousePositionX:
The x position of the mouse
- mousePositionY:
The y position of the mouse
- activePart:
The part that was hit - set to
0if no part was hit - time:
The time at which we are checking for a hit
Discussion
This method is called by the host to determine which part of your controls were hit by the mouse. Return a constant that represents a part number for your onscreen control in the activePart parameter. It will be sent to you in the -draw, -mouse, and -key methods so you can handle those events properly.
See Also
Instance Methods
drawOSC(withWidth:height:activePart:destinationImage:at:)drawingCoordinates()keyDown(atPositionX:positionY:keyPressed:modifiers:forceUpdate:didHandle:at:)keyUp(atPositionX:positionY:keyPressed:modifiers:forceUpdate:didHandle:at:)mouseDown(atPositionX:positionY:activePart:modifiers:forceUpdate:at:)mouseDragged(atPositionX:positionY:activePart:modifiers:forceUpdate:at:)mouseEntered(atPositionX:positionY:modifiers:forceUpdate:at:)mouseExited(atPositionX:positionY:modifiers:forceUpdate:at:)mouseMoved(atPositionX:positionY:activePart:modifiers:forceUpdate:at:)mouseUp(atPositionX:positionY:activePart:modifiers:forceUpdate:at:)