iphone Programming Glossary: xscale
UIImageView with big image. issue http://stackoverflow.com/questions/11190352/uiimageview-with-big-image-issue CGSize boundsSize self.bounds.size CGSize imageSize imageView.bounds.size calculate min max zoomscale CGFloat xScale boundsSize.width imageSize.width the scale needed to perfectly fit the image width wise CGFloat yScale boundsSize.height.. yScale boundsSize.height imageSize.height the scale needed to perfectly fit the image height wise CGFloat minScale MIN xScale yScale use minimum of these to allow the image to become fully visible on high resolution screens we have double the pixel.. we have double the pixel density so we will be seeing every pixel if we limit the maximum zoom scale to 0.5. CGFloat maxScale 1.0 UIScreen mainScreen scale don't let minScale exceed maxScale. If the image is smaller than the screen we don't want..
CGContext pdf page aspect fit http://stackoverflow.com/questions/3908624/cgcontext-pdf-page-aspect-fit ctx 1.0 1.0 CGRect cropBox CGPDFGetBoxRect myPageRef kCGPDFCropBox CGRect targetRect layer.bounds CGFloat xScale targetRect.size.width cropBox.size.width CGFloat yScale targetRect.size.height cropBox.size.height CGFloat scaleToApply.. cropBox.size.width CGFloat yScale targetRect.size.height cropBox.size.height CGFloat scaleToApply xScale yScale xScale yScale CGContextConcatCTM ctx CGAffineTransformMakeScale scaleToApply scaleToApply CGContextDrawPDFPage ctx.. cropBox.size.width CGFloat yScale targetRect.size.height cropBox.size.height CGFloat scaleToApply xScale yScale xScale yScale CGContextConcatCTM ctx CGAffineTransformMakeScale scaleToApply scaleToApply CGContextDrawPDFPage ctx myPageRef So..
how to fit pdf page in entire view http://stackoverflow.com/questions/4321681/how-to-fit-pdf-page-in-entire-view 41 pageSize.height CGRect cropBox CGPDFPageGetBoxRect myPageRef kCGPDFCropBox CGRect targetRect layer.bounds CGFloat xScale targetRect.size.width cropBox.size.width CGFloat yScale targetRect.size.height 41 cropBox.size.height CGFloat scaleToApply.. cropBox.size.width CGFloat yScale targetRect.size.height 41 cropBox.size.height CGFloat scaleToApply xScale yScale xScale yScale CGContextTranslateCTM ctx 0.0 41 layer.bounds.size.height CGContextScaleCTM ctx 1.0 1.0 NSLog @ the.. cropBox.size.width CGFloat yScale targetRect.size.height 41 cropBox.size.height CGFloat scaleToApply xScale yScale xScale yScale CGContextTranslateCTM ctx 0.0 41 layer.bounds.size.height CGContextScaleCTM ctx 1.0 1.0 NSLog @ the crop box values..
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 pageSize.height CGRect cropBox CGPDFPageGetBoxRect myPageRef kCGPDFCropBox CGRect targetRect layer.bounds CGFloat xScale targetRect.size.width cropBox.size.width CGFloat yScale targetRect.size.height 41 cropBox.size.height CGFloat scaleToApply.. cropBox.size.width CGFloat yScale targetRect.size.height 41 cropBox.size.height CGFloat scaleToApply xScale yScale xScale yScale CGContextTranslateCTM ctx 0.0 41 layer.bounds.size.height CGContextScaleCTM ctx 1.0 1.0 NSLog @ the.. cropBox.size.width CGFloat yScale targetRect.size.height 41 cropBox.size.height CGFloat scaleToApply xScale yScale xScale yScale CGContextTranslateCTM ctx 0.0 41 layer.bounds.size.height CGContextScaleCTM ctx 1.0 1.0 NSLog @ the crop box values..
Display PDF on iPad http://stackoverflow.com/questions/4722526/display-pdf-on-ipad cropBox CGRect targetRect layer.bounds GLogDebug @ the targetRect is @ NSStringFromCGRect targetRect CGFloat xScale targetRect.size.width cropBox.size.width CGFloat yScale targetRect.size.height 41 cropBox.size.height CGFloat scaleToApply.. cropBox.size.width CGFloat yScale targetRect.size.height 41 cropBox.size.height CGFloat scaleToApply xScale yScale xScale yScale NSLog @ the scaleToApply is f X scale is f Y scale is f scaleToApply xScale yScale CGContextTranslateCTM.. cropBox.size.width CGFloat yScale targetRect.size.height 41 cropBox.size.height CGFloat scaleToApply xScale yScale xScale yScale NSLog @ the scaleToApply is f X scale is f Y scale is f scaleToApply xScale yScale CGContextTranslateCTM ctx 0.0..
|