mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-06-05 21:59:17 +02:00
Update EyeDropper.kt
This commit is contained in:
@ -8,7 +8,6 @@ import android.view.View
|
|||||||
import android.view.View.DRAWING_CACHE_QUALITY_LOW
|
import android.view.View.DRAWING_CACHE_QUALITY_LOW
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
|
||||||
|
|
||||||
// forked from https://github.com/Madrapps/EyeDropper
|
// forked from https://github.com/Madrapps/EyeDropper
|
||||||
class EyeDropper(private val view: View, private val onColorSelected: ((Int) -> Unit)) {
|
class EyeDropper(private val view: View, private val onColorSelected: ((Int) -> Unit)) {
|
||||||
companion object {
|
companion object {
|
||||||
@ -64,9 +63,7 @@ class EyeDropper(private val view: View, private val onColorSelected: ((Int) ->
|
|||||||
INVERT_MATRIX.mapPoints(mappedPoints)
|
INVERT_MATRIX.mapPoints(mappedPoints)
|
||||||
getPixelAtPoint(drawable.bitmap, mappedPoints[0].toInt(), mappedPoints[1].toInt())
|
getPixelAtPoint(drawable.bitmap, mappedPoints[0].toInt(), mappedPoints[1].toInt())
|
||||||
}
|
}
|
||||||
else -> {
|
else -> NO_COLOR
|
||||||
NO_COLOR
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user