mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 08:30:58 +00:00
* Source/NSImage.m: Tidy the -composite*/-dissolve* methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33299 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f2f4ab4076
commit
baeb44bf84
2 changed files with 24 additions and 26 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2011-06-14 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSImage.m: Tidy the -composite*/-dissolve* methods
|
||||||
|
|
||||||
2011-06-13 Eric Wasylishen <ewasylishen@gmail.com>
|
2011-06-13 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/NSTextView.m (-scrollRangeToVisible:): Work with ranges
|
* Source/NSTextView.m (-scrollRangeToVisible:): Work with ranges
|
||||||
|
|
|
@ -805,11 +805,10 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
||||||
- (void) compositeToPoint: (NSPoint)aPoint
|
- (void) compositeToPoint: (NSPoint)aPoint
|
||||||
operation: (NSCompositingOperation)op
|
operation: (NSCompositingOperation)op
|
||||||
{
|
{
|
||||||
// Might not be computed up to now
|
[self compositeToPoint: aPoint
|
||||||
NSSize size = [self size];
|
fromRect: NSZeroRect
|
||||||
NSRect rect = NSMakeRect(0, 0, size.width, size.height);
|
operation: op
|
||||||
|
fraction: 1.0];
|
||||||
[self compositeToPoint: aPoint fromRect: rect operation: op];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) compositeToPoint: (NSPoint)aPoint
|
- (void) compositeToPoint: (NSPoint)aPoint
|
||||||
|
@ -817,21 +816,19 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
||||||
operation: (NSCompositingOperation)op
|
operation: (NSCompositingOperation)op
|
||||||
{
|
{
|
||||||
[self compositeToPoint: aPoint
|
[self compositeToPoint: aPoint
|
||||||
fromRect: aRect
|
fromRect: aRect
|
||||||
operation: op
|
operation: op
|
||||||
fraction: 1.0];
|
fraction: 1.0];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) compositeToPoint: (NSPoint)aPoint
|
- (void) compositeToPoint: (NSPoint)aPoint
|
||||||
operation: (NSCompositingOperation)op
|
operation: (NSCompositingOperation)op
|
||||||
fraction: (float)delta
|
fraction: (float)delta
|
||||||
{
|
{
|
||||||
NSSize size = [self size];
|
|
||||||
|
|
||||||
[self compositeToPoint: aPoint
|
[self compositeToPoint: aPoint
|
||||||
fromRect: NSMakeRect(0, 0, size.width, size.height)
|
fromRect: NSZeroRect
|
||||||
operation: op
|
operation: op
|
||||||
fraction: delta];
|
fraction: delta];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) compositeToPoint: (NSPoint)aPoint
|
- (void) compositeToPoint: (NSPoint)aPoint
|
||||||
|
@ -861,7 +858,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
||||||
|
|
||||||
[ctxt GSSetCTM: newTransform];
|
[ctxt GSSetCTM: newTransform];
|
||||||
|
|
||||||
[self drawAtPoint: NSMakePoint(0,0)
|
[self drawAtPoint: NSMakePoint(0, 0)
|
||||||
fromRect: srcRect
|
fromRect: srcRect
|
||||||
operation: op
|
operation: op
|
||||||
fraction: delta];
|
fraction: delta];
|
||||||
|
@ -872,11 +869,9 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
||||||
|
|
||||||
- (void) dissolveToPoint: (NSPoint)aPoint fraction: (float)aFloat
|
- (void) dissolveToPoint: (NSPoint)aPoint fraction: (float)aFloat
|
||||||
{
|
{
|
||||||
NSSize size = [self size];
|
|
||||||
|
|
||||||
[self dissolveToPoint: aPoint
|
[self dissolveToPoint: aPoint
|
||||||
fromRect: NSMakeRect(0, 0, size.width, size.height)
|
fromRect: NSZeroRect
|
||||||
fraction: aFloat];
|
fraction: aFloat];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) dissolveToPoint: (NSPoint)aPoint
|
- (void) dissolveToPoint: (NSPoint)aPoint
|
||||||
|
@ -884,9 +879,9 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
||||||
fraction: (float)aFloat
|
fraction: (float)aFloat
|
||||||
{
|
{
|
||||||
[self compositeToPoint: aPoint
|
[self compositeToPoint: aPoint
|
||||||
fromRect: aRect
|
fromRect: aRect
|
||||||
operation: NSCompositeSourceOver
|
operation: NSCompositeSourceOver
|
||||||
fraction: aFloat];
|
fraction: aFloat];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) drawRepresentation: (NSImageRep *)imageRep inRect: (NSRect)aRect
|
- (BOOL) drawRepresentation: (NSImageRep *)imageRep inRect: (NSRect)aRect
|
||||||
|
@ -924,11 +919,10 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
|
||||||
operation: (NSCompositingOperation)op
|
operation: (NSCompositingOperation)op
|
||||||
fraction: (float)delta
|
fraction: (float)delta
|
||||||
{
|
{
|
||||||
[self drawInRect: NSMakeRect(point.x, point.y, srcRect.size.width,
|
[self drawInRect: NSMakeRect(point.x, point.y, srcRect.size.width, srcRect.size.height)
|
||||||
srcRect.size.height)
|
fromRect: srcRect
|
||||||
fromRect: srcRect
|
operation: op
|
||||||
operation: op
|
fraction: delta];
|
||||||
fraction: delta];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* New code path that delegates as much as possible to the backend and whose
|
/* New code path that delegates as much as possible to the backend and whose
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue