All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.org.jetbrains.skiko.redrawer.WindowsSoftwareRedrawer.kt Maven / Gradle / Ivy

package org.jetbrains.skiko.redrawer

import org.jetbrains.skiko.SkiaLayer
import org.jetbrains.skiko.SkiaLayerProperties
import org.jetbrains.skiko.RenderException

internal class WindowsSoftwareRedrawer(
    private val layer: SkiaLayer,
    private val properties: SkiaLayerProperties
) : AbstractDirectSoftwareRedrawer(layer, properties) {

    init {
        device = createDevice(layer.contentHandle, layer.transparency).also {
            if (it == 0L) {
                throw RenderException("Failed to create Software device")
            }
        }
    }

    private external fun createDevice(contentHandle: Long, transparency: Boolean): Long
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy