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

15
LINES

< > BotCompany Repo | #1007547 // Headless Rendering Test

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 616K of libraries. Click here for Pure Java version (7590L/54K).

!7

p {
  // This doesn't do anything (maybe it's too late?), you need to put it in the command line (-Djava.awt.headless=true).
  System.setProperty("java.awt.headless", "true");
  
  print("Headless: " + isHeadless());
  new CirclesAndLines cal;
  Circle a = cal.circle_autoVis("Yo", 0.2, 0.5);
  Circle b = cal.circle_autoVis("Yo-Yo", 0.8, 0.5);
  cal.arrow(a, "ARROW", b);
  BufferedImage img = cal.makeImage(600, 600);
  byte[] png = toPNG(img);
  print("PNG made. " + l(png) + " bytes");
}

Author comment

Began life as a copy of #1007546

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1007547
Snippet name: Headless Rendering Test
Eternal ID of this version: #1007547/3
Text MD5: 8bef9fed707dfaf82b20171ebb9e85a5
Transpilation MD5: eef41eddaa829cf4d494d45a3bda684e
Author: stefan
Category: javax / a.i. / html
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-26 15:00:56
Source code size: 509 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 411 / 992
Version history: 2 change(s)
Referenced in: [show references]