Libraryless. Click here for Pure Java version (8757L/49K).
static Shape onePathToShape(OnePath onePath) { if (onePath == null) null; new Path2D.Float path; Iterator<Pt> it = onePath.pointIterator(); Pt p = it.next(); path.moveTo(p.x, p.y); while (it.hasNext()) { p = it.next(); path.lineTo(p.x, p.y); } ret path; }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035269 |
Snippet name: | onePathToShape |
Eternal ID of this version: | #1035269/1 |
Text MD5: | 6cb35f997377237dd9d625849450c8a4 |
Transpilation MD5: | a3064dac7b9de8800ceeb1fdc265872d |
Author: | stefan |
Category: | javax / gazelle 22 |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-28 17:22:03 |
Source code size: | 302 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 107 / 159 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |