Class GraphicsUtil
java.lang.Object
org.locationtech.jtstest.testbuilder.ui.GraphicsUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddrawStringAlign(Graphics2D g2d, String s, int x, int y, float anchorx, float anchory) static voiddrawStringAlign(Graphics2D g2d, String s, int x, int y, float anchorx, float anchory, int offset) static voiddrawStringAlignCenter(Graphics2D g2d, String s, int x, int y)
-
Constructor Details
-
GraphicsUtil
public GraphicsUtil()
-
-
Method Details
-
drawStringAlignCenter
-
drawStringAlign
public static void drawStringAlign(Graphics2D g2d, String s, int x, int y, float anchorx, float anchory) - Parameters:
g2d-s-x-y-anchorx- value between 0 and 1 indicating anchor position along Xanchory- value between 0 and 1 indicating anchor position along Y
-
drawStringAlign
public static void drawStringAlign(Graphics2D g2d, String s, int x, int y, float anchorx, float anchory, int offset) - Parameters:
g2d-s-x-y-anchorx- value between 0 and 1 indicating anchor position along Xanchory- value between 0 and 1 indicating anchor position along Yoffset- offset distance from anchor point
-