Decompose invalid region before calling EndPaint