Libraryless. Click here for Pure Java version (3086L/18K).
import java.awt.font.FontRenderContext; import java.awt.font.LineMetrics; import java.awt.geom.Rectangle2D; sclass FontMetricsWrapper extends FontMetrics { FontMetrics target; *(FontMetrics target) { super(target.getFont()); this.target = target; } @Override public Font getFont() { return target.getFont(); } @Override public FontRenderContext getFontRenderContext() { return target.getFontRenderContext(); } @Override public int getLeading() { return target.getLeading(); } @Override public int getAscent() { return target.getAscent(); } @Override public int getDescent() { return target.getDescent(); } @Override public int getHeight() { return target.getHeight(); } @Override public int getMaxAscent() { return target.getMaxAscent(); } @Override public int getMaxDescent() { return target.getMaxDescent(); } @Override @Deprecated public int getMaxDecent() { return target.getMaxDecent(); } @Override public int getMaxAdvance() { return target.getMaxAdvance(); } @Override public int charWidth(int codePoint) { return target.charWidth(codePoint); } @Override public int charWidth(char ch) { return target.charWidth(ch); } @Override public int stringWidth(String str) { return target.stringWidth(str); } @Override public int charsWidth(char[] data, int off, int len) { return target.charsWidth(data, off, len); } @Override public int bytesWidth(byte[] data, int off, int len) { return target.bytesWidth(data, off, len); } @Override public int[] getWidths() { return target.getWidths(); } @Override public boolean hasUniformLineMetrics() { return target.hasUniformLineMetrics(); } @Override public LineMetrics getLineMetrics(String str, Graphics context) { return target.getLineMetrics(str, context); } @Override public LineMetrics getLineMetrics(String str, int beginIndex, int limit, Graphics context) { return target.getLineMetrics(str, beginIndex, limit, context); } @Override public LineMetrics getLineMetrics(char[] chars, int beginIndex, int limit, Graphics context) { return target.getLineMetrics(chars, beginIndex, limit, context); } @Override public LineMetrics getLineMetrics(java.text.CharacterIterator ci, int beginIndex, int limit, Graphics context) { return target.getLineMetrics(ci, beginIndex, limit, context); } @Override public Rectangle2D getStringBounds(String str, Graphics context) { return target.getStringBounds(str, context); } @Override public Rectangle2D getStringBounds(String str, int beginIndex, int limit, Graphics context) { return target.getStringBounds(str, beginIndex, limit, context); } @Override public Rectangle2D getStringBounds(char[] chars, int beginIndex, int limit, Graphics context) { return target.getStringBounds(chars, beginIndex, limit, context); } @Override public Rectangle2D getStringBounds(java.text.CharacterIterator ci, int beginIndex, int limit, Graphics context) { return target.getStringBounds(ci, beginIndex, limit, context); } @Override public Rectangle2D getMaxCharBounds(Graphics context) { return target.getMaxCharBounds(context); } @Override public String toString() { return target.toString(); } }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1031249 |
Snippet name: | FontMetricsWrapper |
Eternal ID of this version: | #1031249/6 |
Text MD5: | a271cfdb16d2f2362e93888439c244b0 |
Transpilation MD5: | 812ebdb5c2796ddc9922c3874bf08f65 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-05-25 19:08:43 |
Source code size: | 3585 bytes / 148 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 238 / 404 |
Version history: | 5 change(s) |
Referenced in: | [show references] |