iphone Programming Glossary: cgcontextconcatctm
Drawing rotated text with NSString drawInRect http://stackoverflow.com/questions/10289898/drawing-rotated-text-with-nsstring-drawinrect whiteColor .CGColor NSString str @ some test string CGAffineTransform transform1 CGAffineTransformMakeRotation M_PI 4 CGContextConcatCTM context transform1 CGContextTranslateCTM context 0 0 UIFont font UIFont systemFontOfSize 16.0 str drawInRect CGRectMake.. the context 90 degrees convert to radians CGAffineTransform transform1 CGAffineTransformMakeRotation 90.0 M_PI 180.0 CGContextConcatCTM context transform1 Move the context back into the view CGContextTranslateCTM context rect.size.height 0 Draw the string..
CGImage/UIImage lazily loading on UI thread causes stutter http://stackoverflow.com/questions/1815476/cgimage-uiimage-lazily-loading-on-ui-thread-causes-stutter CGContextScaleCTM context scaleRatioX scaleRatioY CGContextTranslateCTM context 0 currentHeight CGContextConcatCTM context transform CGContextDrawImage context CGRectMake 0 0 currentWidth currentHeight imgRef UIGraphicsEndImageContext..
MFMailComposeViewController image orientation http://stackoverflow.com/questions/20204495/mfmailcomposeviewcontroller-image-orientation context height 0 else CGContextScaleCTM context scaleRatio scaleRatio CGContextTranslateCTM context 0 height CGContextConcatCTM context transform CGContextDrawImage UIGraphicsGetCurrentContext CGRectMake 0 0 width height imgRef UIImage imageCopy UIGraphicsGetImageFromCurrentImageContext..
CGContextDrawPDFPage taking up large amounts of memory http://stackoverflow.com/questions/2975240/cgcontextdrawpdfpage-taking-up-large-amounts-of-memory Second move origin CGContextTranslateCTM g 0 rect.size.height Now apply the transform to draw the page within the rect CGContextConcatCTM g t Finally draw the page The important bit. Commenting out the following line fixes the crashing issue. CGContextDrawPDFPage..
How do I export UIImage array as a movie? http://stackoverflow.com/questions/3741323/how-do-i-export-uiimage-array-as-a-movie frameSize.height 8 4 frameSize.width rgbColorSpace kCGImageAlphaNoneSkipFirst NSParameterAssert context CGContextConcatCTM context frameTransform CGContextDrawImage context CGRectMake 0 0 CGImageGetWidth image CGImageGetHeight image image CGColorSpaceRelease..
Fast and Lean PDF Viewer for iPhone / iPad / iOs - tips and hints? http://stackoverflow.com/questions/3889634/fast-and-lean-pdf-viewer-for-iphone-ipad-ios-tips-and-hints issue.pdfDoc pageIndex 1 pdfToPageTransform CGPDFPageGetDrawingTransform pdfPage kCGPDFMediaBox layer.bounds 0 true CGContextConcatCTM context pdfToPageTransform CGContextDrawPDFPage context pdfPage issue is the object containg the CGPDFDocumentRef . I synchronize..
how to fit pdf page in entire view http://stackoverflow.com/questions/4321681/how-to-fit-pdf-page-in-entire-view NSLog @ the scaleToApply is f scaleToApply NSLog @ the view bounds are @ self.view description if scaleToApply yScale CGContextConcatCTM ctx CGAffineTransformMakeTranslation 100 150 else CGContextConcatCTM ctx CGAffineTransformMakeTranslation 180 260 evans.. @ self.view description if scaleToApply yScale CGContextConcatCTM ctx CGAffineTransformMakeTranslation 100 150 else CGContextConcatCTM ctx CGAffineTransformMakeTranslation 180 260 evans CGContextConcatCTM ctx CGAffineTransformMakeScale scaleToApply scaleToApply.. CGAffineTransformMakeTranslation 100 150 else CGContextConcatCTM ctx CGAffineTransformMakeTranslation 180 260 evans CGContextConcatCTM ctx CGAffineTransformMakeScale scaleToApply scaleToApply CGContextConcatCTM ctx CGPDFPageGetDrawingTransform myPageRef kCGPDFCropBox..
problem with rendering pdf on the entire screen of pdf http://stackoverflow.com/questions/4634331/problem-with-rendering-pdf-on-the-entire-screen-of-pdf NSLog @ the scaleToApply is f scaleToApply NSLog @ the view bounds are @ self.view description if scaleToApply yScale CGContextConcatCTM ctx CGAffineTransformMakeTranslation 100 150 else CGContextConcatCTM ctx CGAffineTransformMakeTranslation 180 260 CGContextConcatCTM.. @ self.view description if scaleToApply yScale CGContextConcatCTM ctx CGAffineTransformMakeTranslation 100 150 else CGContextConcatCTM ctx CGAffineTransformMakeTranslation 180 260 CGContextConcatCTM ctx CGAffineTransformMakeScale scaleToApply scaleToApply.. ctx CGAffineTransformMakeTranslation 100 150 else CGContextConcatCTM ctx CGAffineTransformMakeTranslation 180 260 CGContextConcatCTM ctx CGAffineTransformMakeScale scaleToApply scaleToApply CGContextConcatCTM ctx CGPDFPageGetDrawingTransform myPageRef kCGPDFCropBox..
layer.renderInContext doesn't take layer.mask into account? http://stackoverflow.com/questions/4896296/layer-renderincontext-doesnt-take-layer-mask-into-account Reverse the coordinate switch CGAffineTransform ctm CGContextGetCTM context ctm CGAffineTransformInvert ctm CGContextConcatCTM context ctm CGContextDrawImage context CGRectMake 0 0 cWidth cHeight mosaicLayer.image.CGImage CGImageRef mergeResult CGBitmapContextCreateImage..
UIImagePickerController camera preview is portrait in landscape app http://stackoverflow.com/questions/538041/uiimagepickercontroller-camera-preview-is-portrait-in-landscape-app context height 0 else CGContextScaleCTM context scaleRatio scaleRatio CGContextTranslateCTM context 0 height CGContextConcatCTM context transform CGContextDrawImage UIGraphicsGetCurrentContext CGRectMake 0 0 width height imgRef UIImage imageCopy UIGraphicsGetImageFromCurrentImageContext..
iOS UIImagePickerController result image orientation after upload http://stackoverflow.com/questions/5427656/ios-uiimagepickercontroller-result-image-orientation-after-upload CGImageGetBitsPerComponent self.CGImage 0 CGImageGetColorSpace self.CGImage CGImageGetBitmapInfo self.CGImage CGContextConcatCTM ctx transform switch self.imageOrientation case UIImageOrientationLeft case UIImageOrientationLeftMirrored case UIImageOrientationRight..
AVFoundation + AssetWriter: Generate Movie With Images and Audio http://stackoverflow.com/questions/5640657/avfoundation-assetwriter-generate-movie-with-images-and-audio pxdata size.width size.height 8 4 size.width rgbColorSpace kCGImageAlphaNoneSkipFirst NSParameterAssert context CGContextConcatCTM context CGAffineTransformMakeRotation 0 CGContextDrawImage context CGRectMake 0 0 CGImageGetWidth image CGImageGetHeight..
|