Libraryless. Click here for Pure Java version (2816L/17K).
1 | static void drawRoundEdgeLine(BufferedImage image, int x1, int y1, int x2, int y2, Color color, double width) {
|
2 | drawRoundEdgeLine(imageGraphics(image), x1, y1, x2, y2, color, width); |
3 | } |
4 | |
5 | static void drawRoundEdgeLine(Graphics2D g, int x1, int y1, int x2, int y2, Color color, double width) {
|
6 | g.setColor(color); |
7 | g.setStroke(new BasicStroke((float) width, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER)); |
8 | g.drawLine(x1, y1, x2, y2); |
9 | } |
10 | |
11 | static void drawRoundEdgeLine(BufferedImage image, Pt a, Pt b, Color color, double width) {
|
12 | drawRoundEdgeLine(imageGraphics(image), a, b, color, width); |
13 | } |
14 | |
15 | static void drawRoundEdgeLine(Graphics2D g, Pt a, Pt b, Color color, double width) {
|
16 | drawRoundEdgeLine(g, a.x, a.y, b.x, b.y, color, width); |
17 | } |
Began life as a copy of #1006921
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1006925 |
| Snippet name: | drawRoundEdgeLine |
| Eternal ID of this version: | #1006925/10 |
| Text MD5: | 75284d624fd69fc240a2b0971027ae76 |
| Transpilation MD5: | 5ddc843b72347003edab148e65448e5f |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-01-07 18:43:43 |
| Source code size: | 759 bytes / 17 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 759 / 900 |
| Version history: | 9 change(s) |
| Referenced in: | [show references] |