From f46577f049d4760a8b81e469e04fe4e50ff78092 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Thu, 1 Sep 2011 13:30:21 +0000 Subject: [Author: stuartmorgan] Add text shadow support to GTMFadeTruncatingLabel R=thomasvl APPROVED=thomasvl --- iPhone/GTMFadeTruncatingLabel.m | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'iPhone') diff --git a/iPhone/GTMFadeTruncatingLabel.m b/iPhone/GTMFadeTruncatingLabel.m index 619e7bb..2a24a2c 100755 --- a/iPhone/GTMFadeTruncatingLabel.m +++ b/iPhone/GTMFadeTruncatingLabel.m @@ -54,6 +54,16 @@ CGContextClipToMask(context, self.bounds, image.CGImage); } + if (self.shadowColor) { + CGContextSetFillColorWithColor(context, self.shadowColor.CGColor); + CGRect shadowRect = CGRectOffset(requestedRect, self.shadowOffset.width, + self.shadowOffset.height); + [self.text drawInRect:shadowRect + withFont:self.font + lineBreakMode:UILineBreakModeClip + alignment:self.textAlignment]; + } + CGContextSetFillColorWithColor(context, self.textColor.CGColor); [self.text drawInRect:requestedRect withFont:self.font -- cgit v1.2.3