JvmRcPlatformServices


Implementation of RcPlatformServices intended for multi-platform use on the JVM.

Summary

Public constructors

android

Public functions

open Int

Returns the height of a platform-specific image object

android
open Int

Returns the width of a platform-specific image object

android
open ByteArray?

Converts a platform-specific image object into a platform-independent byte buffer

android
open Boolean

Returns true if the platform-specific image object has format ALPHA_8

android
open Unit
log(category: RcPlatformServices.LogCategory, message: String)

Log a message

android
open Any
parsePath(pathData: String)

Parse a path represented as a string and returns a Path object

android
open FloatArray?

Converts a platform-specific path object into a platform-independent float buffer

android

Public constructors

JvmRcPlatformServices

JvmRcPlatformServices()

Public functions

getImageHeight

open fun getImageHeight(image: Any): Int

Returns the height of a platform-specific image object

Parameters
image: Any

platform-specific image object

Returns
Int

the height of the image in pixels

getImageWidth

open fun getImageWidth(image: Any): Int

Returns the width of a platform-specific image object

Parameters
image: Any

platform-specific image object

Returns
Int

the width of the image in pixels

imageToByteArray

open fun imageToByteArray(image: Any): ByteArray?

Converts a platform-specific image object into a platform-independent byte buffer

Parameters
image: Any
Returns
ByteArray?

isAlpha8Image

open fun isAlpha8Image(image: Any): Boolean

Returns true if the platform-specific image object has format ALPHA_8

Parameters
image: Any

platform-specific image object

Returns
Boolean

whether or not the platform-specific image object has format ALPHA_8

log

open fun log(category: RcPlatformServices.LogCategory, message: String): Unit

Log a message

Parameters
category: RcPlatformServices.LogCategory
message: String

parsePath

open fun parsePath(pathData: String): Any

Parse a path represented as a string and returns a Path object

Parameters
pathData: String

path data

Returns
Any

platform path

pathToFloatArray

open fun pathToFloatArray(path: Any): FloatArray?

Converts a platform-specific path object into a platform-independent float buffer

Parameters
path: Any

path object

Returns
FloatArray?

float array of the path