Author: rmottola
Date: Wed Feb  3 01:08:23 2016
New Revision: 39332

URL: http://svn.gna.org/viewcvs/gnustep?rev=39332&view=rev
Log:
Trivial implementation of new 10.9 drawInRect: method

Modified:
    libs/gui/trunk/ChangeLog
    libs/gui/trunk/Headers/AppKit/NSImage.h
    libs/gui/trunk/Source/NSImage.m

Modified: libs/gui/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=39332&r1=39331&r2=39332&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog    (original)
+++ libs/gui/trunk/ChangeLog    Wed Feb  3 01:08:23 2016
@@ -1,3 +1,9 @@
+2016-02-03 Riccardo Mottola <[email protected]>
+
+       * Headers/AppKit/NSImage.h
+       * Source/NSImage.m
+       Trivial implementation of new 10.9 drawInRect: method
+
 2016-01-17 Ivan Vucica <[email protected]>
 
        * Source/NSBezierPath.m (-setLineDash:):

Modified: libs/gui/trunk/Headers/AppKit/NSImage.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Headers/AppKit/NSImage.h?rev=39332&r1=39331&r2=39332&view=diff
==============================================================================
--- libs/gui/trunk/Headers/AppKit/NSImage.h     (original)
+++ libs/gui/trunk/Headers/AppKit/NSImage.h     Wed Feb  3 01:08:23 2016
@@ -3,7 +3,7 @@
 
    Load, manipulate and display images
 
-   Copyright (C) 1996-2015 Free Software Foundation, Inc.
+   Copyright (C) 1996-2016 Free Software Foundation, Inc.
 
    Written by:  Adam Fedor <[email protected]>
    Date: Feb 1996
@@ -370,6 +370,16 @@
 
 #endif
 
+/**
+ * <p>Draws the entire image in <code>rect</code> scaling if needed.<br>
+ * Drawing is done using <code>NSCompositeSourceOver</code>.
+ * </p>
+ */
+
+#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
+- (void) drawInRect: (NSRect)rect;
+#endif
+
 //
 // Determining How the Image is Drawn 
 //

Modified: libs/gui/trunk/Source/NSImage.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSImage.m?rev=39332&r1=39331&r2=39332&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSImage.m     (original)
+++ libs/gui/trunk/Source/NSImage.m     Wed Feb  3 01:08:23 2016
@@ -2,7 +2,7 @@
 
    <abstract>Load, manipulate and display images</abstract>
 
-   Copyright (C) 1996, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1996-2016 Free Software Foundation, Inc.
    
    Author: Adam Fedor <[email protected]>
    Date: Feb 1996
@@ -1066,6 +1066,14 @@
          fraction: delta
     respectFlipped: NO
             hints: nil];
+}
+
+- (void) drawInRect: (NSRect)rect
+{
+  [self drawInRect: rect
+          fromRect: NSZeroRect
+         operation: NSCompositeSourceOver
+          fraction: 1.0];
 }
 
 - (void) drawInRect: (NSRect)dstRect


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to