Libraryless. Click here for Pure Java version (110L/1K).
1 | svoid drawTextWithTopLeftCornerAt(Graphics2D g, S text, Pt etc p, Color color) {
|
2 | g.setColor(color); |
3 | FontMetrics fm = g.getFontMetrics(); |
4 | int h = fm.getHeight(); |
5 | g.drawString(text, p.x, p.y+h); |
6 | } |
Began life as a copy of #1015614
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031118 |
| Snippet name: | drawTextWithTopLeftCornerAt |
| Eternal ID of this version: | #1031118/2 |
| Text MD5: | 74bb26c0f5758b0f23f0a4b7fe840e7f |
| Transpilation MD5: | bbcda1bf55996a6e08560aa33f49b31e |
| Author: | stefan |
| Category: | javax / imaging |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-09-10 16:34:58 |
| Source code size: | 207 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 374 / 493 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |