ftp.nice.ch/Attic/openStep/games/Solitaire.3.1.s.tgz#/Solitaire.3.1/Documentation/CardSet/SmallCard.rtf

This is SmallCard.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1  1998 All Rights Reserved.  i i0 
s5 li2116 fi0 ri1007 ql f0 fs56 b SmallCardb0 
{fs16 




}s17 li4888 fi-2771 ri1007 ql tx4888 f0 fs28 b Inherits From:b0 f1 fs28 	Card
s17 li4888 fi-2771 ri1007 ql tx4888 f0 fs28 b Declared In:b0 f1 fs28 	SmallCard.h
s13 li1360 fi0 ri1007 ql fs16 



f0 fs36 b Class Descriptionb0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 Instances of this class provide the same functionality as our superclass Card, except that they draw themselves more compactly.  The only methods that differ from our superclass are ones that are concerned with display. 
s13 li1360 fi0 ri1007 ql fs16 



f0 fs36 b Method Typesb0 
{fs16 
}s11 li6148 fi-4031 ri1007 ql tx6148 f1 fs28 Initializing the class
	+ initialize
	+ drawCardImages
	+ freeCardImages
	+ setCardBackImage:
	+ setCardBack:
Drawing
	{f3 -} preDrawCard:
	{f3 -} drawCardAt:
	{f3 -} drawOutlineAt:
	{f3 -} drawContentsAt:
s13 li1360 fi0 ri1007 ql fs16 



f0 fs36 b Class Methodsb0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 f0 fs28 b drawCardImagesb0 
fs28 {fs8 
}tx3240 li2100 fi-760 li3240f1 fs28 + (void)b drawCardImagesb0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 Creates shared NSImage caches of all 52 cards in the deck.  Uses the instance method b preDrawCards:b0  to do the actual drawing. 
pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 f0 fs28 b freeCardImagesb0 
fs28 {fs8 
}tx3240 li2100 fi-760 li3240f1 fs28 + (void)b freeCardImagesb0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 Frees the shared NSImage caches of all 52 cards. 
pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 f0 fs28 b initializeb0 
fs28 {fs8 
}tx3240 li2100 fi-760 li3240f1 fs28 + (void)b initializeb0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 Initializes the class object.  The partial card images from CardSet TIFFS are loaded here. 
pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 f0 fs28 b setCardBack:b0 
fs28 {fs8 
}tx3240 li2100 fi-760 li3240f1 fs28 + (void)b setCardBackb0 b :b0 (CardBack)i aBacki0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 Sets the card back used to draw the back of the card.
fs16 
fs28 {pard s11 li7648 fi-5131 ri1007 ql tx7648 tx10180 fs16 
 fs28  b	Constant Imageb0  } {pard s11 li7648 fi-5131 ri1007 ql tx7648 tx10180 fs16 
 fs28  CS_DEFAULT	Original image from version 1.0. } {pard s11 li7648 fi-5131 ri1007 ql tx7648 tx10180 fs16 
 fs28  CS_TRAD	Traditional pattern. } {pard s11 li7648 fi-5131 ri1007 ql tx7648 tx10180 fs16 
 fs28  CS_SHIP	Ship at sea. } {pard s11 li7648 fi-5131 ri1007 ql tx7648 tx10180 fs16 
 fs28  CS_CUSTOM	Custom image. }  
pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 f0 fs28 b setCardBackImage:b0 
fs28 {fs8 
}tx3240 li2100 fi-760 li3240f1 fs28 + (void)b setCardBackImageb0 b :b0 i theImagei0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 Sets a custom image used to draw the back of the card. 
s13 li1360 fi0 ri1007 ql fs16 



f0 fs36 b Instance Methodsb0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 f0 fs28 b drawCardAt:b0 
fs28 {fs8 
}tx3240 li2100 fi-760 li3240f1 fs28  (void)b drawCardAtb0 b :b0 (NSPoint)i thePointi0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 Draws the card, both outline and contents, at i thePointi0 , by calling b drawOutlineAt:b0  and b drawContentsAt:b0 .  If the 52 cards of the deck have been pre-drawn, the shared NSImage cache is used.  Otherwise, the card is drawn by compositing the partial images. 
pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 f0 fs28 b drawContentsAt:b0 
fs28 {fs8 
}tx3240 li2100 fi-760 li3240f1 fs28  (void)b drawContentsAtb0 b :b0 (NSPoint)i thePointi0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 Draws the contents of the card (but not the border) at i thePointi0 . 
pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 f0 fs28 b drawOutlineAt:b0 
fs28 {fs8 
}tx3240 li2100 fi-760 li3240f1 fs28  (void)b drawOutlineAtb0 b :b0 (NSPoint)i thePointi0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 Draws the card's border at i thePointi0 . 
pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 f0 fs28 b preDrawCard:b0 
fs28 {fs8 
}tx3240 li2100 fi-760 li3240f1 fs28  (void)b preDrawCardb0 b :b0 (NSImage*)i theImagei0 
{fs16 
}pard s0 li2116 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 fs28 Pre-draws theSharedNSImage, both outline and contents, by calling b drawOutlineAt:b0  and b drawContentsAt:b0  for point {0.0, 0.0}. 

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.