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).

1  
!7
2  
3  
p {
4  
  BufferedImage img = newBufferedImage(300, 300, Color.white);
5  
  Graphics2D g = imageGraphics(img);
6  
  
7  
  g.setStroke(new BasicStroke(10));
8  
  g.setColor(Color.black);
9  
  g.drawLine(10, 50, 200, 100);
10  
  
11  
  // Will it help?
12  
  g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
13  
         
14  
  drawTextAlongLine(g, "HELLO", 10, 50, 200, 100, 12); 
15  
  showImage(img);
16  
}

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: 467 / 557
Version history: 2 change(s)
Referenced in: [show references]