Compositing is the act of putting together two images, allowing features of both images to be seen.
In the Android SDK, we can accomplish compositing by first drawing one
Bitmap to a
Canvas and then drawing a second
Bitmap to the same
Canvas. The only difference is that we specify a transfermode (
Xfermode) on the
Paint when drawing the second image.
The set of classes that can be used as a transfermode all derive from the
Xfermode base class and include one called
PorterDuffXfermode class is named for Thomas Porter and Tom Duff, who published a paper entitled “Compositing digital images” in the ACM SIGGRAPH Computer Graphics publication in 1984, detailing a series of different rules for drawing images ...