ColorPickerView icon indicating copy to clipboard operation
ColorPickerView copied to clipboard

getSelectedPoint and setSelectorPoint bug

Open bytealan opened this issue 3 years ago • 3 comments

There is an error between the obtained coordinates and the set coordinates

getSelectedPoint -> Point(620, 435) setSelectorPoint -> Point(620, 435) approximatedPoint -> Point(618, 434)

bytealan avatar Apr 22 '22 07:04 bytealan

Hi @WuWenL0, could you elaborate on this?

The approximatedPoint don't calculate exactly the same point which is selected by users and the method does approximate as the method name is.

One of the reasons is - If a user touches outside of the image matrix, we should calculate the nearest and proper colors from the point. So 1~2 points difference might happen in the calculating. If you could suggest or find any great algorithm/solution, it would be very appreciated!

Thanks.

skydoves avatar Apr 23 '22 14:04 skydoves

Thank you for answering the question. See the video below for my problems. There are five alphatileviews. When I click, I will switch and save the point of the previous alphatileview, and switch to the new alphatileview point. When I click repeatedly, the color will change. Is there any good way to solve it?

https://user-images.githubusercontent.com/53036149/164951372-4db403b9-61bc-42a5-bd1e-fe952f04a34c.mp4

bytealan avatar Apr 24 '22 01:04 bytealan

@skydoves Hi,could you set a switch to control whether point need to calculate exactly or not?And this switch has getter and setter method.

Deaful avatar Sep 22 '22 06:09 Deaful