Sayed's Blog

drawlang > docs > users > library > globals

Global Functions

  • clock() - Gets the current time in milliseconds.

  • str(x) - Changes input to string representation.

  • print(x) - Prints input to console.

  • println(x) - Prints input to console and adds new line.

  • Array(size) - Creates an array instance with the size of the input.

  • getCanvas() - Returns reference to editor canvas.

  • Canvas(width, height) - Returns a reference to new canvas instance.

  • Color(red, green, blue, alpha) - Creates a new color instance with given rgba values.

  • loadImage(pathString) - Loads an image from given path string and returns image instance.

  • saveImage(image, pathString) - Saves image to given path.

  • List() - Returns empty list instance.

  • Map() - Returns empty Map instance

    © 2023