Libraryless. Click here for Pure Java version (110L/1K).
svoid drawTextWithTopLeftCornerAt(Graphics2D g, S text, Pt etc p, Color color) { g.setColor(color); FontMetrics fm = g.getFontMetrics(); int h = fm.getHeight(); g.drawString(text, p.x, p.y+h); }
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: | 161 / 236 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1031119 - drawCenteredText |