scale the brush size appropriately depending on the zoom level

This commit is contained in:
tibbi 2018-08-26 21:56:56 +02:00
parent 2a87708b3a
commit 27aab522a5

View file

@ -121,7 +121,7 @@ class MyCanvas(context: Context, attrs: AttributeSet) : View(context, attrs) {
}
fun setBrushSize(newBrushSize: Float) {
mPaintOptions.strokeWidth = resources.getDimension(R.dimen.full_brush_size) * (newBrushSize / 100f)
mPaintOptions.strokeWidth = resources.getDimension(R.dimen.full_brush_size) * (newBrushSize / mScaleFactor / 100f)
}
fun setAllowZooming(allowZooming: Boolean) {