我正在尝试为 iPhone/iPad 开发绘画类型应用程序。我已经完成了 70%,但其中一项功能需要时间来完成。我在其中添加了使用选定颜色功能填充选定区域。我做到了,但它需要很多时间或工作太慢。由于此功能,整个应用程序变得冻结。绘图视图的结构:- UIView(父视图)-UIImageView(SubView1)-将图像保留为背景-UIImageView(SubView2)-绘制颜色或绘制线条
In above structure, Parent view is work as a Canvas View and Subview1 is lowerview and Subview2 is upperview.
My approach :-
1)finding currnet point.
2)getting pixtel color.
3)get screen shot for whole screen.
4)get array for those pixtel who have a same pixtel color as select pixtel in current screen shot
5)now we use 4Q pixtel fill color for identifying pixtel who is connected with selected pixtel and making array for all those pixtel.
6)After getting the final array for the pixtel, we draw a pixtel with selected color.
Any one help.
I need a another implementation for Flood fill with a more smooth way functionality.
Pls provide me a Code sample.
Thanks in Advance.