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

16
LINES

< > BotCompany Repo | #1007308 // Test drawTextAlongLine

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

Libraryless. Click here for Pure Java version (6316L/44K/153K).

!7

p {
  BufferedImage img = newBufferedImage(300, 300, Color.white);
  Graphics2D g = imageGraphics(img);
  
  g.setStroke(new BasicStroke(10));
  g.setColor(Color.black);
  g.drawLine(10, 50, 200, 100);
  
  // Will it help?
  g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
         
  drawTextAlongLine(g, "HELLO", 10, 50, 200, 100, 12); 
  showImage(img);
}

Author comment

Began life as a copy of #1007306

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: #1007308
Snippet name: Test drawTextAlongLine
Eternal ID of this version: #1007308/3
Text MD5: b17ed9c1affe899f8ace6f4b7e8dead5
Transpilation MD5: da43ef30d4f260e573315c473eb6b282
Author: stefan
Category: javax / gui
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-15 01:33:58
Source code size: 431 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 393 / 456
Version history: 2 change(s)
Referenced in: [show references]