Bitmap
abstract class Bitmap(val width: Int, val height: Int, val bpp: Int, premultiplied: Boolean, val backingArray: Any?) : SizeableInt, Extra
Base class for all Bitmaps. A bitmap represents a set of pixels with a given width and height.
Implementors should implement at least setRgbaRaw and getRgbaRaw.
Inheritors
Constructors
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Version of the content. lock+unlock mutates this version to allow for example to re-upload the bitmap to the GPU when synchronizing bitmaps into textures
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Bitmap.distanceMap(out: DistanceBitmap = DistanceBitmap(width, height), thresold: Double = 0.5): DistanceBitmap
Link copied to clipboard
suspend fun Bitmap.encode(formats: ImageFormat = RegisteredImageFormats, props: ImageEncodingProps = ImageEncodingProps()): ByteArray
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Gets the color v in the x, y coordinates in RGBAPremultiplied
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Bitmap.sdf(out: DistanceBitmap = DistanceBitmap(width, height), thresold: Double = 0.5): DistanceBitmap
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun Bitmap.toAwt(out: BufferedImage = BufferedImage(
width.coerceAtLeast(1),
height.coerceAtLeast(1),
if (this.premultiplied) BufferedImage.TYPE_INT_ARGB_PRE else BufferedImage.TYPE_INT_ARGB
)): BufferedImage
Link copied to clipboard
Link copied to clipboard
fun Bitmap.toFloatBMP32(out: FloatBitmap32 = FloatBitmap32(width, height, premultiplied = premultiplied)): FloatBitmap32
to Html Native
Link copied to clipboard
to Native Image
Link copied to clipboard
to Native Image Result
Link copied to clipboard
Link copied to clipboard
fun Bitmap.toPaint(transform: Matrix = Matrix.IDENTITY, cycleX: CycleMethod = CycleMethod.NO_CYCLE, cycleY: CycleMethod = CycleMethod.NO_CYCLE, smooth: Boolean = true, units: GradientUnits = GradientUnits.OBJECT_BOUNDING_BOX): BitmapPaint
Link copied to clipboard
Creates a new bitmap with the rows and columns transposed
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun Bitmap.writeTo(file: VfsFile, formats: ImageFormat = RegisteredImageFormats, props: ImageEncodingProps = ImageEncodingProps()): Long
Link copied to clipboard
suspend fun Bitmap.writeToNative(file: VfsFile, props: ImageEncodingProps = ImageEncodingProps()): Long