Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions app/src/main/kotlin/org/fossify/paint/views/MyCanvas.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import java.util.concurrent.ExecutionException
import kotlin.math.abs

class MyCanvas(context: Context, attrs: AttributeSet) : View(context, attrs) {
private val MIN_ERASER_WIDTH = 20f
private val MAX_HISTORY_COUNT = 1000
private val FLOOD_FILL_TOLERANCE = 1

Expand Down Expand Up @@ -334,9 +333,6 @@ class MyCanvas(context: Context, attrs: AttributeSet) : View(context, attrs) {
private fun changePaint(paintOptions: PaintOptions) {
mPaint.color = if (paintOptions.isEraser) mBackgroundColor else paintOptions.color
mPaint.strokeWidth = paintOptions.strokeWidth
if (paintOptions.isEraser && mPaint.strokeWidth < MIN_ERASER_WIDTH) {
mPaint.strokeWidth = MIN_ERASER_WIDTH
}
}

fun clearCanvas() {
Expand Down