Jump to content

no effect when setting lineAlpha to 0


terencechow
 Share

Recommended Posts

I've created a graphic with `graphic.lineStyle(2, 0x0000FF, 1);`

 

I see the linestyle at the size and color I want.

 

However a little after I'd like to "remove" the lineStyle by setting the lineAlpha to 0. However I don't see any effect.

 

Is there a reason for this? Note that I do see the graphic disappear when I set alpha to 0 so I know I am referencing the correct object.

 

 

 

Link to comment
Share on other sites

You drew the line with a certain style, changing properties of the graphics object doesn't change how the line was previously drawn.

Think about canvas 2d api, if you draw a line then change the line style that doesn't change how a line was previously drawn it just changes the style for future drawings. Graphics work the same way. If you change the style that is only setting it up for future drawings.

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