Closed tsinis closed 1 month ago
Hey @tsinis, unfortunately I'm not the maintainer and can't help you with the merge. This is the responsibility of @omarhurani.
Hey @tsinis, unfortunately I'm not the maintainer and can't help you with the merge. This is the responsibility of @omarhurani.
Hey @friebetill, yeah you are right, looks like I've accidentally confirmed the GitHub suggestion at @ mention menu. I'm very sorry for that and thanks for tagging the proper person.
Hi @tsinis , I tried your changes and it looks very helpful, but there are some changes I would suggest:
Hi @tsinis , I tried your changes and it looks very helpful, but there are some changes I would suggest:
- Ability to close the path: Currently you just draw and the path never closes.
- Ability to turn the drawn polygon into a selectable drawable: This might be a bit complicated but it would be very helpful, like when the path closes, I should be able to select the drawn polygon (The same way I do with other drawables)
Hey @RegisSaffi
I'm glad you like it! It's like half a year ago, but I'm not sure I understand what you mean, because the feature can handle both cases, with polygon draw you can do both:
isPolygonFilled
, set to false in the example app). You can drag, rotate, scale, also snipping to the vertical/horizontal center works. The only thing missing is stretching with those white squares on the sides, due to technical limitations.Please check the video from the example (it's already there, in this feature branch): https://user-images.githubusercontent.com/52065414/234945740-afabffe2-ed12-4f6a-83e8-27c3a3db9e0a.mp4
Hi @tsinis , I guess I did not try everything, Am definitely gonna check it out, but am also wondering why this hasn't been merged yet??
Hi @tsinis , I guess I did not try everything, Am definitely gonna check it out, but am also wondering why this hasn't been merged yet??
You better ask @omarhurani :)
Hi, @tsinis. I found you created a great tool. I used C# and developed a polygon tool, it is more clear and intuitive. I think @RegisSaffi needs polygon's behavior like below.
Hey @hupo376787 nice I see, congratz!
But I'm new to flutter, read dart makes me confuse. So if you can make some changes to polygon, it's will be a great job. Thanks.
@hupo376787 TBH, I don't think this PR will be ever merged. There were no updates in this repo for a year and a half, so I am also not interested in maintaining this code since there is no interest from the author side.
@tsinis Indeed. The author may focus on some other important things.
I have upgraded this branch to the latest stable version of Flutter, it should fix https://github.com/omarhurani/flutter_painter/issues/43
@tsinis i tried using your code. but im getting few error one of which is
Offset argument contained a NaN value.
'dart:ui/painting.dart':
Failed assertion: line 36 pos 10: '
Hey @friebetill
Thanks for a great package! In this PR I'm introducing polygon drawing mode (drawing straight lines/shapes via taping on the screens (creating nodes that are connected between each tap). The biggest issue was the calculation of the centroid (of the shape) because the shape can be very complex, I tried different libraries (ports from JS plugins), but if we take into account that it must be calculated in 8ms in the runtime and also influenced by the stroke-width (of the outline, the package must be universal), so the fastest formula I've found was from the Wikipedia. The result is not "pixel-perfect" but is usually quite sufficient. Also, I've created this code to be compatible with both Flutter 2 and Flutter 3 (Google's recommended way). Thanks!