¡@

Home 

2014/10/15 ¤U¤È 10:05:01

iphone Programming Glossary: cgcontextscalectm

How do I make UILabel display outlined text?

http://stackoverflow.com/questions/1103148/how-do-i-make-uilabel-display-outlined-text

UIGraphicsGetCurrentContext CGRect viewBounds self.bounds CGContextTranslateCTM theContext 0 viewBounds.size.height CGContextScaleCTM theContext 1 1 CGContextSelectFont theContext Helvetica viewBounds.size.height kCGEncodingMacRoman CGContextSetRGBFillColor..

iPhone - How do you color an image?

http://stackoverflow.com/questions/1223340/iphone-how-do-you-color-an-image

CGContextRef ctx UIGraphicsGetCurrentContext CGRect area CGRectMake 0 0 baseImage.size.width baseImage.size.height CGContextScaleCTM ctx 1 1 CGContextTranslateCTM ctx 0 area.size.height CGContextSaveGState ctx CGContextClipToMask ctx area baseImage.CGImage..

How do I add a gradient to the text of a UILabel, but not the background?

http://stackoverflow.com/questions/1266179/how-do-i-add-a-gradient-to-the-text-of-a-uilabel-but-not-the-background

UIGraphicsGetCurrentContext CGContextSaveGState context CGContextTranslateCTM context 0.0f self.bounds.size.height CGContextScaleCTM context 1.0f 1.0f CGContextSelectFont context Helvetica 20.0f kCGEncodingMacRoman CGContextSetTextDrawingMode context kCGTextClip..

Blur an image of specific part (rectangular, circular)?

http://stackoverflow.com/questions/14107979/blur-an-image-of-specific-part-rectangular-circular

context CGContextSaveGState context CGContextTranslateCTM context CGRectGetMinX rect CGRectGetMinY rect CGContextScaleCTM context radious radious CGFloat rectWidth CGRectGetWidth rect radious CGFloat rectHeight CGRectGetHeight rect radious CGContextMoveToPoint..

iPhone development: pointer being freed was not allocated

http://stackoverflow.com/questions/1424210/iphone-development-pointer-being-freed-was-not-allocated

source.size.height CGContextRef context UIGraphicsGetCurrentContext CGContextTranslateCTM context 0 source.size.height CGContextScaleCTM context 1.0 1.0 UIImage original self createGrayCopy source CGContextRef context2 CGBitmapContextCreate NULL source.size.width.. is in the lower left corner of the view and the y axis points up CGContextTranslateCTM context2 0 sp.image.size.height CGContextScaleCTM context2 1.0 1.0 Create masked overlay color layer CGImageRef MaskedImage CGImageCreateWithMask baseColor.CGImage mask.CGImage.. is in the lower left corner of the view and the y axis points up CGContextTranslateCTM context 0 sp.image.size.height CGContextScaleCTM context 1.0 1.0 Get the result of the blending of the masked overlay and the base image CGContextDrawImage context rect..

CGImage/UIImage lazily loading on UI thread causes stutter

http://stackoverflow.com/questions/1815476/cgimage-uiimage-lazily-loading-on-ui-thread-causes-stutter

currentHeight UIGraphicsBeginImageContext bounds.size CGContextRef context UIGraphicsGetCurrentContext CGContextScaleCTM context scaleRatioX scaleRatioY CGContextTranslateCTM context 0 currentHeight CGContextConcatCTM context transform CGContextDrawImage..

MFMailComposeViewController image orientation

http://stackoverflow.com/questions/20204495/mfmailcomposeviewcontroller-image-orientation

CGContextRef context UIGraphicsGetCurrentContext if orient UIImageOrientationRight orient UIImageOrientationLeft CGContextScaleCTM context scaleRatio scaleRatio CGContextTranslateCTM context height 0 else CGContextScaleCTM context scaleRatio scaleRatio.. UIImageOrientationLeft CGContextScaleCTM context scaleRatio scaleRatio CGContextTranslateCTM context height 0 else CGContextScaleCTM context scaleRatio scaleRatio CGContextTranslateCTM context 0 height CGContextConcatCTM context transform CGContextDrawImage..

UISearchBar clear background color or set background image [iphone sdk]

