HTML5 Canvas Transformation Matrix

前端 未结 4 2208
悲&欢浪女
悲&欢浪女 2020-12-24 14:19

I don\'t understand what the Transformation Matrix is and how to work with it.

The following will draw a circle at 0, 0 of my canvas: (generated from an svg conv

4条回答
  •  天命终不由人
    2020-12-24 15:21

    I have implemented a very simple Transformation class to keep track of the Canvas transformation matrix. You can use it to see just how the matrix works and what it is doing. The class will also allow you to keep track of the matrix since the Canvas won't allow you to retrieve the current matrix.

提交回复
热议问题