Jump to content

Marching Ants / Dashed lines


Estatematt
 Share

Recommended Posts

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?

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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. 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...