Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Exact pixel hit detection #142

Open
Open
@ryanjarvis

Description

@ryanjarvis

It appears that an Actor is notified if a mouse event affects it by checking to see if the mouse event coordinates are contained within the bounding box of the Actor only.

I would like to see support for determining if you clicked on the actual pixels that the Actor paints on the canvas.

I am wondering how difficult it would be to implement this. I researched two approaches. First is using another canvas as a hit canvas described here: http://tschaub.net/blog/2011/03/31/canvas-hit-detection.html Not sure if that approach makes sense in CAAT's overall architecture. Second, is checking to see if a point is in the path of an Actor when it is drawn using isPointinPath described here: http://digitalarts.bgsu.edu/faculty/bonniem/Spring11/artc4330_1/notes/notes26.html If Actors are redrawn everytime the system checks to see if a mouse interaction occurred, I am thinking this might be doable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions