Page 1 of 1

Scissor tool center setting

Posted: Tue Sep 07, 2021 3:31 am
by xiaolu
hello~

When I use the scissors tool, I cut a small piece down and the center of the view is still in the original position.


like this
DeepinScreenshot_select-area_20210907112559.png
DeepinScreenshot_select-area_20210907112559.png (89.89 KiB) Viewed 2175 times

I want the center of the cut piece to be set to the center of the interface, to make it easier for me to rotate it.
like this
DeepinScreenshot_select-area_20210907112717.png
DeepinScreenshot_select-area_20210907112717.png (60.62 KiB) Viewed 2175 times
I know that I can set the center point to this position by double-clicking, but many times the double-click is not accurate and I need to double-click many times.

So I would like to implement it in code so that it will come to the center by itself.

Could you please give me some advice?

thanks~

Re: Scissor tool center setting

Posted: Thu Sep 09, 2021 3:13 pm
by daniel
I guess you would have to call the updateConstellationCenterAndZoom method of the 3D view, with the right bounding-box. And the right bounding-box should be ccGraphicalSegmentationTool::segment method (when CC determines if each point is inside or outside of the segmentation polygon).

Re: Scissor tool center setting

Posted: Thu Sep 23, 2021 9:34 am
by xiaolu
Thanks,
This solves my problem