NSImage *maskImage = [[NSImage alloc]
initWithSize:NSMakeSize(GetWidth(), GetHeight())];
[maskImage addRepresentation: GetMask()->GetNSBitmapImageRep()];
[nsimage lockFocus];
[maskImage compositeToPoint:NSZeroPoint operation:NSCompositeDestinationIn];
[nsimage unlockFocus];
NSImage *maskImage = [[NSImage alloc]
initWithSize:NSMakeSize(GetWidth(), GetHeight())];
[maskImage addRepresentation: GetMask()->GetNSBitmapImageRep()];
[nsimage lockFocus];
[maskImage compositeToPoint:NSZeroPoint operation:NSCompositeDestinationIn];
[nsimage unlockFocus];