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

philippemiguet picture philippemiguet  路  35Comments

Exlord picture Exlord  路  40Comments

asturur picture asturur  路  60Comments

Reggino picture Reggino  路  42Comments

asturur picture asturur  路  41Comments