Libraryless. Click here for Pure Java version (8757L/49K).
| 1 | static Shape onePathToShape(OnePath onePath) {
 | 
| 2 | if (onePath == null) null; | 
| 3 | |
| 4 | new Path2D.Float path; | 
| 5 | Iterator<Pt> it = onePath.pointIterator(); | 
| 6 | Pt p = it.next(); | 
| 7 | path.moveTo(p.x, p.y); | 
| 8 | |
| 9 |   while (it.hasNext()) {
 | 
| 10 | p = it.next(); | 
| 11 | path.lineTo(p.x, p.y); | 
| 12 | } | 
| 13 | |
| 14 | ret path; | 
| 15 | } | 
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: | 358 / 459 | 
| Referenced in: | [show references] |