Skip to content
Permalink
Browse files

[e] (0) Update notes in canvas source regarding upcoming new features.

Affected topics: Canvas

git-svn-id: http://svn.whatwg.org/webapps@7011 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Feb 29, 2012
1 parent f91c5b2 commit 4d9dce8ea6c8f6aae669ababf4e78e061767bf1b
Showing with 54 additions and 42 deletions.
  1. +18 −14 complete.html
  2. +18 −14 index
  3. +18 −14 source

<h5 id=2dcontext><span class=secno>4.8.11.1 </span>The 2D context</h5>

<!-- v2: we're on v4.1. suggestions for next version are marked v5, v6. -->
<!-- v2: we're on v4.1. suggestions for next version are marked v5. suggestions for subsequent versions are marked v6, v7. -->



void <a href=#dom-context-2d-save title=dom-context-2d-save>save</a>(); // push state on state stack
void <a href=#dom-context-2d-restore title=dom-context-2d-restore>restore</a>(); // pop state stack and restore state
<!--
// v6 we've also received requests for:
// v7 we've also received requests for:
attribute boolean <span title="dom-context-2d-forceHighQuality">forceHighQuality</span> // (default false)
// when enabled, it would prevent the UA from falling back on lower-quality but faster rendering routines
// useful e.g. for when an image manipulation app uses <canvas> both for UI previews and the actual work
void <a href=#dom-context-2d-transform title=dom-context-2d-transform>transform</a>(double a, double b, double c, double d, double e, double f);
void <a href=#dom-context-2d-settransform title=dom-context-2d-setTransform>setTransform</a>(double a, double b, double c, double d, double e, double f);
<!--
// v6 we've also received requests for:
void skew(...);
void reflect(...); // or mirror(...)
// v7 we've also received requests (though not many so far) for:
void skew(...); // is this common enough that one can't just use setTransform()?
void reflect(...); and void mirror(...); // aren't negative values in scale() sufficient for these?
-->
// compositing
attribute double <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>globalAlpha</a>; // (default 1.0)
attribute DOMString <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>globalCompositeOperation</a>; // (default source-over)
<!--
// v6 we've also received requests for:
// v7 we've also received requests for:
- turning off antialiasing to avoid seams when patterns are painted next to each other
- might be better to overdraw?
- might be better to just draw at a higher res then downsample, like for 3d?
drawing state it describes. If there is no saved state, the method
must do nothing.</p>

<!-- v6
<!-- v7
idea from Mihai:
> 5. Drawing states should be saveable with IDs, and for easier restoring.
>
* fill rule for deciding between winding and even-odd algorithms.
SVG has fill-rule: nonzero | evenodd
http://www.w3.org/TR/SVG/painting.html#FillProperties
see also mozFillRule: http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-June/032002.html

-->

<!-- drawImage() has an equivalent paragraph -->

<!--
Requests for v6 features:
Requests for v5 features:
* apply transforms to patterns, so you don't have to create
transformed patterns manually by rendering them to an off-screen
canvas then using that canvas as the pattern.
initially have the value <code>10.0</code>.</p>

