public class GraphicsUtil
extends java.lang.Object
Graphics2D
drawing and graphics.Constructor and Description |
---|
GraphicsUtil() |
Modifier and Type | Method and Description |
---|---|
static java.awt.geom.Rectangle2D.Float |
calcTextBox(java.awt.Graphics2D g,
java.lang.String text,
double centerX,
double centerY) |
static java.awt.geom.Rectangle2D.Float |
calcTextBox(java.awt.Graphics2D g,
java.lang.String text,
double centerX,
double centerY,
boolean addAscentForDraw) |
static java.awt.geom.Rectangle2D.Float |
calcTextBox(java.awt.Graphics2D g,
java.lang.String text,
double centerX,
double centerY,
boolean addAscentForDraw,
ObjTools.RefInt ascent) |
static java.awt.geom.Rectangle2D.Float |
drawTextCentered(java.awt.Graphics2D g,
java.lang.String text,
double centerX,
double centerY) |
static java.awt.geom.Rectangle2D.Float |
drawTextCentered(java.awt.Graphics2D g,
java.lang.String text,
java.awt.geom.Point2D centerPos) |
static java.awt.geom.Rectangle2D.Float |
drawTextCentered(java.awt.Graphics2D g,
java.lang.String text,
java.awt.geom.Rectangle2D boundingBox) |
public static java.awt.geom.Rectangle2D.Float calcTextBox(java.awt.Graphics2D g, java.lang.String text, double centerX, double centerY)
public static java.awt.geom.Rectangle2D.Float calcTextBox(java.awt.Graphics2D g, java.lang.String text, double centerX, double centerY, boolean addAscentForDraw)
public static java.awt.geom.Rectangle2D.Float calcTextBox(java.awt.Graphics2D g, java.lang.String text, double centerX, double centerY, boolean addAscentForDraw, @Nullable ObjTools.RefInt ascent)
public static java.awt.geom.Rectangle2D.Float drawTextCentered(java.awt.Graphics2D g, java.lang.String text, double centerX, double centerY)
public static java.awt.geom.Rectangle2D.Float drawTextCentered(java.awt.Graphics2D g, java.lang.String text, java.awt.geom.Point2D centerPos)
public static java.awt.geom.Rectangle2D.Float drawTextCentered(java.awt.Graphics2D g, java.lang.String text, java.awt.geom.Rectangle2D boundingBox)