Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1014970 // fillPolygon

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3108L/17K).

1  
svoid fillPolygon(Graphics2D g, L<Pt> points, Color color) {
2  
  g.setColor(color);
3  
  g.fillPolygon(pointsX(points), pointsY(points), l(points));
4  
}
5  
6  
svoid fillPolygon(BufferedImage image, L<Pt> points, Color color) {
7  
  fillPolygon(imageGraphics(image), points, color);
8  
}

Author comment

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: #1014970
Snippet name: fillPolygon
Eternal ID of this version: #1014970/5
Text MD5: fdf1303a2eff0b78fd6261fb206804c1
Transpilation MD5: bc9189a7547a9eb7176fa13ce5dcb8d2
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-03 18:16:47
Source code size: 275 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 448 / 559
Version history: 4 change(s)
Referenced in: [show references]