Browse Source
Implemented two new experimental functions: ```kotlin /** * Retrieves the byte array of the drawable resource. * * @param environment The resource environment, which can be obtained from [rememberResourceEnvironment] or [getSystemResourceEnvironment]. * @param resource The drawable resource. * @return The byte array representing the drawable resource. */ @ExperimentalResourceApi suspend fun getDrawableResourceBytes( environment: ResourceEnvironment, resource: DrawableResource ): ByteArray {...} /** * Retrieves the byte array of the font resource. * * @param environment The resource environment, which can be obtained from [rememberResourceEnvironment] or [getSystemResourceEnvironment]. * @param resource The font resource. * @return The byte array representing the font resource. */ @ExperimentalResourceApi suspend fun getFontResourceBytes( environment: ResourceEnvironment, resource: FontResource ): ByteArray {...} ``` fixes https://github.com/JetBrains/compose-multiplatform/issues/4360pull/4695/head v1.6.10-beta02
Konstantin
7 months ago
committed by
GitHub
15 changed files with 261 additions and 56 deletions
@ -1 +0,0 @@
|
||||
macOS platform |
@ -1,17 +0,0 @@
|
||||
/* |
||||
* Copyright 2020-2022 JetBrains s.r.o. and respective authors and developers. |
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file. |
||||
*/ |
||||
|
||||
import androidx.compose.ui.window.Window |
||||
import org.jetbrains.compose.resources.demo.shared.UseResources |
||||
import platform.AppKit.NSApp |
||||
import platform.AppKit.NSApplication |
||||
|
||||
fun main() { |
||||
NSApplication.sharedApplication() |
||||
Window("Resources demo") { |
||||
UseResources() |
||||
} |
||||
NSApp?.run() |
||||
} |
Loading…
Reference in new issue