Skip to content

Commit

Permalink
- fix compilation on iOS actual declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
rodvar committed Dec 3, 2024
1 parent 20ecfb1 commit 9dbab3a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.addressOf
import kotlinx.cinterop.useContents
import kotlinx.cinterop.usePinned
import network.bisq.mobile.domain.PlatformImage
import platform.CoreGraphics.CGContextRef
import platform.CoreGraphics.CGRectMake
import platform.CoreGraphics.CGSize
Expand All @@ -33,10 +34,11 @@ fun NSData.toByteArray(): ByteArray {
}

@OptIn(ExperimentalForeignApi::class)
actual fun getPlatformPainter(platformImage: UIImage): Painter {
actual fun getPlatformPainter(platformImage: PlatformImage): Painter {
return object : Painter() {
override val intrinsicSize: Size
get() {
platformImage as UIImage
val size: CValue<CGSize> = platformImage.size
return Size(
width = size.useContents { this.width.toFloat() },
Expand Down

0 comments on commit 9dbab3a

Please sign in to comment.