ur_rna.Utilities.geom

## Class GraphicsUtil

- java.lang.Object
- - ur_rna.Utilities.geom.GraphicsUtil

-     public class GraphicsUtil
      extends java.lang.Object

  Utilities to help with `Graphics2D` drawing and graphics.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphicsUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    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)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GraphicsUtil

          public GraphicsUtil()

  - ### Method Detail

    - #### calcTextBox

          public static java.awt.geom.Rectangle2D.Float calcTextBox(java.awt.Graphics2D g,
                                                                    java.lang.String text,
                                                                    double centerX,
                                                                    double centerY)

    - #### calcTextBox

          public static java.awt.geom.Rectangle2D.Float calcTextBox(java.awt.Graphics2D g,
                                                                    java.lang.String text,
                                                                    double centerX,
                                                                    double centerY,
                                                                    boolean addAscentForDraw)

    - #### calcTextBox

          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)

    - #### drawTextCentered

          public static java.awt.geom.Rectangle2D.Float drawTextCentered(java.awt.Graphics2D g,
                                                                         java.lang.String text,
                                                                         double centerX,
                                                                         double centerY)

    - #### drawTextCentered

          public static java.awt.geom.Rectangle2D.Float drawTextCentered(java.awt.Graphics2D g,
                                                                         java.lang.String text,
                                                                         java.awt.geom.Point2D centerPos)

    - #### drawTextCentered

          public static java.awt.geom.Rectangle2D.Float drawTextCentered(java.awt.Graphics2D g,
                                                                         java.lang.String text,
                                                                         java.awt.geom.Rectangle2D boundingBox)