source:
node_modules/d3-shape/src/symbol/diamond2.js@
a762898
| Last change on this file since a762898 was e4c61dd, checked in by , 6 months ago | |
|---|---|
|
|
| File size: 249 bytes | |
| Line | |
|---|---|
| 1 | import {sqrt} from "../math.js"; |
| 2 | |
| 3 | export default { |
| 4 | draw(context, size) { |
| 5 | const r = sqrt(size) * 0.62625; |
| 6 | context.moveTo(0, -r); |
| 7 | context.lineTo(r, 0); |
| 8 | context.lineTo(0, r); |
| 9 | context.lineTo(-r, 0); |
| 10 | context.closePath(); |
| 11 | } |
| 12 | }; |
Note:
See TracBrowser
for help on using the repository browser.
