first you need a paint engine. I have built such engine for my applications,
but i'm currently not planning to share the code, maybe in future i will.
Some tips: to create a good and fast paint engine you have to know well how
to use scanline to access pixels in the picture. There are many good
examples on EFG site.
Once you have your paint engine you create a copy of the bitmap to clone.
Then the user clicks the point from which he starts to clone on the source
picture and the point where he starts cloning on the taget picture. Use the
difference between these two points to know the coordinates of the source
picture that have to been copied on the target picture.
Quote:> I need to add a cloning tool like the one in PhotoShop to an application I
> am working on. I would appreciate it if anyone could point me in the right
> direction or tell me where I might find some sample code for such a tool.