whatwg/html

Small clarity improvements to canvas transform methods

Offen

#2.848 geöffnet am 19.07.2017

 (7 Kommentare) (1 Reaktion) (0 zugewiesene Personen)HTML (2.520 Forks)batch import
clarificationgood first issuetopic: canvas

Repository-Metriken

Stars
 (7.654 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 42T 18h) (22 gemergte PRs in 30 T)

Beschreibung

While in the area for #2845, I noticed the following small tweaks that we could make to improve that section of the spec:

  • Replace "abort these steps" with "return" everywhere. (The latter is a more modern convention, per Infra.)
  • Link "multiplying" in the definition of transform(a, b, c, d, e, f) to https://drafts.fxtf.org/geometry/#matrix-multiply
  • Re-do setTransform(a, b, c, d, e, f) steps 2-3 to reset the current transformation matrix to the appropriate matrix (a c e / b d f / 0 0 1), instead of resetting the matrix to the identity matrix then invoking the transform() method. It's bad practice to invoke methods from other methods.

This is a good first bug :)

Contributor Guide