mirror of
https://github.com/T8RIN/ImageToolbox.git
synced 2025-05-17 13:35:58 +08:00
fix drawing images on path
This commit is contained in:
@ -610,7 +610,8 @@ fun BitmapDrawer(
|
||||
strokeWidth = strokeWidth,
|
||||
canvasSize = canvasSize,
|
||||
path = path,
|
||||
paint = pathPaint
|
||||
paint = pathPaint,
|
||||
invalidations = invalidations
|
||||
)
|
||||
} else {
|
||||
drawPath(path, pathPaint)
|
||||
@ -641,7 +642,8 @@ fun BitmapDrawer(
|
||||
strokeWidth = strokeWidth,
|
||||
canvasSize = canvasSize,
|
||||
path = androidPath,
|
||||
paint = drawPaint
|
||||
paint = drawPaint,
|
||||
invalidations = invalidations
|
||||
)
|
||||
} else if (drawMode is DrawMode.SpotHeal && !isEraserOn) {
|
||||
drawPath(
|
||||
|
@ -333,13 +333,14 @@ fun NativeCanvas.drawRepeatedImageOnPath(
|
||||
canvasSize: IntegerSize,
|
||||
path: NativePath,
|
||||
paint: NativePaint,
|
||||
invalidations: Int
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
var pathImage by remember(strokeWidth, canvasSize) {
|
||||
mutableStateOf<Bitmap?>(null)
|
||||
}
|
||||
val imageLoader = LocalImageLoader.current
|
||||
LaunchedEffect(pathImage, drawMode.imageData, strokeWidth, canvasSize) {
|
||||
LaunchedEffect(pathImage, drawMode.imageData, strokeWidth, canvasSize, invalidations) {
|
||||
if (pathImage == null) {
|
||||
pathImage = imageLoader.execute(
|
||||
ImageRequest.Builder(context)
|
||||
|
Reference in New Issue
Block a user