How it works:

SrcAnd the mask to the destination area.
The white areas are 255,255,255 - of course, Value And 255 = Value.
The black areas are 0,0,0, - of course, Value And 0 = 0.

SrcPaint the image to the destination area. The masked areas of the image MUST BE BLACK.
SrcPaint is essentially SrcOr. Stupid name.
The image is made up of various values. The mask you applied has already set all the areas covered by the image to black. - of course, Value Or 0 = Value.
The black areas are 0,0,0 - of course, Value Or 0 = Value, again.