intoxopox Posted February 12, 2016 Share Posted February 12, 2016 If I create a Graphics object and draw just a thick line or curve in it, I can't seem to get any recognition of mouse interactions on that Graphic. Seems I have to use a beginFill and draw out a shape before mouse will interact. Anyone else experience this? Is there a work-around? Quote Link to comment Share on other sites More sharing options...
xerver Posted February 13, 2016 Share Posted February 13, 2016 This is true, because a line is a 1 dimensional shape, it has nothing that can be interacted with in 2D space. If you want a thick, interactable line use a rectangle. Quote Link to comment Share on other sites More sharing options...
intoxopox Posted February 16, 2016 Author Share Posted February 16, 2016 For a line, using a rectangle is reasonable, but what about for thick complex curves? While they can be broken into multiple polygon fills, doing so comes at a considerable cost compared to just using quad and cubic curves. Quote Link to comment Share on other sites More sharing options...
xerver Posted February 16, 2016 Share Posted February 16, 2016 You can add a hit test to your graphics object that performs the necessary test on your curve equation. But 1D interactions are not supported by the library. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.