-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change: Removed AndroidBitmap, SkiBitmap, SkiaImageInfo, SkiaImage, S…
…kiaRect, and renamed ComposeImagePainter to ImageBitmapPainter, SkiaAnimatedImage renamed to AnimatedImage, SkiaAnimatedImagePainter renamed to AnimatedImagePainter
- Loading branch information
Showing
78 changed files
with
686 additions
and
796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...e-core/src/androidMain/kotlin/com/github/panpf/sketch/test/utils/compose_utils.android.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package com.github.panpf.sketch.test.utils | ||
|
||
import androidx.compose.ui.graphics.ImageBitmap | ||
import androidx.compose.ui.graphics.asImageBitmap | ||
import com.github.panpf.sketch.Bitmap | ||
import com.github.panpf.sketch.ComposeBitmap | ||
|
||
actual fun Bitmap.toComposeBitmap(): ComposeBitmap = this.asImageBitmap() | ||
actual fun Bitmap.toComposeBitmap(): ImageBitmap = this.asImageBitmap() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../src/nonAndroidMain/kotlin/com/github/panpf/sketch/test/utils/compose_utils.nonAndroid.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package com.github.panpf.sketch.test.utils | ||
|
||
import androidx.compose.ui.graphics.ImageBitmap | ||
import androidx.compose.ui.graphics.asComposeImageBitmap | ||
import com.github.panpf.sketch.Bitmap | ||
import com.github.panpf.sketch.ComposeBitmap | ||
|
||
actual fun Bitmap.toComposeBitmap(): ComposeBitmap = this.asComposeImageBitmap() | ||
actual fun Bitmap.toComposeBitmap(): ImageBitmap = this.asComposeImageBitmap() |
8 changes: 4 additions & 4 deletions
8
...ls-core/src/nonAndroidMain/kotlin/com/github/panpf/sketch/test/utils/bitmap.nonAndroid.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...ls-core/src/nonAndroidMain/kotlin/com/github/panpf/sketch/test/utils/images.nonAndroid.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
package com.github.panpf.sketch.test.utils | ||
|
||
import com.github.panpf.sketch.BitmapImage | ||
import com.github.panpf.sketch.SkiaBitmap | ||
import com.github.panpf.sketch.SkiaImage | ||
import com.github.panpf.sketch.asImage | ||
import com.github.panpf.sketch.createBitmap | ||
import com.github.panpf.sketch.source.DataSource | ||
import okio.buffer | ||
import okio.use | ||
import org.jetbrains.skia.Image | ||
|
||
actual fun createBitmapImage(width: Int, height: Int): BitmapImage = | ||
SkiaBitmap(width, height).asImage() | ||
createBitmap(width, height).asImage() | ||
|
||
fun DataSource.toSkiaImage(): SkiaImage { | ||
fun DataSource.toSkiaImage(): Image { | ||
val exifBytes = openSource().buffer().use { it.readByteArray() } | ||
return SkiaImage.makeFromEncoded(exifBytes) | ||
return Image.makeFromEncoded(exifBytes) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 0 additions & 35 deletions
35
sketch-compose-core/src/commonMain/kotlin/com/github/panpf/sketch/ComposeBitmap.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.