BasicShapeDrawer

Basic shape drawer. Used for native drawing primitives using OpenGL.

Constructors

Link copied to clipboard
constructor(address: Long)

Types

Link copied to clipboard
object Companion

Basic Shape Drawer companion

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Functions

Link copied to clipboard
external fun createTexture(image: Image, width: Int, height: Int): Int
fun createTexture(image: ByteBuffer, width: Int, height: Int, format: EColorFormat): Int
fun createTexture(image: ByteArray, width: Int, height: Int, format: EColorFormat): Int

Creates a texture based on provided inputs.

Link copied to clipboard
fun createTextureByFile(filepath: String, fileFormat: EImageFileFormat, format: EColorFormat): Int

Creates a texture based on provided inputs.

Link copied to clipboard
external fun deleteTexture(textureId: Int)

Deletes a previously created texture.

Link copied to clipboard
external fun drawCircle(xCenter: Float, yCenter: Float, radius: Float, color: Int, filled: Boolean = false)

Draws a circle.

Link copied to clipboard
external fun drawLine(xStart: Float, yStart: Float, xEnd: Float, yEnd: Float, color: Int = 0, thickness: Float = 1.0f)

Draws a line.

Link copied to clipboard
external fun drawRectangle(left: Float, top: Float, right: Float, bottom: Float, color: Int = 0, filled: Boolean = false, thickness: Float = 1.0f)

Draws a rectangle.

Link copied to clipboard
external fun drawText(text: String, xPos: Float, yPos: Float, style: TextState)

Draws a text.

Link copied to clipboard
external fun drawTexturedRectangle(textureId: Int, left: Float, top: Float, right: Float, bottom: Float, color: Int = 0, filled: Boolean = false, thickness: Float = 1.0f)

Draws a rectangle.

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard
fun release()

Releases the native referenced value of this object if:

Link copied to clipboard
external fun renderShapes(translationFactor: XyF? = null, scaleFactor: XyF? = null)

Renders the shapes called before this.