แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > ผู้ใช้ > svgPaths > lineTo
utils.svgPaths.lineTo()
ลากเส้นจากจุดปัจจุบันไปยังจุดสิ้นสุด ซึ่งก็คือจุดปัจจุบันถูกเลื่อนโดย dx ตามแกน x และ dy ตามแกน y พิกัดเหล่านี้จะไม่มีหน่วย ดังนั้นในระบบพิกัดของผู้ใช้ โปรดดูที่ developer.mozilla.org/th-TH/docs/Web/SVG/Tutorial/Paths#Line_commands
ลายเซ็น:
export declare function lineTo(dx: number, dy: number): string;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
dx |
ตัวเลข |
พิกัด x สัมพัทธ์ |
Dy |
ตัวเลข |
พิกัด y สัมพัทธ์ |
การคืนสินค้า:
สตริง
สตริงของรูปแบบ " l dx,dy '
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-22 UTC
[null,null,["อัปเดตล่าสุด 2024-08-22 UTC"],[[["The `utils.svgPaths.lineTo()` function generates an SVG path command to draw a line from the current point to a new point relative to the current position."],["It takes two arguments: `dx` (the change in x-coordinate) and `dy` (the change in y-coordinate), both in user coordinate units."],["The function returns a string representing the SVG path command for drawing the line, formatted as ' l dx,dy '."],["This command is used within SVG path definitions to create line segments, contributing to the overall shape or drawing within the SVG."]]],[]]