diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/pro/helpers/EyeDropper.kt b/app/src/main/kotlin/com/simplemobiletools/draw/pro/helpers/EyeDropper.kt index aa0a6c2..7df530d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/pro/helpers/EyeDropper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/pro/helpers/EyeDropper.kt @@ -78,7 +78,9 @@ class EyeDropper(private val view: View, private val onColorSelected: ((Int) -> } private fun Bitmap.isValidCoordinate(x: Int, y: Int): Boolean { - return x in 1 until width && y in 1 until height + val isValidXCoordinate = x >= 1 && x < width + val isValidYCoordinate = y >= 1 && y < height + return isValidXCoordinate && isValidYCoordinate } private fun View.shouldDrawingCacheBeEnabled(): Boolean = (this !is ImageView) && !isDrawingCacheEnabled