iphone Programming Glossary: contentscalefactor
How do I adjust a Quartz 2D context to account for a Retina display? http://stackoverflow.com/questions/3896968/how-do-i-adjust-a-quartz-2d-context-to-account-for-a-retina-display question You don't need to change anything in your Quartz code to account for the Retina display. If the correct contentScaleFactor is set on your UIView or CALayer using code like the following if view respondsToSelector @selector setContentScaleFactor.. your UIView or CALayer using code like the following if view respondsToSelector @selector setContentScaleFactor view.contentScaleFactor UIScreen mainScreen scale the 2 D drawing you do within drawRect or drawInContext will be automatically rendered sharply..
openGL ES retina support http://stackoverflow.com/questions/4504614/opengl-es-retina-support class I've tried the following id initWithCoder NSCoder coder if self super initWithCoder coder CGFloat f self.contentScaleFactor if self respondsToSelector @selector contentScaleFactor self.contentScaleFactor UIScreen mainScreen scale f self.contentScaleFactor.. NSCoder coder if self super initWithCoder coder CGFloat f self.contentScaleFactor if self respondsToSelector @selector contentScaleFactor self.contentScaleFactor UIScreen mainScreen scale f self.contentScaleFactor _showsPeaks YES _channelNumbers NSArray alloc.. initWithCoder coder CGFloat f self.contentScaleFactor if self respondsToSelector @selector contentScaleFactor self.contentScaleFactor UIScreen mainScreen scale f self.contentScaleFactor _showsPeaks YES _channelNumbers NSArray alloc initWithObjects NSNumber..
how can I get the scale factor of a UIImageView who's mode is AspectFit? http://stackoverflow.com/questions/6726423/how-can-i-get-the-scale-factor-of-a-uiimageview-whos-mode-is-aspectfit UIImageView ContentScale.h #import Foundation Foundation.h @interface UIImageView UIImageView_ContentScale CGFloat contentScaleFactor @end UIImageView ContentScale.m #import UIImageView ContentScale.h @implementation UIImageView UIImageView_ContentScale.. ContentScale.m #import UIImageView ContentScale.h @implementation UIImageView UIImageView_ContentScale CGFloat contentScaleFactor CGFloat widthScale self.bounds.size.width self.image.size.width CGFloat heightScale self.bounds.size.height self.image.size.height..
iPhone take augmented reality screenshot with AVCaptureVideoPreviewLayer http://stackoverflow.com/questions/8980847/iphone-take-augmented-reality-screenshot-with-avcapturevideopreviewlayer to take the scale into consideration Set the scale parameter to your OpenGL ES view's contentScaleFactor so that you get a high resolution snapshot when its value is greater than 1.0 CGFloat scale eaglview.contentScaleFactor.. so that you get a high resolution snapshot when its value is greater than 1.0 CGFloat scale eaglview.contentScaleFactor widthInPoints width scale heightInPoints height scale UIGraphicsBeginImageContextWithOptions CGSizeMake widthInPoints heightInPoints..
|