Title: Dashed stroke becomes solid on curves (bezierCurveTo) · Issue #600 · treeform/pixie · GitHub
Open Graph Title: Dashed stroke becomes solid on curves (bezierCurveTo) · Issue #600 · treeform/pixie
X Title: Dashed stroke becomes solid on curves (bezierCurveTo) · Issue #600 · treeform/pixie
Description: When a path built with bezierCurveTo is stroked with a dash pattern (ctx.setLineDash), the dashes are not regular along the curve. Around the crests and troughs of a sine wave, the stroke is drawn solid instead of dashed, while the slope...
Open Graph Description: When a path built with bezierCurveTo is stroked with a dash pattern (ctx.setLineDash), the dashes are not regular along the curve. Around the crests and troughs of a sine wave, the stroke is drawn ...
X Description: When a path built with bezierCurveTo is stroked with a dash pattern (ctx.setLineDash), the dashes are not regular along the curve. Around the crests and troughs of a sine wave, the stroke is drawn ...
Opengraph URL: https://github.com/treeform/pixie/issues/600
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dashed stroke becomes solid on curves (bezierCurveTo)","articleBody":"When a path built with `bezierCurveTo` is stroked with a dash pattern\n(`ctx.setLineDash`), the dashes are not regular along the curve. Around the\ncrests and troughs of a sine wave, the stroke is drawn solid instead of dashed,\nwhile the slopes keep their dashes.\nSteps to reproduce : \n\n```nim\nimport pixie, std/math\n\nconst\n amplitude = 50.float32\n period = 200.float32\n left = 30.float32\n baseY = 110.float32\n\nproc sineY(x: float32): float32 =\n baseY - amplitude * sin(x / period * 2 * PI)\n\nproc sineSlope(x: float32): float32 =\n -amplitude * (2 * PI / period) * cos(x / period * 2 * PI)\n\nlet image = newImage(660, 220)\nimage.fill(rgba(255, 255, 255, 255))\n\nlet ctx = newContext(image)\nctx.strokeStyle = \"#000000\"\nctx.lineWidth = 2\nctx.setLineDash(@[4.float32, 6])\n\n# One cubic Bezier per quarter period :\nlet path = newPath()\npath.moveTo(left, sineY(0))\nlet h = period / 4\nfor q in 0 ..\u003c 12:\n let\n x0 = q.float32 * h\n x1 = x0 + h\n path.bezierCurveTo(\n left + x0 + h / 3, sineY(x0) + sineSlope(x0) * h / 3,\n left + x1 - h / 3, sineY(x1) - sineSlope(x1) * h / 3,\n left + x1, sineY(x1))\nctx.stroke(path)\n\nimage.writeFile(\"sine_dash.png\")\n```\n\n\u003cimg width=\"1320\" height=\"440\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/1944905b-e53d-4a8c-9977-96c7cc9a63df\" />\n","author":{"url":"https://github.com/nico-robert","@type":"Person","name":"nico-robert"},"datePublished":"2026-10-09T21:12:12Z","url":"https://github.com/treeform/pixie/issues/600"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b7e24391-53c4-75f5-1b49-e2b11d961f71 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 99A4:2CF9FD:89E337:B45FB9:6B04CDB1 |
| html-safe-nonce | 63fca71e532a1c9adca1835f42e3b0645a3ea1dcf80298f44bbb06519286f09f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUE0OjJDRjlGRDo4OUUzMzc6QjQ1RkI5OjZCMDRDREIxIiwidmlzaXRvcl9pZCI6IjE0NjI3ODUyODQ5MzE2MzY2NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d4fbdcca9a2b9449c24819b154df4b837f51c5c183ba7ccbbd505d857fe92bcd |
| hovercard-subject-tag | issue:5784710443 |
| github-keyboard-shortcuts | repository,source-code,file-tree,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/treeform/pixie/600/issue_layout |
| twitter:image | https://opengraph.githubassets.com/259c1fa70a18b5669135088cf86fdeb83bfdea59fa51a36021fcea143fef58f8/treeform/pixie/issues/600 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/259c1fa70a18b5669135088cf86fdeb83bfdea59fa51a36021fcea143fef58f8/treeform/pixie/issues/600 |
| og:image:alt | When a path built with bezierCurveTo is stroked with a dash pattern (ctx.setLineDash), the dashes are not regular along the curve. Around the crests and troughs of a sine wave, the stroke is drawn ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nico-robert |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27ed421e5c2dac040a37529b5b9191edcc4a3de70521471e81fb4b4d9dc2aa7d |
| turbo-cache-control | no-preview |
| go-import | github.com/treeform/pixie git https://github.com/treeform/pixie.git |
| octolytics-dimension-user_id | 125948 |
| octolytics-dimension-user_login | treeform |
| octolytics-dimension-repository_id | 314427501 |
| octolytics-dimension-repository_nwo | treeform/pixie |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 314427501 |
| octolytics-dimension-repository_network_root_nwo | treeform/pixie |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63dc19014c621c67306d7899c04c78dcd0d95803 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width