Re: [whatwg] Books on canvas

2014-09-23 Thread Simon Sarris
Sorry, but the WHATWG mailing list is a list for feedback of WHATWG specifications. This is not the place for book or learning discussions. Simon On Tue, Sep 23, 2014 at 4:03 PM, L2L 2L emanuelal...@hotmail.com wrote: I'm reading this one book, but it's heavy in math equation. And other book

Re: [whatwg] Proposal: change 2D canvas currentTransform to getter method

2014-03-24 Thread Simon Sarris
On Mon, Mar 24, 2014 at 11:26 AM, Hwang, Dongseong dongseong.hw...@intel.com wrote: Looking over this thread, we make a consensus not to expose currentTransform attribute. Now, all we have to decide is API Option 1, SVGMatrix getTransform(); void setTransform(SVGMatrix); -- it overrides

Re: [whatwg] Proposal: change 2D canvas currentTransform to getter method

2014-03-20 Thread Simon Sarris
On Thu, Mar 20, 2014 at 1:52 PM, Justin Novosad ju...@google.com wrote: Hello all, The recently added currentTransform attribute on CanvasRenderingContext2D gives shared access to the rendering context's transform. By shared, I mean: a) this code modifies the CTM: var matrix =

Re: [whatwg] Bicubic filtering on context.drawImage

2014-03-14 Thread Simon Sarris
is a (admittedly soft) version of This site/webapp best viewed in Netscape Navigator. Simon Sarris

[whatwg] Canvas - Somewhat inconsistent rules in the spec for drawImage

2013-09-20 Thread Simon Sarris
rect arguments. Simon Sarris ~~~ For reference, below is a simple example showing both a zero-sized img being drawn and a zero-sized canvas: // this img's width/height/naturalWidth/naturalHeight are all zero: var img = document.createElement('img'); // Totally fine, no error

Re: [whatwg] Adding 2D Canvas features

2013-09-05 Thread Simon Sarris
Just FYI, Chrome now has a relatively new bug for Canvas v5 API additions that references all the missing features that some posters were concerned about. The default take from this bug report is that all of these are greenlighted to be worked on (no objections so far)

[whatwg] Canvas - Should setLineDash be a nullable sequence?

2013-08-20 Thread Simon Sarris
two things. It sets the dashing properties, but it also acts as the only way to enable/disable dashing, I think that null seems appropriate. For the record, AFAIK no other browser has implemented setLineDash yet, though ctx.mozDash defaults to null and does accept null. Simon Sarris

Re: [whatwg] remove resetClip from the Canvas 2D spec

2013-08-13 Thread Simon Sarris
If this is strictly a performance issue, then we definitely should fix that before adding new API, IMHO. It would be great to get some reduced test cases where save()/restore() is a bottleneck. I'd argue its not strictly a performance issue. More generally its awkward that you can reset any

Re: [whatwg] remove resetClip from the Canvas 2D spec

2013-08-12 Thread Simon Sarris
I think most performance-minded use cases will be fine with junov's idea since they will not want to touch the stack in the first place. Here's a simple use case: Suppose there are nested objects to be drawn, Panels, TextBlocks, and other visual elements. Panels are containers that draw a

Re: [whatwg] remove resetClip from the Canvas 2D spec

2013-08-12 Thread Simon Sarris
Good point, I think part of the problem has to do with the fact that save is non-selective (saves all of the state). Yes, since save() and restore() save and restore everything, it creates the side effect of needing to set ctx.font/fillStyle/strokeStyle more often than otherwise, which are slow

Re: [whatwg] remove resetClip from the Canvas 2D spec

2013-08-09 Thread Simon Sarris
I originally opened this bug/request for performance reasons, since I try to avoid all use of save() and restore() on the context. As a refresher resetting any piece of context state by itself is possible except for clipping regions. I do see Rik's point about the mess a resetClip() function

Re: [whatwg] remove resetClip from the Canvas 2D spec

2013-01-29 Thread Simon Sarris
I opened the bug about this originally back in 2011, asking that it be added (it was in March 2012 to the WHATWG spec). For the sake of the discussion that bug is here: https://www.w3.org/Bugs/Public/show_bug.cgi?id=14499 The reason is that (almost) every single piece of canvas context state can

[whatwg] Hit region + fillRule concerns

2013-01-15 Thread Simon Sarris
to be done anyway. In short, if fill() and *isPointInPath() are* changed to specify *fillRule* , then *HitRegionOptions* (the argument to *addHitRegion*) or the *Path* given in the options needs to change too. Simon Sarris