Fabric.js: set strokeWidth to 0 don't work

Created on 3 Jun 2013  路  4Comments  路  Source: fabricjs/fabric.js

Most helpful comment

Set stroke: null
The html5 canvas spec defines that ctx.lineWidth = 0 (object.strokeWidth) must be ignored (uses instead default value 1.0).
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-linewidth

All 4 comments

When draw a rect with path, fill it, then want the stroke to disappear.

stroke: false,
is the trick.

Set stroke: null
The html5 canvas spec defines that ctx.lineWidth = 0 (object.strokeWidth) must be ignored (uses instead default value 1.0).
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-linewidth

@Kienz is right. I think this is just HTML5 thing. Refer to here, http://www.w3schools.com/svg/svg_stroking.asp

Was this page helpful?
0 / 5 - 0 ratings

Related issues

semiadam picture semiadam  路  3Comments

amancqlsys picture amancqlsys  路  5Comments

raichu picture raichu  路  4Comments

eddieyangtx picture eddieyangtx  路  5Comments

lyzs90 picture lyzs90  路  3Comments