Delegate to the rep instead of using the lower level function

This commit is contained in:
Gregory John Casamento 2019-12-04 08:22:43 -05:00
parent 676066b94d
commit 5b8db43dd2
3 changed files with 5 additions and 11 deletions

View file

@ -126,13 +126,11 @@
// Override to draw the specified page...
- (BOOL) draw
{
NSRect irect = NSMakeRect(0, 0, _size.width, _size.height);
NSGraphicsContext *ctxt = GSCurrentContext();
[self prepareGState];
[_pageRep _premultiply];
[ctxt GSDrawImage: irect : _pageRep];
[_pageRep draw];
return YES;
}

View file

@ -126,12 +126,11 @@
// Override to draw the specified page...
- (BOOL) draw
{
NSRect irect = NSMakeRect(0, 0, _size.width, _size.height);
NSGraphicsContext *ctxt = GSCurrentContext();
NSBitmapImageRep *rep = [_pageReps objectAtIndex: _currentPage - 1];
[rep _premultiply];
[ctxt GSDrawImage: irect : rep];
[rep draw];
return YES;
}
@end

View file

@ -96,11 +96,8 @@
// Override to draw the specified page...
- (BOOL) draw
{
NSRect irect = NSMakeRect(0, 0, _size.width, _size.height);
NSGraphicsContext *ctxt = GSCurrentContext();
[_pageRep _premultiply];
[ctxt GSDrawImage: irect : _pageRep];
[_pageRep draw];
return YES;
}
@end