mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Delegate to the rep instead of using the lower level function
This commit is contained in:
parent
676066b94d
commit
5b8db43dd2
3 changed files with 5 additions and 11 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue