Libraryless. Click here for Pure Java version (1969L/13K).
svoid drawRecognitionGrid(Graphics2D g, RecognitionGrid grid) { if (g == null || grid == null) ret; for (int row = 0; row < grid.rows; row++) for (int col = 0; col < grid.cols; col++) { RecognitionGrid.Cell c = grid.getCell(col, row); if (c == null) continue; Rect r = grid.cellRect(col, row); fillRect(g, r, colorFromRGBA(c.outerColor)); fillRect(g, shrinkRect(r, iround(r.w/6)), colorFromRGBA(c.middleColor)); fillRect(g, shrinkRect(r, iround(r.w/3)), colorFromRGBA(c.centerColor)); } }
Began life as a copy of #1024315
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024317 |
Snippet name: | drawRecognitionGrid |
Eternal ID of this version: | #1024317/4 |
Text MD5: | 5403fdd81e8039e9973f25181a2e3c58 |
Transpilation MD5: | 5c9f716f043ec307e6f9324589ecb9ed |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-02 00:05:51 |
Source code size: | 547 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 227 / 309 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |