Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
ITP4206 Proprietary Mobile Application Development
Individual Assignment 2023-24 (20% of overall marks)
Objective:
Overall Task
Task 1- The Basic Task
- The app start with an empty art board.
- There are at least seven color available for selection. (Hints, user number to indicate color: 0 - red, 1 - yellow, 2 - green and .... or use hex code to indicate color)
- There are at least two tools - a draw tool and an eraser tool.
- In draw tool mode, when the user taps on each pixel, a corresponding color is set and displayed. In eraser tool mode, when the user taps on each pixel, a corresponding color is set and displayed.
The Constraints:
- It is suggested to use array (Array) to store the values of a pixel, otherwise many variables are required to store the input data and the computation logic will be complicated.
- A separate class is required in the project to perform the pixel drawing logic after the each pixel / button is pressed.
- Good coding standard is required – appropriate comments, error handling, well-structured coding and good naming convention.
- Hex color to UIColor - UIKit: (https://www.hackingwithswift.com/example-code/uicolor/how-to-converta-hex-color-to-a-uicolor)
- Hex color to Color - SwiftUI (https://stackoverflow.com/questions/56874133/use-hex-color-in-swiftui)
Task 2 - Fill Tool
Pseudo code of a flood-fill algorithm.
1. Set Q to the empty queue or stack.
2. Add node to the end of Q.
3. While Q is not empty:
4. Set n equal to the first element of Q.
5. Remove first element from Q.
6. If n is Inside:
Set the n
Add the node to the west of n to the end of Q.
Add the node to the east of n to the end of Q.
Add the node to the north of n to the end of Q.
Add the node to the south of n to the end of Q.
7. Continue looping until Q is exhausted.
8. Return.
Task 3 - Undo / Redo functions
- When the user press undo, the canvas will show the last committed canvas.
- When the user press redo (after performing an undo), the canvas will show the next committed canvas.
- When the user press undo and then draw on the canvas, all redo record will be replaced by the drawing.
- No matter press the undo / redo, there will be no action taken if there is no more data for undo / redo.
- Tips: You can choose to just use an array or the iOS's UndoManager to manage the undo/redo.
Task 4 - Data Persistence
- User can save the art board and load the art board for further editing. (By using UserDefault, JSON, CoreData or whatever solution you can think of.)
- If you can complete the following task, more marks will be awarded:
- Save multiple file, and you can choose to load which file to edit.
- Export and save the image to iOS's album.
|
• Basic Tasks
|
55 marks
|
|
• Fill Tool
|
10 marks
|
|
• Undo only / Undo and Redo
|
5 marks / 10 marks
|
|
• Data Persistence
|
5 marks (+5 marks for each extra features)
|
|
• Good Looking User Interface
|
10 marks
|
Remarks: Poor coding style (e.g. no suitable comments for methods and variables, poor indentation, and etc.) in the source codes will cause a maximum of 10 marks deduction.
Submission
- Hand in via moodle.
- Due date and time for submission: 21st December 2024 (Saturday) before 23:59pm.
Demonstration
For Challenger
You can choose to take the challenge to add even more extra feature on your app.
- Art board with frame options and able to preview the art board animation.
- Export the animated art board in GIF animation.
Challengers who can complete one or more task will get the priority to choose the time slot for ITP4206 project presentation and FYP interim presentation. :)