whatwg/html

Small clarity improvements to canvas transform methods

開放

#2,848 建立於 2017年7月19日

 (7 則留言) (1 個反應) (0 位負責人)HTML (2,520 個分叉)batch import
clarificationgood first issuetopic: canvas

倉庫指標

星標
 (7,654 顆星)
PR 合併指標
 (平均合併 42天 18小時) (30 天內合併 22 個 PR)

描述

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 :)

貢獻者指南