Javascript: Hiding the stroke of a canvas object

This is a silly question, but how can I make the stroke of some canvas object invisible? Setting the width to 0 doesn't help (thin, but visible), and I don't know which color I should change the stroke to.


Setting the opacity to zero will achieve that effect - i.e:

ctx.strokeStyle = "rgba(1, 1, 1, 0)";

demo at

Setting the stroke to fully transparent as alnitak suggests is one way, but a slightly more appropriate (and more performant) way would be to simply not call stroke()!

The path (and all subpaths) will still exist if you don't call stroke and you can still fill or add to the path as you please.

Need Your Help

How to encrypt a short string into another SHORT string using OpenSSL

encryption openssl public-key-encryption

I wish to take a string like "abcd-efgh" and perform an asymmetric encryption so that the resulting string is itself fairly short when export as hex - 20 characters or so.

rounded corners in Qooxdoo - problems with ImageMagick and PNG

png imagemagick qooxdoo

I want to create a button with rounded corners in Qooxdoo but I'm having some problems. I guess it's a problem with ImageMagick and not my Qooxdoo code, but I'll post it anyway.