Estatematt Posted March 23, 2016 Share Posted March 23, 2016 Hi all! Attempting to create a marquee tool ala photoshop. Traditionally this tool uses "marching ants" (example) to indicate to the user that they are making a selection. This Link confirms that Pixi doesn't overtly support dashed lines. Shame. I just tried to use a tilingsprite as a mask. no such luck. Does anyone have any suggestions here? Quote Link to comment Share on other sites More sharing options...
flamingdog Posted March 23, 2016 Share Posted March 23, 2016 if you have exact points of the whole path, you could just use moveTo / lineTo to create dashed line.. You just have to count actual length of dash/space between every moveTo/lineTo and eventually split lines in the path into smaller lines and gaps Quote Link to comment Share on other sites More sharing options...
Exca Posted March 23, 2016 Share Posted March 23, 2016 Do you need freeform marquee or is it always rectangle? If it's rectangle then you could just use a sprite like "--- " where line is the line graphic and space is the spacing between lines. Then draw those with 4 tilingSprites and offset their sprite starting position. That would be a lot faster than drawing lines each frame. Quote Link to comment Share on other sites More sharing options...
Estatematt Posted March 23, 2016 Author Share Posted March 23, 2016 @ExcaFunny I did sort of think of this but yeah I need the equivalent of a lasso tool. For now I just have transparent solid, blendmode add. In the old days they used diagonal lines and masked them. (like the example) I did try that here but for some reason it filled the path even when I didn't ask for it. 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.