@@ -5,6 +5,7 @@ import android.graphics.Color
5
5
import android.graphics.Paint
6
6
import android.graphics.PointF
7
7
import android.view.View
8
+ import androidx.annotation.ColorInt
8
9
import androidx.test.espresso.idling.CountingIdlingResource
9
10
import org.catrobat.paintroid.command.CommandManager
10
11
import org.catrobat.paintroid.command.implementation.DynamicPathCommand
@@ -142,7 +143,7 @@ class DynamicLineTool(
142
143
}
143
144
144
145
fun setToolPaint (command : DynamicPathCommand ) {
145
- super .changePaintColor(command.paint.color)
146
+ super .changePaintColor(command.paint.color, false )
146
147
super .changePaintStrokeCap(command.paint.strokeCap)
147
148
super .changePaintStrokeWidth(command.paint.strokeWidth.toInt())
148
149
}
@@ -324,8 +325,8 @@ class DynamicLineTool(
324
325
}
325
326
}
326
327
327
- override fun changePaintColor (color : Int ) {
328
- super .changePaintColor(color)
328
+ override fun changePaintColor (@ColorInt color : Int , invalidate : Boolean ) {
329
+ super .changePaintColor(color, false )
329
330
if (vertexStack.isEmpty()) return
330
331
vertexStack.last.ingoingPathCommand?.setPaintColor(toolPaint.color)
331
332
commandManager.executeAllCommands()
@@ -417,7 +418,7 @@ class DynamicLineTool(
417
418
paint.run {
418
419
style = Paint .Style .FILL
419
420
color = originalPaint.color
420
- alpha = 128
421
+ alpha = GHOST_PAINT_ALPHA
421
422
strokeWidth = originalPaint.strokeWidth
422
423
strokeCap = originalPaint.strokeCap
423
424
}
0 commit comments