Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paintroid 396 - Multiline tool with movable intermediate points #1294

Open
wants to merge 70 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
0708f46
PAINTROID-623 Create DynamicLineTool
Lenkomotive Jun 16, 2023
85573b4
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 3, 2023
22c171a
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 4, 2023
3229072
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 5, 2023
a32192a
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 9, 2023
247471b
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 9, 2023
c9856b0
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 9, 2023
6561780
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 10, 2023
a014d95
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 10, 2023
25ca2a9
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 10, 2023
dfab1a9
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 10, 2023
745e39e
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 11, 2023
172e8c4
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 11, 2023
1f1bb99
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 12, 2023
4f486e2
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 12, 2023
c887cf6
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 13, 2023
36ac52d
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 13, 2023
c15b725
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 13, 2023
b5cac77
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 15, 2023
d832877
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 16, 2023
f1298c9
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 16, 2023
3f5b4d5
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 16, 2023
d4a81d1
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 16, 2023
bf18142
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 17, 2023
af074ca
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 17, 2023
e965f29
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 17, 2023
79b1eb7
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 17, 2023
9b36a7b
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 17, 2023
dc8961f
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 17, 2023
b9cd3f8
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 17, 2023
6fa7d51
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 18, 2023
52cabab
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 18, 2023
4b500db
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 18, 2023
4afa3e4
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 18, 2023
b3b9d8b
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 18, 2023
b4eb160
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 21, 2023
39b494d
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 26, 2023
67c62e2
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 26, 2023
05c9bcd
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 26, 2023
2d3c6aa
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 26, 2023
889e781
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 26, 2023
f35085f
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 26, 2023
a9aa664
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 26, 2023
9327159
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 26, 2023
c6fdf7c
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 27, 2023
f502141
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 27, 2023
43ed8cc
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 27, 2023
f2a0a43
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 28, 2023
cca8c00
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 29, 2023
21ef8b9
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 30, 2023
9e815cc
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Jul 30, 2023
75553a6
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Aug 2, 2023
e8a01b1
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Aug 2, 2023
585a011
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Aug 3, 2023
4bee40e
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Aug 3, 2023
a7053da
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Aug 3, 2023
9cdc24c
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Aug 3, 2023
99ca39e
PAINTROID-396 Multiline tool with movable intermediate pointsr
Lenkomotive Aug 3, 2023
9273184
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Aug 3, 2023
e7718af
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Aug 4, 2023
9daa735
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Aug 6, 2023
50cfc22
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Sep 11, 2023
31a202a
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Sep 12, 2023
afb561a
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Sep 20, 2023
d572eb6
Merge branch 'develop' into PAINTROID-396
Lenkomotive Sep 20, 2023
840d36f
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Sep 20, 2023
e5dfc4f
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Sep 23, 2023
f2be9fd
Merge remote-tracking branch 'origin/develop' into PAINTROID-396
Lenkomotive Dec 29, 2023
6a498dd
PAINTROID-648 Dynamic animation of top and bottom bar
Lenkomotive Dec 29, 2023
311bff4
PAINTROID-396 Multiline tool with movable intermediate points
Lenkomotive Dec 30, 2023
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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class LayerTest {
(layerModel as LayerModel).addLayerAt(0, layer)
(layerModel as LayerModel).currentLayer = layer
commandManager =
AsyncCommandManager(DefaultCommandManager(CommonFactory(), layerModel as LayerModel),
AsyncCommandManager(DefaultCommandManager(CommonFactory(), layerModel as LayerModel, null),
layerModel as LayerModel
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import org.catrobat.paintroid.command.implementation.SelectLayerCommand
import org.catrobat.paintroid.command.implementation.SetDimensionCommand
import org.catrobat.paintroid.command.implementation.SprayCommand
import org.catrobat.paintroid.command.implementation.ClipboardCommand
import org.catrobat.paintroid.command.implementation.DynamicPathCommand
import org.catrobat.paintroid.command.implementation.TextToolCommand
import org.catrobat.paintroid.command.implementation.SmudgePathCommand
import org.catrobat.paintroid.command.implementation.LayerOpacityCommand
Expand Down Expand Up @@ -300,6 +301,20 @@ class CommandSerializationTest {
assertSerializeAndDeserialize()
}

@Test
fun testSerializeDynamicPathCommand() {
val path = SerializablePath().apply {
moveTo(20f, 30f)
lineTo(30f, 10f)
quadTo(10f, 20f, 30f, 40f)
cubicTo(10f, 20f, 30f, 3f, 19f, 20f)
}
var startPoint = PointF(5f, 5f)
var endPoint = PointF(50f, 50f)
expectedModel.commands.add(commandFactory.createDynamicPathCommand(paint, path, startPoint, endPoint))
assertSerializeAndDeserialize()
}

@Test
fun testSerializeSmudgePathCommand() {
val bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888)
Expand Down Expand Up @@ -453,6 +468,9 @@ class CommandSerializationTest {
is PathCommand -> equalsPathCommand(
expectedCommand, actualCommand as PathCommand
)
is DynamicPathCommand -> equalsDynamicPathCommand(
expectedCommand, actualCommand as DynamicPathCommand
)
is SmudgePathCommand -> equalsSmudgePathCommand(
expectedCommand, actualCommand as SmudgePathCommand
)
Expand Down Expand Up @@ -616,6 +634,12 @@ class CommandSerializationTest {
) &&
DefaultToolPaint.arePaintEquals(expectedCommand.paint, actualCommand.paint)

private fun equalsDynamicPathCommand(expectedCommand: DynamicPathCommand, actualCommand: DynamicPathCommand) =
equalsSerializablePath(expectedCommand.path as SerializablePath, actualCommand.path as SerializablePath) &&
DefaultToolPaint.arePaintEquals(expectedCommand.paint, actualCommand.paint) &&
expectedCommand.startPoint == actualCommand.startPoint &&
expectedCommand.endPoint == actualCommand.endPoint

private fun equalsSmudgePathCommand(expectedCommand: SmudgePathCommand, actualCommand: SmudgePathCommand) =
expectedCommand.maxPressure == actualCommand.maxPressure &&
expectedCommand.maxSize == actualCommand.maxSize &&
Expand Down
Loading