I'm trying to implement a smudge tool like one you would find in Gimp or Photoshop. I've tried lots of variations but they all have problems. The basic method I've tried for smudging from position P1 to P2 on an image is:
- Copy a rectangle the size of the current brush from P1.
- Draw this rectangle at P2 with a low opacity.
It looks fine and smudges as expected but the main problems I'm having is that the smudge seems to make things darker. Especially when using a small brush spacing, repeated smudging will turn the area to black. Any suggestions on what I'm doing wrong or some standard algorithms I can look at? I've had a look at the Gimp source but it's very hard to follow.
If it matters, I'm working on a mobile device (Android, Java) so something fast would be preferable.