![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/share/GNUstep/Documentation/Developer/Gui/Reference/ |
Upload File : |
<?xml version="1.0"?> <!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 1.0.4//EN" "http://www.gnustep.org/gsdoc-1_0_4.dtd"> <gsdoc base="NSImage" up="Gui"> <head> <title>NSImage</title> <author name="Adam Fedor"> <email address="fedor@colorado.edu"> fedor@colorado.edu </email> </author> <abstract>Load, manipulate and display images</abstract> <copy>1996-2016 Free Software Foundation, Inc.</copy> </head> <body> <front><contents /></front> <chapter> <heading> Software documentation for the NSImage class </heading> <class name="NSImage" super="NSObject" ovadd="1.0.0"> <declared>AppKit/NSImage.h</declared> <conform>NSCoding</conform> <conform>NSCopying</conform> <desc> <em>Description forthcoming.</em> </desc> <ivariable type="NSImageCacheMode" name="_cacheMode" validity="protected" ovadd="1.0.0"> <desc> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </desc> </ivariable> <ivariable type="NSColor*" name="_color" validity="protected" ovadd="1.0.0"> <desc> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </desc> </ivariable> <ivariable type="id" name="_delegate" validity="protected" ovadd="1.0.0"> <desc> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </desc> </ivariable> <ivariable type="NSString*" name="_fileName" validity="protected" ovadd="1.0.0"> <desc> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </desc> </ivariable> <ivariable type="NSView*" name="_lockedView" validity="protected" ovadd="1.0.0"> <desc> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </desc> </ivariable> <ivariable type="NSString*" name="_name" validity="protected" ovadd="1.0.0"> <desc> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </desc> </ivariable> <ivariable type="NSMutableArray*" name="_reps" validity="protected" ovadd="1.0.0"> <desc> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </desc> </ivariable> <ivariable type="NSSize" name="_size" validity="protected" ovadd="1.0.0"> <desc> <em>Warning</em> the underscore at the start of the name of this instance variable indicates that, even though it is not technically <em>private</em>, it is intended for internal use within the package, and you should not use the variable in other code. </desc> </ivariable> <ivariable type="struct __imageFlags" name="struct __imageFlags" validity="protected" ovadd="1.0.0"> <desc> <em>Description forthcoming.</em> </desc> </ivariable> <method type="NSImage*" factory="yes" ovadd="0.0.0" ovrem="0.0.0"> <sel>_standardImageWithName:</sel> <arg type="NSString*">name</arg> <desc> <em>Warning</em> the underscore at the start of the <var>name</var> of this method indicates that it is private, for internal use only, and you should not use the method in your code. </desc> </method> <method type="BOOL" factory="yes" ovadd="1.0.0"> <sel>canInitWithPasteboard:</sel> <arg type="NSPasteboard*">pasteboard</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSArray*" factory="yes" ovadd="1.0.0"> <sel>imageFileTypes</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="id" factory="yes" ovadd="1.0.0"> <sel>imageNamed:</sel> <arg type="NSString*">aName</arg> <desc> Returns the NSImage named <var>aName</var>. The search is done in the main bundle first and then in the usual images directories. </desc> </method> <method type="NSArray*" factory="yes" ovadd="1.0.0"> <sel>imagePasteboardTypes</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSArray*" factory="yes" ovadd="1.0.0"> <sel>imageUnfilteredFileTypes</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSArray*" factory="yes" ovadd="1.0.0"> <sel>imageUnfilteredPasteboardTypes</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSData*" ovadd="1.0.0"> <sel>TIFFRepresentation</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSData*" ovadd="1.0.0"> <sel>TIFFRepresentationUsingCompression:</sel> <arg type="NSTIFFCompression">comp</arg> <sel>factor:</sel> <arg type="float">aFloat</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>addRepresentation:</sel> <arg type="NSImageRep*">imageRep</arg> <desc> Adds the NSImageRep <var>imageRep</var> to the NSImage's representations array. <p> See Also: </p> <list> <item> <ref type="method" id="-addRepresentations:"> -addRepresentations: </ref> </item> <item> <ref type="method" id="-removeRepresentation:"> -removeRepresentation: </ref> </item> </list> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>addRepresentations:</sel> <arg type="NSArray*">imageRepArray</arg> <desc> Adds the NSImageRep array <var>imageRepArray</var> to the NSImage's representations array. <p> See Also: </p> <list> <item> <ref type="method" id="-addRepresentation:"> -addRepresentation: </ref> </item> <item> <ref type="method" id="-removeRepresentation:"> -removeRepresentation: </ref> </item> </list> </desc> </method> <method type="NSColor*" ovadd="1.0.0"> <sel>backgroundColor</sel> <desc> Returns the color of the NSImage's background. <p> See Also: </p> <list> <item> <ref type="method" id="-setBackgroundColor:"> -setBackgroundColor: </ref> </item> </list> </desc> </method> <method type="NSImageRep*" ovadd="1.0.0"> <sel>bestRepresentationForDevice:</sel> <arg type="NSDictionary*">deviceDescription</arg> <desc> Finds the best representation for <var>deviceDescription</var>. If <var>deviceDescription</var> is <code>nil</code>, it guesses where drawing is taking place and finds the best representation. </desc> </method> <method type="NSImageRep*" ovadd="10.6.0"> <sel>bestRepresentationForRect:</sel> <arg type="NSRect">rect</arg> <sel>context:</sel> <arg type="NSGraphicsContext*">context</arg> <sel>hints:</sel> <arg type="NSDictionary*">deviceDescription</arg> <desc> Finds the best representation for drawing in the specified <var>rect</var>. <var>context</var> and hints are currently ignored. </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>cacheDepthMatchesImageDepth</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSImageCacheMode" ovadd="1.0.0"> <sel>cacheMode</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>compositeToPoint:</sel> <arg type="NSPoint">aPoint</arg> <sel>fromRect:</sel> <arg type="NSRect">aRect</arg> <sel>operation:</sel> <arg type="NSCompositingOperation">op</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="10.0.0"> <sel>compositeToPoint:</sel> <arg type="NSPoint">aPoint</arg> <sel>fromRect:</sel> <arg type="NSRect">srcRect</arg> <sel>operation:</sel> <arg type="NSCompositingOperation">op</arg> <sel>fraction:</sel> <arg type="CGFloat">delta</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>compositeToPoint:</sel> <arg type="NSPoint">aPoint</arg> <sel>operation:</sel> <arg type="NSCompositingOperation">op</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="10.0.0"> <sel>compositeToPoint:</sel> <arg type="NSPoint">aPoint</arg> <sel>operation:</sel> <arg type="NSCompositingOperation">op</arg> <sel>fraction:</sel> <arg type="CGFloat">delta</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="id" ovadd="1.0.0"> <sel>delegate</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>dissolveToPoint:</sel> <arg type="NSPoint">aPoint</arg> <sel>fraction:</sel> <arg type="CGFloat">aFloat</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>dissolveToPoint:</sel> <arg type="NSPoint">aPoint</arg> <sel>fromRect:</sel> <arg type="NSRect">aRect</arg> <sel>fraction:</sel> <arg type="CGFloat">aFloat</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="10.0.0"> <sel>drawAtPoint:</sel> <arg type="NSPoint">point</arg> <sel>fromRect:</sel> <arg type="NSRect">srcRect</arg> <sel>operation:</sel> <arg type="NSCompositingOperation">op</arg> <sel>fraction:</sel> <arg type="CGFloat">delta</arg> <desc> Calls <ref type="method" id="-drawAtPoint:fromRect:operation:fraction:">-drawAtPoint:fromRect:operation:fraction:</ref> with <code>dstRect</code> given by <code><var>point</var></code> and the size of <code><var>srcRect</var></code>. </desc> </method> <method type="void" ovadd="10.6.0"> <sel>drawInRect:</sel> <arg type="NSRect">rect</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="10.0.0"> <sel>drawInRect:</sel> <arg type="NSRect">dstRect</arg> <sel>fromRect:</sel> <arg type="NSRect">srcRect</arg> <sel>operation:</sel> <arg type="NSCompositingOperation">op</arg> <sel>fraction:</sel> <arg type="CGFloat">delta</arg> <desc> <p> Takes the part of the receiver given by <code><var>srcRect</var></code> and draws it in <code><var>dstRect</var></code> in the current coordinate system, transforming the image as necessary. </p> <p> The image is drawn as if it was drawn to a cleared window, then dissolved using the fraction <code><var>delta</var></code> to another cleared window, and finally composited using <code><var>op</var></code> to the destination. </p> <p> Note that compositing and dissolving doesn't work on all devices (printers, in particular). </p> </desc> </method> <method type="void" ovadd="10.6.0"> <sel>drawInRect:</sel> <arg type="NSRect">dstRect</arg> <sel>fromRect:</sel> <arg type="NSRect">srcRect</arg> <sel>operation:</sel> <arg type="NSCompositingOperation">op</arg> <sel>fraction:</sel> <arg type="CGFloat">delta</arg> <sel>respectFlipped:</sel> <arg type="BOOL">respectFlipped</arg> <sel>hints:</sel> <arg type="NSDictionary*">hints</arg> <desc> Base drawing method in NSImage; all other draw methods call this one <br /> We only use caching on backends that can efficiently draw a rect from the cache onto the current graphics context respecting the CTM, which is currently cairo. </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>drawRepresentation:</sel> <arg type="NSImageRep*">imageRep</arg> <sel>inRect:</sel> <arg type="NSRect">aRect</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="id" ovadd="1.0.0"> <sel>initByReferencingFile:</sel> <arg type="NSString*">fileName</arg> <desc> Initializes and returns a NSImage from the NSString <var>fileName</var>. </desc> </method> <method type="id" ovadd="10.0.0"> <sel>initWithBitmapHandle:</sel> <arg type="void*">bitmap</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="id" ovadd="1.0.0"> <sel>initWithContentsOfFile:</sel> <arg type="NSString*">fileName</arg> <desc> Initializes and returns a new NSImage from the file <var>fileName</var>. <var>fileName</var> should be an absolute path. <p> See Also: </p> <list> <item> <ref type="method" id="+imageRepsWithContentsOfFile:" class="NSImageRep">[NSImageRep +imageRepsWithContentsOfFile:]</ref> </item> </list> </desc> </method> <method type="id" ovadd="10.0.0"> <sel>initWithContentsOfURL:</sel> <arg type="NSURL*">anURL</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="id" ovadd="1.0.0"> <sel>initWithData:</sel> <arg type="NSData*">data</arg> <desc> Initializes and returns a new NSImage from the NSData <var>data</var>. <p> See Also: </p> <list> <item> <ref type="method" id="+imageRepWithData:" class="NSBitmapImageRep">[NSBitmapImageRep +imageRepWithData:]</ref> </item> <item> <ref type="method" id="+imageRepWithData:" class="NSEPSImageRep">[NSEPSImageRep +imageRepWithData:]</ref> </item> </list> </desc> </method> <method type="id" ovadd="10.0.0"> <sel>initWithIconHandle:</sel> <arg type="void*">icon</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="id" ovadd="1.0.0"> <sel>initWithPasteboard:</sel> <arg type="NSPasteboard*">pasteboard</arg> <desc> Initializes and returns a new NSImage from the data in <var>pasteboard</var>. The <var>pasteboard</var> types can be whose defined in <ref type="method" id="+imagePasteboardTypes" class="NSImageRep">[NSImageRep +imagePasteboardTypes]</ref> or NSFilenamesPboardType <p> See Also: </p> <list> <item> <ref type="method" id="+imageRepsWithPasteboard:" class="NSImageRep">[NSImageRep +imageRepsWithPasteboard:]</ref> </item> </list> </desc> </method> <method type="id" ovadd="1.0.0"> <sel>initWithSize:</sel> <arg type="NSSize">aSize</arg> <desc> Initialize and returns a new NSImage with <var>aSize</var> as specified size. <p> See Also: </p> <list> <item> <ref type="method" id="-setSize:"> -setSize: </ref> </item> <item> <ref type="method" id="-size"> -size </ref> </item> </list> </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>isCachedSeparately</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>isDataRetained</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>isFlipped</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>isValid</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>lockFocus</sel> <desc> Locks the focus on the best representation. <p> See Also: </p> <list> <item> <ref type="method" id="-lockFocusOnRepresentation:"> -lockFocusOnRepresentation: </ref> </item> </list> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>lockFocusOnRepresentation:</sel> <arg type="NSImageRep*">imageRep</arg> <desc> Locks the focus in the <var>imageRep</var>. If <var>imageRep</var> is <code>nil</code> this method locks the focus on the best representation. </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>matchesOnMultipleResolution</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSString*" ovadd="1.0.0"> <sel>name</sel> <desc> Returns the name of the receiver. </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>prefersColorMatch</sel> <desc> Returns <code>YES</code> if color matching is the preferred representation and <code>NO</code> otherwise. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>recache</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>removeRepresentation:</sel> <arg type="NSImageRep*">imageRep</arg> <desc> Remove the NSImageRep <var>imageRep</var> from the NSImage's representations array <p> See Also: </p> <list> <item> <ref type="method" id="-addRepresentations:"> -addRepresentations: </ref> </item> <item> <ref type="method" id="-addRepresentation:"> -addRepresentation: </ref> </item> </list> </desc> </method> <method type="NSArray*" ovadd="1.0.0"> <sel>representations</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>scalesWhenResized</sel> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setBackgroundColor:</sel> <arg type="NSColor*">aColor</arg> <desc> Sets the color of the NSImage's background to <var>aColor</var>. <p> See Also: </p> <list> <item> <ref type="method" id="-backgroundColor"> -backgroundColor </ref> </item> </list> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setCacheDepthMatchesImageDepth:</sel> <arg type="BOOL">flag</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setCacheMode:</sel> <arg type="NSImageCacheMode">mode</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setCachedSeparately:</sel> <arg type="BOOL">flag</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setDataRetained:</sel> <arg type="BOOL">flag</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setDelegate:</sel> <arg type="id">anObject</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setFlipped:</sel> <arg type="BOOL">flag</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setMatchesOnMultipleResolution:</sel> <arg type="BOOL">flag</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>setName:</sel> <arg type="NSString*">aName</arg> <desc> Sets <var>aName</var> as the name of the receiver. </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setPrefersColorMatch:</sel> <arg type="BOOL">flag</arg> <desc> Sets the preferred representation of a NSImage. <p> See Also: </p> <list> <item> <ref type="method" id="-prefersColorMatch"> -prefersColorMatch </ref> </item> <item> <ref type="method" id="-bestRepresentationForDevice:"> -bestRepresentationForDevice: </ref> </item> </list> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setScalesWhenResized:</sel> <arg type="BOOL">flag</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setSize:</sel> <arg type="NSSize">aSize</arg> <desc> Sets the NSImage size to <var>aSize</var>. Changing the size recreate the cache. <p> See Also: </p> <list> <item> <ref type="method" id="-size"> -size </ref> </item> <item> <ref type="method" id="-initWithSize:"> -initWithSize: </ref> </item> </list> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>setUsesEPSOnResolutionMismatch:</sel> <arg type="BOOL">flag</arg> <desc> <em>Description forthcoming.</em> </desc> </method> <method type="NSSize" ovadd="1.0.0"> <sel>size</sel> <desc> Returns NSImage size if the size have been set. Returns the size of the best representation otherwise. <p> See Also: </p> <list> <item> <ref type="method" id="-setSize:"> -setSize: </ref> </item> <item> <ref type="method" id="-initWithSize:"> -initWithSize: </ref> </item> </list> </desc> </method> <method type="void" ovadd="1.0.0"> <sel>unlockFocus</sel> <desc> Unlocks the focus on the receiver. <p> See Also: </p> <list> <item> <ref type="method" id="-lockFocus"> -lockFocus </ref> </item> </list> </desc> </method> <method type="BOOL" ovadd="1.0.0"> <sel>usesEPSOnResolutionMismatch</sel> <desc> <em>Description forthcoming.</em> </desc> </method> </class> </chapter> <chapter> <heading> Software documentation for the NSBundle(NSImageAdditions) category </heading> <category name="NSImageAdditions" class="NSBundle" ovadd="1.0.0"> <declared>AppKit/NSImage.h</declared> <desc> <em>Description forthcoming.</em> </desc> <method type="NSString*" ovadd="1.0.0"> <sel>pathForImageResource:</sel> <arg type="NSString*">name</arg> <desc> <em>Description forthcoming.</em> </desc> </method> </category> </chapter> <chapter> <heading> Software documentation for the NSImage(GSQuartz) category </heading> <category name="GSQuartz" class="NSImage" ovadd="1.0.0"> <declared>AppKit/NSImage.h</declared> <desc> <em>Description forthcoming.</em> </desc> <method type="CGImageRef" ovadd="10.6.0"> <sel>CGImageForProposedRect:</sel> <arg type="NSRect*">proposedDestRect</arg> <sel>context:</sel> <arg type="NSGraphicsContext*">referenceContext</arg> <sel>hints:</sel> <arg type="NSDictionary*">hints</arg> <desc> <em>Description forthcoming.</em> </desc> </method> </category> </chapter> <chapter> <heading> Software documentation for the GSImageDelegateProtocol protocol </heading> <protocol name="GSImageDelegateProtocol" ovadd="0.0.0" ovrem="0.0.0"> <declared>AppKit/NSImage.h</declared> <desc> <em>Description forthcoming.</em> </desc> <method type="NSImage*" ovadd="0.0.0" ovrem="0.0.0"> <sel>imageDidNotDraw:</sel> <arg type="id">sender</arg> <sel>inRect:</sel> <arg type="NSRect">aRect</arg> <desc> <em>Description forthcoming.</em> </desc> </method> </protocol> </chapter> </body> </gsdoc>