This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Draws a smiley inside the given rectangle. The mood value (0...1) is used | |
* to make the smiley happy or sad. | |
* | |
* @param rect Rectangle to draw the smiley into | |
* @param mood Happy (= 1) or sad (= 0) or anything in between | |
*/ | |
-(void)drawSmileyInRect:(CGRect)rect withMood:(float)mood { | |
CGContextRef ctx = UIGraphicsGetCurrentContext(); | |
CGContextSaveGState(ctx); |