✍️ Signature Pad
Draw a smooth signature with mouse or touch using quadratic curves, undo strokes and export a transparent PNG.
📐 計算公式 / 原理
筆跡繪製:僅一個點時以 arc 畫半徑 = 線寬 ÷ 2 的圓點;多點時從首點 moveTo,對第 i 點與第 i+1 點的中點做 quadraticCurveTo 平滑,最後 lineTo 末點,線帽與連線均為 round。背景:白色模式整幅填白;網格模式白底後每 20 px 畫一條淺色橫豎線;透明模式不繪製。邏輯尺寸 = 畫布畫素尺寸 ÷ devicePixelRatio
用 Canvas 記錄指標軌跡,以 quadraticCurveTo 平滑相鄰點,支援撤銷與清空,匯出透明背景 PNG;用於電子簽名與手寫批註。
✒️ 筆觸預設
📐 畫布比例
📚 深度解析:手寫簽名板
💡 常見使用場景
- 合同簽名。
- 電子表單。
- 本地簽署。
手寫簽名匯出
輸入:滑鼠/觸屏書寫。
處理:canvas 繪製路徑。
輸出:簽名圖下載,本地完成。
❓ 常見問題(FAQ)
- 有法律效力嗎?
- 電子簽名效力視業務與法規;本工具僅生成影像,不代表認證。
- 能重新籤嗎?
- 可清空重畫;匯出前確認無誤,本工具只生成影像不認證。
- 會儲存或上傳我的內容嗎?
- 結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Pointer sampling | collect pointer coordinates from down to up in time order | W3C Pointer Events Level 3 |
| Curve smoothing | fit quadratics through neighbouring points to remove jagged edges | Canvas 2D specification |
| Export fidelity | scale the canvas by the device pixel ratio before export | Canvas 2D specification |
⚠️ 使用說明與注意事項
- 本工具純前端執行,資料不會上傳到伺服器
- 建議在主流瀏覽器(Chrome/Safari/Firefox/Edge)中使用
- 計算結果僅供參考,請以實際應用場景為準