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

14
LINES

< > TinyBrain | #1010643 - createGraphics

JavaX fragment (include)

static Map<BufferedImage, O> createGraphics_modulators = synchroIdentityHashMap();

static Graphics2D createGraphics(BufferedImage img) {
  Graphics2D g = img.createGraphics();
  O mod = createGraphics_modulators.get(img);
  if (mod != null)
    callF(mod, g);
  ret g;
}

// mod: voidfunc(Graphics2D)
static void createGraphics_modulate(BufferedImage img, O mod) {
  mapPut2(createGraphics_modulators, img, mod);
}

download  show line numbers  debug dex   

Travelled to 9 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1010643
Snippet name: createGraphics
Eternal ID of this version: #1010643/1
Text MD5: bd637d9eab7c8e547a1e4f6b48a34c74
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-24 01:06:29
Source code size: 428 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 112 / 122
Referenced in: [show references]