Shouldn't (2,2,W-2,H-2) be (2,2,W-4,H-4) for the rectangles ?
Have you tried to to use Color.Transparent for COLOR_EXT when COLOR_IN has alpha?
Or you could try to set the rectangle to (0,0,W,H) instead of (2,2,W-2,H-2) when COLOR_IN has alpha.
In (2,2,W-2,H-2) you should use dip values (2dip,2dip,W-4dip,H-4dip).