home *** CD-ROM | disk | FTP | other *** search
/ Altsys Virtuoso 2.0K / virtuoso_20k.iso / NeXTanswers / OpenStepSpec_rtf / ApplicationKit / Classes / NSImageRep.rtf < prev    next >
Encoding:
Text File  |  1994-07-01  |  8.2 KB  |  115 lines

  1. {\rtf0\ansi\paperw16228 \paperh18648 \margl-907 \margr0 \margt0 \margb0 {\fonttbl\f0\fswiss Helvetica;\f1\froman Times;\f2\fmodern Courier;\f3\ftech Symbol;\f4\froman Palatino;}
  2. {\stylesheet{\s0 \li100 \fi0 \ri1007 \ql   1Head;}
  3. {\s1 \li100 \fi0 \ri1007 \ql   ClassName;}
  4. {\s2 \li2872 \fi-2771 \ri1007 \ql \tx2872   ConformsTo;}
  5. {\s3 \li2872 \fi-2771 \ri1007 \ql   DeclaredIn;}
  6. {\s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030   Description;}
  7. {\s5 \li7030 \fi-5796 \ri1007 \ql   DescriptionPart;}
  8. {\s6 \li0 \fi0 \ri0 \ql \tx-25 \tx8290 \tx9172   Footer;}
  9. {\s7 \li2872 \fi-2771 \ri1007 \ql \tx2872   InheritsFrom;}
  10. {\s8 \li100 \fi0 \ri1007 \ql   Summary;}
  11. }
  12. \li0 \fi0 \ri0 \ql \sb0 \f1 \fs24 
  13. (Preliminary Documentation) Copyright \f3 \'e3\f1 1994 by NeXT Computer, Inc.  All Rights Reserved.\
  14. \
  15. \s0 \li100 \fi0 \ri1007 \ql \f0 \b \fs36 \fs16 \
  16. \
  17. \
  18. \
  19. \
  20. \
  21. \
  22. \fs36 NSImageRep \
  23. \pard \s7 \li2872 \fi-2771 \ri1007 \ql \tx2872 \f1 \b0 \fs28 \fs16 \
  24. \
  25. \
  26. \fs28 \f0 \b \fs28 Inherits From:    \b0 \fs28 \f1 NSObject \
  27. \fs16 \
  28. \fs28 \s3 \fs16 \fs28 \f0 \b \fs28 Declared In:    \b0 \fs28 \f1 appkit/NSImageRep.h \
  29. \fs16 \
  30. \fs28 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs28 \fs16 \
  31. \
  32. \fs28 Creating an NSImageRep\
  33. \fs16 \
  34. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 + (id)\b imageRepWithContentsOfFile:\b0 (NSString *)\i filename\
  35. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     In subclasses that respond to \b imageFileTypes\b0  and \b imageRepWithData:\b0 , returns an object that has been initialized with the data in \i filename\i0 .  NSImageRep\'27s implementation returns an instance of the appropriate registered subclass.\
  36. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 + (id)\b imageRepWithPasteboard:\b0 (NSPasteboard *)\i pasteboard\
  37. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     In subclasses that respond to \b imagePasteboardTypes\b0  and \b imageRepWithData:\b0 , returns an object that has been initialized with the data in \i pasteboard\i0 .  NSImageRep\'27s implementation returns an instance of the appropriate registered subclass.\
  38. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 + (NSArray *)\b imageRepsWithContentsOfFile:\b0 (NSString *)\i filename\
  39. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     In subclasses that respond to \b imageFileTypes\b0  and \b imageRepWithData:\b0  (or \b imageRepWithData:\b0 ), returns an array of objects that have been initialized with the data in \i filename\i0 .  NSImageRep\'27s implementation returns an array of objects (each an instance of the appropriate registered subclass) that have been initialized with the data in \i filename\i0 .\
  40. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 + (NSArray *)\b imageRepsWithPasteboard:\b0 (NSPasteboard *)\i pasteboard\
  41. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     In subclasses that respond to \b imagePasteboardTypes\b0  and \b imageRepsWithData:\b0  (or \b imageRepWithData:\b0 ), returns an array of objects that have been initialized with the data in \i pasteboard\i0 .  NSImageRep\'27s implementation returns an array of objects (each an instance of the appropriate registered subclass) that have been initialized with the data in \i pasteboard\i0 .\
  42. \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  43. \
  44. \
  45. \fs28 Checking data types \
  46. \fs16 \
  47. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 + (BOOL)\b canInitWithData:\b0 (NSData *)\i data\i0     Overridden in subclasses to return YES if the receiver can initialize itself from \i data\i0 .\
  48. \fi-6552 \fi-6552 \fi-6552 + (BOOL)\b canInitWithPasteboard:\b0 (NSPasteboard *)\i pasteboard\
  49. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     Overridden in subclasses to returnYES if the receiver can initialize itself from \i pasteboard\i0 .\
  50. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 + (NSArray *)\b imageFileTypes\b0     Returns an array of strings representing all file types.\
  51. \fi-6552 \fi-6552 \fi-6552 + (NSArray *)\b imagePasteboardTypes\b0     Returns an array of strings representing all pasteboard types.\
  52. \fi-6552 \fi-6552 \fi-6552 + (NSArray *)\b imageUnfilteredFileTypes\b0     Returns an array of strings representing directly supported file types.\
  53. \fi-6552 \fi-6552 \fi-6552 + (NSArray *)\b imageUnfilteredPasteboardTypes \b0     Returns an array of strings representing directly supported\
  54. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796         pasteboards.\
  55. \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  56. \
  57. \
  58. \fs28 Setting the Size of the Image \
  59. \fs16 \
  60. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (void)\b setSize:\b0 (NSSize)\i aSize\i0     Sets the size of the image.\
  61. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSSize)\b size\b0     Returns the size of the image.\
  62. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  63. \
  64. \
  65. \fs28 Specifying Information about the Representation \
  66. \fs16 \
  67. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (int)\b bitsPerSample\b0     Returns the number of bits per pixel in each component.\
  68. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSString *)\b colorSpaceName\b0     Returns the name of the image\'27s color space.\
  69. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (BOOL)\b hasAlpha\b0     Returns whether there is a coverage component.\
  70. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (BOOL)\b isOpaque\b0     Returns whether the representation is opaque.\
  71. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (int)\b pixelsHigh\b0     Returns the height specified in the image data.\
  72. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (int)\b pixelsWide\b0     Returns the width specified in the image data.\
  73. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setAlpha:\b0 (BOOL)\i flag\i0     Informs the receiver whether there is a coverage component.\
  74. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setBitsPerSample:\b0 (int)\i anInt\i0     Informs the receiver there are \i anInt\i0  bits/pixel in a component.\
  75. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setColorSpaceName:\b0 (NSString *)\i aString\i0     Informs the receiver of the image\'27s color space.\
  76. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setOpaque:\b0 (BOOL)\i flag\i0     Informs the receiver of the image\'27s opacity.\
  77. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setPixelsHigh:\b0 (int)\i anInt\i0     Informs the receiver that its data is for an image \i anInt\i0  pixels high.\
  78. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setPixelsWide:\b0 (int)\i anInt\i0     Informs the receiver that its data is for an image \i anInt\i0  pixels wide.\
  79. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  80. \
  81. \
  82. \fs28 Drawing the Image \
  83. \fs16 \
  84. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (BOOL)\b draw\b0     Implemented by subclasses to draw the image.\
  85. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (BOOL)\b drawAtPoint:\b0 (NSPoint)\i aPoint\i0     Modifies current coordinates so the image is drawn at \i aPoint\i0 .\
  86. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (BOOL)\b drawInRect:\b0 (NSRect)\i aRect\i0     Modifies current coordinates so the image is drawn in \i aRect\i0 .\
  87. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  88. \
  89. \
  90. \fs28 Managing NSImageRep Subclasses \
  91. \fs16 \
  92. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 + (Class)\b imageRepClassForData:\b0 (NSData *)\i data\
  93. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     Returns the ImageRep subclass that handles data of type \i data\i0 .\
  94. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 + (Class)\b imageRepClassForFileType:\b0 (NSString *)\i type\
  95. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     Returns the ImageRep subclass that handles data of file type \i type\i0 .\
  96. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 + (Class)\b imageRepClassForPasteboardType:\b0 (NSString *)\i type\
  97. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     Returns the ImageRep subclass that handles data of pasteboard type \i type\i0 .\
  98. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 + (void)\b registerImageRepClass:\b0 (Class)\i imageRepClass\
  99. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     Adds \i imageRepClass\i0  to the registry of available ImageRep classes.\
  100. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 + (NSArray *)\b registeredImageRepClasses\b0     Returns the names of the registered ImageRep classes.\
  101. \fi-6552 \fi-6552 \fi-6552 + (void)\b unregisterImageRepClass:\b0 (Class)\i imageRepClass\
  102. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     Removes \i imageRepClass\i0  from the registry of available ImageRep classes.\
  103. \pard \s0 \li100 \fi0 \tx478 \tx856 \tx1234 \fs16 \
  104. \
  105. \fs28 \
  106. \fs16 \
  107. \
  108. \fs28 \ri1007 \fs28 \fs16 \fs28 \
  109. \fs16 \
  110. \
  111. \fs28 \fs16 \fs28 \
  112. \fs16 \
  113. \
  114. \fs28 }
  115.