[html5] r7387 - [e] (0) internal notes about miterLimit Affected topics: Canvas
whatwg at whatwg.org
whatwg at whatwg.org
Thu Sep 20 16:49:53 PDT 2012
Author: ianh
Date: 2012-09-20 16:49:52 -0700 (Thu, 20 Sep 2012)
New Revision: 7387
Modified:
complete.html
index
source
Log:
[e] (0) internal notes about miterLimit
Affected topics: Canvas
Modified: complete.html
===================================================================
--- complete.html 2012-09-20 23:27:42 UTC (rev 7386)
+++ complete.html 2012-09-20 23:49:52 UTC (rev 7387)
@@ -37318,6 +37318,8 @@
zero, negative, infinite, and NaN values must be ignored, leaving
the value unchanged; other values must change the current value to
the new value.</p>
+ <!-- values less than 1.0 are equivalent to 1.0, since it's compared
+ against a ratio that can't be less than 1.0 -->
<p>When the object implementing the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code>
interface is created, the <code title=dom-context-2d-miterLimit><a href=#dom-context-2d-miterlimit>miterLimit</a></code> attribute must
@@ -37588,7 +37590,31 @@
miter length to half the line width. If the miter length would
cause the miter limit ratio (as set by the <var title="">style</var> <code title=dom-context-2d-miterLimit><a href=#dom-context-2d-miterlimit>miterLimit</a></code> attribute) to
be exceeded, this second triangle must not be added.</p>
+ <!-- the actual ratio can't possibly be less than 1.0 -->
+<!-- here's a nice demo of the miter:
+ c.clearRect(0, 0, 640, 480);
+ c.beginPath();
+
+ c.moveTo((new Date()/100) % 600, 100);
+ c.lineTo(300, 300);
+ c.lineTo(500, 300);
+
+ c.lineWidth = 50;
+ c.miterLimit = 10000;
+ c.strokeStyle = 'silver'
+ c.stroke();
+
+ c.miterLimit = 0.0001;
+ c.strokeStyle = 'black'
+ c.stroke();
+
+ c.lineWidth = 1;
+ c.strokeStyle = 'red'
+ c.stroke();
+-->
+
+
<p>Subpaths in the newly created path must wind clockwise,
regardless of the direction of paths in <var title="">path</var>.</p>
<!--
Modified: index
===================================================================
--- index 2012-09-20 23:27:42 UTC (rev 7386)
+++ index 2012-09-20 23:49:52 UTC (rev 7387)
@@ -37318,6 +37318,8 @@
zero, negative, infinite, and NaN values must be ignored, leaving
the value unchanged; other values must change the current value to
the new value.</p>
+ <!-- values less than 1.0 are equivalent to 1.0, since it's compared
+ against a ratio that can't be less than 1.0 -->
<p>When the object implementing the <code><a href=#canvasdrawingstyles>CanvasDrawingStyles</a></code>
interface is created, the <code title=dom-context-2d-miterLimit><a href=#dom-context-2d-miterlimit>miterLimit</a></code> attribute must
@@ -37588,7 +37590,31 @@
miter length to half the line width. If the miter length would
cause the miter limit ratio (as set by the <var title="">style</var> <code title=dom-context-2d-miterLimit><a href=#dom-context-2d-miterlimit>miterLimit</a></code> attribute) to
be exceeded, this second triangle must not be added.</p>
+ <!-- the actual ratio can't possibly be less than 1.0 -->
+<!-- here's a nice demo of the miter:
+ c.clearRect(0, 0, 640, 480);
+ c.beginPath();
+
+ c.moveTo((new Date()/100) % 600, 100);
+ c.lineTo(300, 300);
+ c.lineTo(500, 300);
+
+ c.lineWidth = 50;
+ c.miterLimit = 10000;
+ c.strokeStyle = 'silver'
+ c.stroke();
+
+ c.miterLimit = 0.0001;
+ c.strokeStyle = 'black'
+ c.stroke();
+
+ c.lineWidth = 1;
+ c.strokeStyle = 'red'
+ c.stroke();
+-->
+
+
<p>Subpaths in the newly created path must wind clockwise,
regardless of the direction of paths in <var title="">path</var>.</p>
<!--
Modified: source
===================================================================
--- source 2012-09-20 23:27:42 UTC (rev 7386)
+++ source 2012-09-20 23:49:52 UTC (rev 7387)
@@ -43429,6 +43429,8 @@
zero, negative, infinite, and NaN values must be ignored, leaving
the value unchanged; other values must change the current value to
the new value.</p>
+ <!-- values less than 1.0 are equivalent to 1.0, since it's compared
+ against a ratio that can't be less than 1.0 -->
<p>When the object implementing the <code>CanvasDrawingStyles</code>
interface is created, the <code
@@ -43750,7 +43752,31 @@
title="">style</var> <code
title="dom-context-2d-miterLimit">miterLimit</code> attribute) to
be exceeded, this second triangle must not be added.</p>
+ <!-- the actual ratio can't possibly be less than 1.0 -->
+<!-- here's a nice demo of the miter:
+ c.clearRect(0, 0, 640, 480);
+ c.beginPath();
+
+ c.moveTo((new Date()/100) % 600, 100);
+ c.lineTo(300, 300);
+ c.lineTo(500, 300);
+
+ c.lineWidth = 50;
+ c.miterLimit = 10000;
+ c.strokeStyle = 'silver'
+ c.stroke();
+
+ c.miterLimit = 0.0001;
+ c.strokeStyle = 'black'
+ c.stroke();
+
+ c.lineWidth = 1;
+ c.strokeStyle = 'red'
+ c.stroke();
+-->
+
+
<p>Subpaths in the newly created path must wind clockwise,
regardless of the direction of paths in <var
title="">path</var>.</p>
More information about the Commit-Watchers
mailing list