<!--
v6: dashed lines have been requested. Philip Taylor provides these
v5: dashed lines have been requested. Philip Taylor provides these
notes on what would need to be defined for dashed lines:
> I don't think it's entirely trivial to add, to the detail that's
> necessary in a specification. The common graphics APIs (at least
> that the underlying graphics library does differently. (SVG Tiny 1.2
> appears to skip some of the problems by leaving things undefined and
> allowing whatever behavior the graphics library has.)
-->

Another request has been for hairline width lines, that remain
hairline width with transform. ack Shaun Morris.
-->
<!--v6: Another request has been for hairline width lines, that remain
hairline width with transform. ack Shaun Morris. -->

</div>

* support ways of extending the clipping region (union instead of intersection)
- also "add", "subtract", "replace", "intersect" and "xor"
- maybe just support creating unions, intersections, and other -ions of paths
-->
<!-- v5
Jordan OSETE suggests:
* support ways of resetting the clipping region without save/restore
-->

area of the canvas that the clipping region covers, not just the box
given by the em square height and measured text width.</p>

<!-- v6: Drawing text along a given path -->
<!-- v6: Adding text to a path -->
<!-- v5: Drawing text along a given path -->
<!-- v5: Adding text to a path -->
<!-- see also: http://www.w3.org/TR/SVG11/text.html#TextpathLayoutRules -->
<!-- see also: http://developer.mozilla.org/en/docs/Drawing_text_using_a_canvas -->

32 index

<h5 id=2dcontext><span class=secno>4.8.11.1 </span>The 2D context</h5>

<!-- v2: we're on v4.1. suggestions for next version are marked v5, v6. -->
<!-- v2: we're on v4.1. suggestions for next version are marked v5. suggestions for subsequent versions are marked v6, v7. -->



void <a href=#dom-context-2d-save title=dom-context-2d-save>save</a>(); // push state on state stack
void <a href=#dom-context-2d-restore title=dom-context-2d-restore>restore</a>(); // pop state stack and restore state
<!--
// v6 we've also received requests for:
// v7 we've also received requests for:
attribute boolean <span title="dom-context-2d-forceHighQuality">forceHighQuality</span> // (default false)
// when enabled, it would prevent the UA from falling back on lower-quality but faster rendering routines
// useful e.g. for when an image manipulation app uses <canvas> both for UI previews and the actual work
void <a href=#dom-context-2d-transform title=dom-context-2d-transform>transform</a>(double a, double b, double c, double d, double e, double f);
void <a href=#dom-context-2d-settransform title=dom-context-2d-setTransform>setTransform</a>(double a, double b, double c, double d, double e, double f);
<!--
// v6 we've also received requests for:
void skew(...);
void reflect(...); // or mirror(...)
// v7 we've also received requests (though not many so far) for:
void skew(...); // is this common enough that one can't just use setTransform()?
void reflect(...); and void mirror(...); // aren't negative values in scale() sufficient for these?
-->
// compositing
attribute double <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>globalAlpha</a>; // (default 1.0)
attribute DOMString <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>globalCompositeOperation</a>; // (default source-over)
<!--
// v6 we've also received requests for:
// v7 we've also received requests for:
- turning off antialiasing to avoid seams when patterns are painted next to each other
- might be better to overdraw?
- might be better to just draw at a higher res then downsample, like for 3d?
drawing state it describes. If there is no saved state, the method
must do nothing.</p>

<!-- v6
<!-- v7
idea from Mihai:
> 5. Drawing states should be saveable with IDs, and for easier restoring.
>
* fill rule for deciding between winding and even-odd algorithms.
SVG has fill-rule: nonzero | evenodd
http://www.w3.org/TR/SVG/painting.html#FillProperties
see also mozFillRule: http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-June/032002.html

-->

<!-- drawImage() has an equivalent paragraph -->

<!--
Requests for v6 features:
Requests for v5 features:
* apply transforms to patterns, so you don't have to create
transformed patterns manually by rendering them to an off-screen
canvas then using that canvas as the pattern.
initially have the value <code>10.0</code>.</p>

<!--
v6: dashed lines have been requested. Philip Taylor provides these
v5: dashed lines have been requested. Philip Taylor provides these
notes on what would need to be defined for dashed lines:
> I don't think it's entirely trivial to add, to the detail that's
> necessary in a specification. The common graphics APIs (at least
> that the underlying graphics library does differently. (SVG Tiny 1.2
> appears to skip some of the problems by leaving things undefined and
> allowing whatever behavior the graphics library has.)
-->

Another request has been for hairline width lines, that remain
hairline width with transform. ack Shaun Morris.
-->
<!--v6: Another request has been for hairline width lines, that remain
hairline width with transform. ack Shaun Morris. -->

</div>

* support ways of extending the clipping region (union instead of intersection)
- also "add", "subtract", "replace", "intersect" and "xor"
- maybe just support creating unions, intersections, and other -ions of paths
-->
<!-- v5
Jordan OSETE suggests:
* support ways of resetting the clipping region without save/restore
-->

area of the canvas that the clipping region covers, not just the box
given by the em square height and measured text width.</p>

<!-- v6: Drawing text along a given path -->
<!-- v6: Adding text to a path -->
<!-- v5: Drawing text along a given path -->
<!-- v5: Adding text to a path -->
<!-- see also: http://www.w3.org/TR/SVG11/text.html#TextpathLayoutRules -->
<!-- see also: http://developer.mozilla.org/en/docs/Drawing_text_using_a_canvas -->

32 source

<h5 id="2dcontext">The 2D context</h5>

<!-- v2: we're on v4.1. suggestions for next version are marked v5, v6. -->
<!-- v2: we're on v4.1. suggestions for next version are marked v5. suggestions for subsequent versions are marked v6, v7. -->

<!--START 2dcontext-->

void <span title="dom-context-2d-save">save</span>(); // push state on state stack
void <span title="dom-context-2d-restore">restore</span>(); // pop state stack and restore state
<!--
// v6 we've also received requests for:
// v7 we've also received requests for:
attribute boolean <span title="dom-context-2d-forceHighQuality">forceHighQuality</span> // (default false)
// when enabled, it would prevent the UA from falling back on lower-quality but faster rendering routines
// useful e.g. for when an image manipulation app uses <canvas> both for UI previews and the actual work
void <span title="dom-context-2d-transform">transform</span>(double a, double b, double c, double d, double e, double f);
void <span title="dom-context-2d-setTransform">setTransform</span>(double a, double b, double c, double d, double e, double f);
<!--
// v6 we've also received requests for:
void skew(...);
void reflect(...); // or mirror(...)
// v7 we've also received requests (though not many so far) for:
void skew(...); // is this common enough that one can't just use setTransform()?
void reflect(...); and void mirror(...); // aren't negative values in scale() sufficient for these?
-->
// compositing
attribute double <span title="dom-context-2d-globalAlpha">globalAlpha</span>; // (default 1.0)
attribute DOMString <span title="dom-context-2d-globalCompositeOperation">globalCompositeOperation</span>; // (default source-over)
<!--
// v6 we've also received requests for:
// v7 we've also received requests for:
- turning off antialiasing to avoid seams when patterns are painted next to each other
- might be better to overdraw?
- might be better to just draw at a higher res then downsample, like for 3d?
drawing state it describes. If there is no saved state, the method
must do nothing.</p>

<!-- v6
<!-- v7
idea from Mihai:
> 5. Drawing states should be saveable with IDs, and for easier restoring.
>
* fill rule for deciding between winding and even-odd algorithms.
SVG has fill-rule: nonzero | evenodd
http://www.w3.org/TR/SVG/painting.html#FillProperties
see also mozFillRule: http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-June/032002.html

-->

<!-- drawImage() has an equivalent paragraph -->

<!--
Requests for v6 features:
Requests for v5 features:
* apply transforms to patterns, so you don't have to create
transformed patterns manually by rendering them to an off-screen
canvas then using that canvas as the pattern.
initially have the value <code>10.0</code>.</p>

<!--
v6: dashed lines have been requested. Philip Taylor provides these
v5: dashed lines have been requested. Philip Taylor provides these
notes on what would need to be defined for dashed lines:
> I don't think it's entirely trivial to add, to the detail that's
> necessary in a specification. The common graphics APIs (at least
> that the underlying graphics library does differently. (SVG Tiny 1.2
> appears to skip some of the problems by leaving things undefined and
> allowing whatever behavior the graphics library has.)
-->

Another request has been for hairline width lines, that remain
hairline width with transform. ack Shaun Morris.
-->
<!--v6: Another request has been for hairline width lines, that remain
hairline width with transform. ack Shaun Morris. -->

</div>

* support ways of extending the clipping region (union instead of intersection)
- also "add", "subtract", "replace", "intersect" and "xor"
- maybe just support creating unions, intersections, and other -ions of paths
-->
<!-- v5
Jordan OSETE suggests:
* support ways of resetting the clipping region without save/restore
-->

area of the canvas that the clipping region covers, not just the box
given by the em square height and measured text width.</p>

<!-- v6: Drawing text along a given path -->
<!-- v6: Adding text to a path -->
<!-- v5: Drawing text along a given path -->
<!-- v5: Adding text to a path -->
<!-- see also: http://www.w3.org/TR/SVG11/text.html#TextpathLayoutRules -->
<!-- see also: http://developer.mozilla.org/en/docs/Drawing_text_using_a_canvas -->

0 comments on commit 4d9dce8

Please sign in to comment.
You can’t perform that action at this time.