Guest User

Untitled

a guest
Sep 19th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @implementation NSImage (ImLazyButIDontWantTheWarningsToMakeMeLookBad)
  2.  
  3.     - (void)deprecatedCompositeToPoint: (NSPoint)thePoint operation: (NSCompositingOperation)theOperation {
  4.         NSRect theTargetRect;
  5.         theTargetRect.origin = thePoint;
  6.         theTargetRect.size = [self size];
  7.         if ([[NSGraphicsContext currentContext] isFlipped]) {
  8.             theTargetRect.origin.y -= theTargetRect.size.height;
  9.         }
  10.         [self drawInRect: theTargetRect fromRect: NSZeroRect operation: theOperation fraction: 1.0 respectFlipped: YES hints: nil];
  11.     }
  12.  
  13.     - (void)deprecatedDissolveToPoint: (NSPoint)thePoint fraction: (CGFloat)theAlphaValue {
  14.         NSRect theTargetRect;
  15.         theTargetRect.origin = thePoint;
  16.         theTargetRect.size = [self size];
  17.         if ([[NSGraphicsContext currentContext] isFlipped]) {
  18.             theTargetRect.origin.y -= theTargetRect.size.height;
  19.         }
  20.         [self drawInRect: theTargetRect fromRect: NSZeroRect operation: NSCompositeSourceOver fraction: theAlphaValue respectFlipped: YES hints: nil];
  21.     }
  22.  
  23. @end
Add Comment
Please, Sign In to add comment