From c8b442e4af5f12d91450e9b1fcce1468aa49de4e Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Wed, 26 May 2010 18:06:02 +0000 Subject: [Author: caseyho] UIImage rotate method plus tests. R=altse APPROVED=altse DELTA=152 (152 added, 0 deleted, 0 changed) --- iPhone/GTMUIImage+Resize.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'iPhone/GTMUIImage+Resize.h') diff --git a/iPhone/GTMUIImage+Resize.h b/iPhone/GTMUIImage+Resize.h index 25e2125..a1d4ed3 100644 --- a/iPhone/GTMUIImage+Resize.h +++ b/iPhone/GTMUIImage+Resize.h @@ -37,4 +37,15 @@ - (UIImage *)gtm_imageByResizingToSize:(CGSize)targetSize preserveAspectRatio:(BOOL)preserveAspectRatio trimToFit:(BOOL)trimToFit; + +// Returns an image rotated by |orientation| where the current orientation is +// taken as UIImageOrientationUp. Nil if |orientation| is invalid. +// +// For example, UIImageOrientationRight is a 90 degree rotation clockwise, +// UIImageOrientationDown is a 180 degree rotation closewise. +// +// Supplying UIImageOrientationUp to |orientation| will return a copy of the +// image. +- (UIImage *)gtm_imageByRotating:(UIImageOrientation)orientation; + @end -- cgit v1.2.3