http://stackoverflow.com/questions/2139115/uisearchbar-clear-background-color-or-set-background-image-iphone-sdk

NSClassFromString @ UISegmentedControl subview.alpha 0.0 CGContextTranslateCTM contenxt 0 image.size.height CGContextScaleCTM contenxt 1.0 1.0 CGContextDrawImage contenxt CGRectMake 0 0 image.size.width image.size.height image.CGImage @end @ .h #import..

Annotate PDF within iPhone SDK

http://stackoverflow.com/questions/2313008/annotate-pdf-within-iphone-sdk

flip context so page is right way up CGContextTranslateCTM currentContext 0 paperSize.size.height CGContextScaleCTM currentContext 1.0 1.0 CGPDFPageRef page CGPDFDocumentGetPage document 1 grab page 1 of the PDF CGContextDrawPDFPage currentContext.. currentContext page draw page 1 into graphics context flip context so annotations are right way up CGContextScaleCTM currentContext 1.0 1.0 CGContextTranslateCTM currentContext 0 paperSize.size.height @ Example annotation drawInRect CGRectMake..

Reading PDF files as string through iPhone application

http://stackoverflow.com/questions/2362393/reading-pdf-files-as-string-through-iphone-application

stream CGPDFDataFormatRaw CGContextDrawPDFPage myContext page 3 CGContextTranslateCTM myContext 0 20 CGContextScaleCTM myContext 1.0 1.0 CGPDFDocumentRelease document 4 void viewDidLoad super viewDidLoad code for simple direct image from..

Get a PDF/PNG as output from a UIWebView or UIView

http://stackoverflow.com/questions/2454309/get-a-pdf-png-as-output-from-a-uiwebview-or-uiview

ctx CGPDFContextCreateWithURL CFURLRef NSURL fileURLWithPath path mediaBox NULL CGPDFContextBeginPage ctx NULL CGContextScaleCTM ctx 1 1 CGContextTranslateCTM ctx 0 mediaBox.size.height self.layer renderInContext ctx CGPDFContextEndPage ctx CFRelease..

How to tint a transparent PNG image in iPhone?

http://stackoverflow.com/questions/3514066/how-to-tint-a-transparent-png-image-in-iphone

CGContextRef context UIGraphicsGetCurrentContext CGContextTranslateCTM context 0 myIconImage.size.height CGContextScaleCTM context 1.0 1.0 CGRect rect CGRectMake 0 0 myIconImage.size.width myIconImage.size.height image drawing code here UIImage..

How to customize the background/border colors of a grouped table view cell?

http://stackoverflow.com/questions/400965/how-to-customize-the-background-border-colors-of-a-grouped-table-view-cell

rect return CGContextSaveGState context 2 CGContextTranslateCTM context CGRectGetMinX rect 3 CGRectGetMinY rect CGContextScaleCTM context ovalWidth ovalHeight 4 fw CGRectGetWidth rect ovalWidth 5 fh CGRectGetHeight rect ovalHeight 6 CGContextMoveToPoint..

UIImagePickerController camera preview is portrait in landscape app

http://stackoverflow.com/questions/538041/uiimagepickercontroller-camera-preview-is-portrait-in-landscape-app

CGContextRef context UIGraphicsGetCurrentContext if orient UIImageOrientationRight orient UIImageOrientationLeft CGContextScaleCTM context scaleRatio scaleRatio CGContextTranslateCTM context height 0 else CGContextScaleCTM context scaleRatio scaleRatio.. UIImageOrientationLeft CGContextScaleCTM context scaleRatio scaleRatio CGContextTranslateCTM context height 0 else CGContextScaleCTM context scaleRatio scaleRatio CGContextTranslateCTM context 0 height CGContextConcatCTM context transform CGContextDrawImage..

How to mask a square image into an image with round corners in the iPhone SDK?

http://stackoverflow.com/questions/996292/how-to-mask-a-square-image-into-an-image-with-round-corners-in-the-iphone-sdk

context rect return CGContextSaveGState context CGContextTranslateCTM context CGRectGetMinX rect CGRectGetMinY rect CGContextScaleCTM context ovalWidth ovalHeight fw CGRectGetWidth rect ovalWidth fh CGRectGetHeight rect ovalHeight CGContextMoveToPoint context..