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

10
LINES

< > BotCompany Repo | #1023067 // newTextLayout

JavaX fragment (include)

1  
import java.awt.font.*;
2  
import java.awt.geom.*;
3  
4  
static TextLayout newTextLayout(S text, Font font, Graphics g) {
5  
  ret new TextLayout(text, font, ((Graphics2D) g).getFontRenderContext());
6  
}
7  
8  
static TextLayout newTextLayout(S text, Font font, Component c) {
9  
  ret newTextLayout(text, font, c.getGraphics());
10  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023067
Snippet name: newTextLayout
Eternal ID of this version: #1023067/3
Text MD5: f7841c72eb8223f83fc5e449cbeda525
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-30 20:30:33
Source code size: 318 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 257 / 293
Version history: 2 change(s)
Referenced in: [show references]