Mercurial > dwindows
comparison mac/dw.m @ 952:abb9203adc05
Use NSCompositeSourceOver for bitblting that respects transparency of the source
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 01 May 2011 05:30:11 +0000 |
parents | 7193401d139a |
children | 2dfc06afc7d3 |
comparison
equal
deleted
inserted
replaced
951:7193401d139a | 952:abb9203adc05 |
---|---|
513 [t translateXBy:0.0 yBy:-[rep size].height]; | 513 [t translateXBy:0.0 yBy:-[rep size].height]; |
514 | 514 |
515 // apply the transform: | 515 // apply the transform: |
516 [t concat]; | 516 [t concat]; |
517 [image drawAtPoint:NSMakePoint(bltinfo->xdest, bltinfo->ydest) fromRect:NSMakeRect(bltinfo->xsrc, bltinfo->ysrc, bltinfo->width, bltinfo->height) | 517 [image drawAtPoint:NSMakePoint(bltinfo->xdest, bltinfo->ydest) fromRect:NSMakeRect(bltinfo->xsrc, bltinfo->ysrc, bltinfo->width, bltinfo->height) |
518 operation:NSCompositeCopy fraction:1.0]; | 518 operation:NSCompositeSourceOver fraction:1.0]; |
519 [bltsrc release]; | 519 [bltsrc release]; |
520 [image release]; | 520 [image release]; |
521 } | 521 } |
522 if([bltdest isMemberOfClass:[NSBitmapImageRep class]]) | 522 if([bltdest isMemberOfClass:[NSBitmapImageRep class]]) |
523 { | 523 { |
813 _event_handler(self, nil, 13); | 813 _event_handler(self, nil, 13); |
814 } | 814 } |
815 -(void)setMenu:(NSMenu *)input { windowmenu = input; [windowmenu retain]; } | 815 -(void)setMenu:(NSMenu *)input { windowmenu = input; [windowmenu retain]; } |
816 -(void)menuHandler:(id)sender { _event_handler(sender, nil, 8); } | 816 -(void)menuHandler:(id)sender { _event_handler(sender, nil, 8); } |
817 -(void)mouseDragged:(NSEvent *)theEvent { _event_handler(self, theEvent, 5); } | 817 -(void)mouseDragged:(NSEvent *)theEvent { _event_handler(self, theEvent, 5); } |
818 -(void)mouseMoved:(NSEvent *)theEvent | 818 -(void)mouseMoved:(NSEvent *)theEvent |
819 { | 819 { |
820 id hit = [self hitTest:[theEvent locationInWindow]]; | 820 id hit = [self hitTest:[theEvent locationInWindow]]; |
821 | 821 |
822 if([hit isMemberOfClass:[DWRender class]]) | 822 if([hit isMemberOfClass:[DWRender class]]) |
823 { | 823 { |
824 _event_handler(hit, theEvent, 5); | 824 _event_handler(hit, theEvent, 5); |
825 } | 825 } |
826 } | 826 } |
827 @end | 827 @end |
828 | 828 |
829 /* Subclass for a button type */ | 829 /* Subclass for a button type */ |