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

Conversation

Lenkomotive
Copy link
Contributor

@Lenkomotive Lenkomotive commented Jul 3, 2023

Ticket

PAINTROID-396

Description

This pull request introduces the new version of the line tool, termed the "DynamicLineTool." This enhancement empowers users to create shapes by offering mutable vertices that can be added, moved, deleted (soon), and saved. This not only makes for a more versatile tool but also lets users return and modify their work at later stages. This addition caters to those users seeking precise control over their drawings.

Files Introduced

DynamicLineTool.kt:
This is the main implementation of the enhanced line tool. It manages the core functionalities, such as adding, deleting, and modifying vertices. It also handles user interactions, ensuring a seamless user experience.

Vertex.kt:
A representation of individual vertices. It encapsulates properties and methods pertinent to a single vertex, such as its position and any associated metadata.

DynamicPathCommand.kt:
Commands related to the dynamic line's path are defined here. This ensures every action on the dynamic line can be easily saved, undone, or redone.

DynamicPathCommandSerializer.kt:
This facilitates the serialization and deserialization of the dynamic path commands, allowing for the saveable feature of vertices.

DynamicLineToolTest.kt:
Unit tests for the DynamicLineTool, ensuring all its functionalities work as expected.

DynamicLineToolIntegrationTest.kt:
Integration tests for the DynamicLineTool, checking its collaboration with other app components and overall integration into the system.

Additionally, adaptations have been made in the CommandManager and various other files to accommodate the new command structures introduced by the DynamicLineTool.

sample (1)

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the #paintroid Slack channel and ask for a code reviewer

@Lenkomotive Lenkomotive changed the title Paintroid 396 Paintroid 396 - Multiline tool with movable intermediate points Jul 4, 2023
@Lenkomotive Lenkomotive force-pushed the PAINTROID-396 branch 2 times, most recently from a4c9d45 to 72fd340 Compare July 27, 2023 20:21
make undo and redo work in new implementation
make undo and redo work in new implementation
Fix bug were endpoint is not set correctly
reworking last commit + implemented redo
check if saving ColorChangedCommand is needed
execute instead of add ColorChangedCommand
fix redo bug and some more static analysis errors
rewrite tool based on vertexStack instead of globals
Copy link
Contributor

@bakicelebi bakicelebi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix merge conflicts.

Copy link
Contributor

@bakicelebi bakicelebi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

avoid vertex being outside of drawing surface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants