BitmapVector
class BitmapVector(val shape: BoundsDrawable, val bounds: Rectangle = shape.bounds, val scale: Double = 1.0, val rasterizerMethod: ShapeRasterizerMethod = ShapeRasterizerMethod.X4, val antialiasing: Boolean = true, val width: Int = (bounds.width * scale).toInt(), val height: Int = (bounds.height * scale).toInt(), premultiplied: Boolean, val native: Boolean = true) : Bitmap
Constructors
Link copied to clipboard
constructor(shape: BoundsDrawable, bounds: Rectangle = shape.bounds, scale: Double = 1.0, rasterizerMethod: ShapeRasterizerMethod = ShapeRasterizerMethod.X4, antialiasing: Boolean = true, width: Int = (bounds.width * scale).toInt(), height: Int = (bounds.height * scale).toInt(), premultiplied: Boolean, native: Boolean = true)
Properties
Link copied to clipboard
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
Link copied to clipboard
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
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
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
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
Link copied to clipboard
suspend fun Bitmap.writeTo(file: VfsFile, formats: ImageFormat = RegisteredImageFormats, props: ImageEncodingProps = ImageEncodingProps()): Long