sclass VGridFinderGUI { BufferedImage img; ImageSurface is; JSlider slider; int ww = 10; *(BufferedImage *img) {} void show { is = showImage(img); slider = jverticalLiveSlider(1, 50, ww, voidfunc(Int value) { ww = value; split(); }); addToWindowRight(is, withMargin(sliderWithValueLabel(slider))); split(); } void split { new L<Rect> rects; int w = img.getWidth(), h = img.getHeight(); for (int y = 0; y < h; y += ww) rects.add(new Rect(0, y, w, min(ww, h-y))); is.setImage(mergeImagePartsVertically(new RGBImage(img), rects)); } }
Began life as a copy of #1015499
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: | #1015501 |
Snippet name: | VGridFinderGUI |
Eternal ID of this version: | #1015501/2 |
Text MD5: | 30941bbc3feba848dcb21ca2844e3ec3 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-15 03:24:31 |
Source code size: | 637 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 348 / 919 |
Version history: | 1 change(s) |
Referenced in: | #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674) |