mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-02-17 12:10:47 +01:00
scale the brush size appropriately depending on the zoom level
This commit is contained in:
parent
2a87708b3a
commit
27aab522a5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user