burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.12k stars 989 forks source link

added arrow shape type #431

Closed psuzn closed 2 years ago

burhanrashid52 commented 2 years ago

@psuzn Thanks for the PR. Can you please add a gif or screenshot on how this arrow looks/works ?

psuzn commented 2 years ago

Sure, It is similar to the line but has an arrow at the end. https://user-images.githubusercontent.com/19205305/149757952-fe36a204-b1ef-4e71-90f8-378d1e5a8e9b.mp4

burhanrashid52 commented 2 years ago

@psuzn Thanks. Currently, we are converting the library into Kotlin #428 So we might need to redo these changes again in Kotlin. So I suggest waiting for the conversation to be completed and once it's merged, you can rebase with the new Kotlin code and make a PR with those changes. Sounds Good ?

psuzn commented 2 years ago

@burhanrashid52, I've updated this. Please have a look when you get some time.

burhanrashid52 commented 2 years ago

@psuzn The code looks good to me. However, I've two things.

  1. Can you write a test for the Arrow changes?
  2. The arrow seems like a subclass of LINE. So I was thinking if we can expose a LineBuilder which have a property to allow a pointer to the start and end of the line. What do you think?
psuzn commented 2 years ago

@burhanrashid52, I had added a test for the enums beside that I don’t think there is a shape-specific test setup to verify the shape being drawn, is there?

The LineBuilder sounds like a good idea, but I've been super busy lately and not sure I would be able to add this.

burhanrashid52 commented 2 years ago

@psuzn No worries. You can contribute back whenever you are available. Till then I will keep this PR open as a reference for others.

github-actions[bot] commented 2 years ago

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 years ago

This PR was closed because it has been stalled for 5 days with no activity.