Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Latest commit

 

History

History
77 lines (31 loc) · 1.04 KB

draw-util.md

File metadata and controls

77 lines (31 loc) · 1.04 KB

Draw Util

drawRect(double x, double y, double width, double height, int color)

Draws a rectangle at the given coordinates, with the specified colour.

Parameters

x - The X coordinate

y - The Y coordinate

width - The width of the rectangle

height - The height of the rectangle

color - The colour of the string

drawString(String text, double x, double y, int color)

Draws a string at the given coordinates, with the specified colour.

Parameters

text - The text to draw

x - The X coordinate

y - The Y coordinate

color - The colour of the string

drawStringWithShadow(String text, double x, double y, int color)

Draws a string at the given coordinates, with the specified colour, and a shadow.

Parameters

text - The text to draw

x - The X coordinate

y - The Y coordinate

color - The colour of the string

getStringWidth(String text)

Returns double

Gets the width of a string

Parameters

text - The text to get the width of

getFontHeight()

Returns double

Gets the font height