ضع مركز الطارة عند (+) ووازن الخط الأفقي
الخروج المتوقع للحبل: جهة اليمين
const ratio = tempCanvas.width / canvas.width; const cX = tempCanvas.width / 2; const cY = tempCanvas.height / 2; const r = (Math.min(canvas.width / 2, canvas.height / 2) * 0.7) * ratio; tCtx.strokeStyle = '#ff3b30'; tCtx.lineWidth = 8; const ang = Math.PI + (150 * Math.PI / 180); tCtx.beginPath(); tCtx.moveTo(cX, cY); tCtx.lineTo(cX + r * Math.cos(ang), cY + r * Math.sin(ang)); tCtx.stroke(); const link = document.createElement('a'); link.download = `Elevator_Angle_Report.png`; link.href = tempCanvas.toDataURL(); link.click(); } setupCamera().then(draw);