Package panamagl.utils
Class GraphicsUtils
java.lang.Object
panamagl.utils.GraphicsUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImagecreateCompatibleImage(int width, int height) static voiddrawString(Graphics2D g2d, Font font, boolean useOSFontRendering, String string, int x, int y) A draw string method allowing to bypass OS font rendering if noticing font rendering glitches.static doublegetPixelScaleX(Component component) static doublegetPixelScaleX(Graphics2D g2d) static doublegetPixelScaleY(Component component) static doublegetPixelScaleY(Graphics2D g2d) static voidstatic voidprintGraphicsEnvironment(String header) static Stringstr(ImageCapabilities ic) static Rectangle2DstringBounds(Graphics2D g2d, String string) static Rectangle2DstringBounds(String string, Font font) static intstringWidth(Graphics2D g2d, String string) static intstringWidth(String string, Font font) Compute string width using the Graphics2D instance of a hidden image.
-
Constructor Details
-
GraphicsUtils
public GraphicsUtils()
-
-
Method Details
-
drawString
public static void drawString(Graphics2D g2d, Font font, boolean useOSFontRendering, String string, int x, int y) A draw string method allowing to bypass OS font rendering if noticing font rendering glitches. It may be worth invokingright before.invalid reference
#configureRenderingHints(Graphics2D) -
stringWidth
-
stringWidth
-
stringBounds
-
stringBounds
-
getPixelScaleX
-
getPixelScaleX
-
getPixelScaleY
-
getPixelScaleY
-
createCompatibleImage
-
printGraphicsEnvironment
-
print
-
str
-