comparison mac/dw.m @ 1775:ae8dedac4358

Eliminated use of deprecated method compositeToPoint on Mac.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 16 Jul 2012 20:16:19 +0000
parents 4cc999e757a3
children c02f23d24507
comparison
equal deleted inserted replaced
1774:4cc999e757a3 1775:ae8dedac4358
1604 [[self backgroundColor] set]; 1604 [[self backgroundColor] set];
1605 NSRectFill(imageFrame); 1605 NSRectFill(imageFrame);
1606 } 1606 }
1607 imageFrame.origin.x += 3; 1607 imageFrame.origin.x += 3;
1608 imageFrame.size = imageSize; 1608 imageFrame.size = imageSize;
1609 imageFrame.origin.y += ceil((cellFrame.size.height - imageFrame.size.height) / 2);
1609 1610
1610 if ([controlView isFlipped]) 1611 [image drawAtPoint:imageFrame.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
1611 imageFrame.origin.y += ceil((cellFrame.size.height + imageFrame.size.height) / 2);
1612 else
1613 imageFrame.origin.y += ceil((cellFrame.size.height - imageFrame.size.height) / 2);
1614
1615 [image compositeToPoint:imageFrame.origin operation:NSCompositeSourceOver];
1616 } 1612 }
1617 [super drawWithFrame:cellFrame inView:controlView]; 1613 [super drawWithFrame:cellFrame inView:controlView];
1618 } 1614 }
1619 -(NSSize)cellSize 1615 -(NSSize)cellSize
1620 { 1616 {