mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-29 12:06:01 +02:00
fix(android): adjust for Kotlin and project warnings
This commit is contained in:
@@ -91,22 +91,10 @@ class GraphicOverlay: View {
|
||||
return
|
||||
}
|
||||
|
||||
val zLowerBoundInScreenPixel: Float
|
||||
val zUpperBoundInScreenPixel: Float
|
||||
if (rescaleZForVisualization) {
|
||||
zLowerBoundInScreenPixel = (-0.001f).coerceAtMost(scale(zMin))
|
||||
zUpperBoundInScreenPixel = 0.001f.coerceAtLeast(scale(zMax))
|
||||
} else {
|
||||
val defaultRangeFactor = 1f
|
||||
zLowerBoundInScreenPixel = -defaultRangeFactor * canvas.width
|
||||
zUpperBoundInScreenPixel = defaultRangeFactor * canvas.width
|
||||
}
|
||||
val zInScreenPixel = scale(zInImagePixel)
|
||||
if (zInScreenPixel < 0) {
|
||||
val v = (zInScreenPixel / zLowerBoundInScreenPixel * 255).toInt()
|
||||
paint.setARGB(0, 0, 255, 0)
|
||||
} else {
|
||||
val v = (zInScreenPixel / zUpperBoundInScreenPixel * 255).toInt()
|
||||
paint.setARGB(0, 0, 255, 0)
|
||||
}
|
||||
}
|
||||
@@ -180,7 +168,7 @@ class GraphicOverlay: View {
|
||||
needUpdateTransformation = false
|
||||
}
|
||||
|
||||
override fun onDraw(canvas: Canvas?) {
|
||||
override fun onDraw(canvas: Canvas) {
|
||||
super.onDraw(canvas)
|
||||
synchronized(lock) {
|
||||
updateTransformationIfNeeded()
|
||||
|
||||
Reference in New Issue
Block a user