¡@

Home 

2014/10/15 ¤U¤È 10:09:22

iphone Programming Glossary: frameheight

iOS Paper fold (origami / accordion) effect animation, with manual control

http://stackoverflow.com/questions/11157888/ios-paper-fold-origami-accordion-effect-animation-with-manual-control

addSublayer origamiLayer setup rotation angle double startAngle CGFloat frameWidth view.bounds.size.width CGFloat frameHeight view.bounds.size.height CGFloat foldWidth frameWidth folds 2 CALayer prevLayer origamiLayer for int b 0 b folds 2 b CGRect.. M_PI_2 else if b 2 startAngle M_PI else startAngle M_PI imageFrame CGRectMake frameWidth b 1 foldWidth 0 foldWidth frameHeight else if b 0 startAngle M_PI_2 else if b 2 startAngle M_PI else startAngle M_PI imageFrame CGRectMake b foldWidth 0 foldWidth.. 0 startAngle M_PI_2 else if b 2 startAngle M_PI else startAngle M_PI imageFrame CGRectMake b foldWidth 0 foldWidth frameHeight CATransformLayer transLayer self transformLayerFromImage viewSnapShot Frame imageFrame Duration duration AnchorPiont anchorPoint..

iOS CVImageBuffer distorted from AVCaptureSessionDataOutput with AVCaptureSessionPresetPhoto

http://stackoverflow.com/questions/6540710/ios-cvimagebuffer-distorted-from-avcapturesessiondataoutput-with-avcapturesessio

GL_TEXTURE0 glBindTexture GL_TEXTURE_2D videoFrameTexture_ int frameWidth CVPixelBufferGetWidth pixelBuffer int frameHeight CVPixelBufferGetHeight pixelBuffer size_t bytesPerRow extraBytes bytesPerRow CVPixelBufferGetBytesPerRow pixelBuffer extraBytes.. sessionPreset isEqualToString @ AVCaptureSessionPresetPhoto glTexImage2D GL_TEXTURE_2D 0 GL_RGBA frameWidth frameHeight 0 GL_BGRA GL_UNSIGNED_BYTE NULL for int h 0 h frameHeight h GLubyte row pixelBufferAddr h frameWidth 4 extraBytes glTexSubImage2D.. glTexImage2D GL_TEXTURE_2D 0 GL_RGBA frameWidth frameHeight 0 GL_BGRA GL_UNSIGNED_BYTE NULL for int h 0 h frameHeight h GLubyte row pixelBufferAddr h frameWidth 4 extraBytes glTexSubImage2D GL_TEXTURE_2D 0 0 h frameWidth 1 GL_BGRA GL_UNSIGNED_BYTE..