WeChat アプレットでscaleメソッドを呼び出して、水平座標と垂直座標をスケールします。
scale
define
を呼び出すと、倍数が乗算されます。 scale
方法后,之后创建的路径其横纵坐标会被缩放。多次调用scale
を呼び出すと、倍数が乗算されます。 scale
方法后,之后创建的路径其横纵坐标会被缩放。多次调用scale
const ctx = wx.createCanvasContext('myCanvas') ctx.strokeRect(10, 10, 25, 15) ctx.scale(2, 2) ctx.strokeRect(10, 10, 25, 15) ctx.scale(2, 2) ctx.strokeRect(10, 10, 25, 15) ctx.draw()