¡@

Home 

2014/10/15 ¤U¤È 10:07:35

iphone Programming Glossary: drawatpoint

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

the text and then draws a gradient. The gradient will only fill the text not the background. I tried using NSString's drawAtPoint method for this which does support Unicode but all the characters ran on top of one another when I switched the text mode..

UIStringDrawing methods don't seem to be thread safe in iOS 6

http://stackoverflow.com/questions/12744558/uistringdrawing-methods-dont-seem-to-be-thread-safe-in-ios-6

FontSelector 6 3 WebKit 0x37d6068a rendererForFont __GSFont 242 4 WebKit 0x37d61796 NSString WebStringDrawing __web_drawAtPoint forWidth withFont ellipsis letterSpacing includeEmoji measureOnly renderedStringOut drawUnderline 198 5 WebKit 0x37d616bc.. includeEmoji measureOnly renderedStringOut drawUnderline 198 5 WebKit 0x37d616bc NSString WebStringDrawing __web_drawAtPoint forWidth withFont ellipsis letterSpacing includeEmoji measureOnly renderedStringOut 84 6 WebKit 0x37d6165e NSString WebStringDrawing.. letterSpacing includeEmoji measureOnly renderedStringOut 84 6 WebKit 0x37d6165e NSString WebStringDrawing __web_drawAtPoint forWidth withFont ellipsis letterSpacing includeEmoji measureOnly 82 7 WebKit 0x37d61602 NSString WebStringDrawing _web_drawAtPoint..

How to Rotate a UIImage 90 degrees?

http://stackoverflow.com/questions/1315251/how-to-rotate-a-uiimage-90-degrees

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

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

imageView.image.size.height UIGraphicsBeginImageContext size CGPoint pointImg1 CGPointMake 0 0 img drawAtPoint pointImg1 CGPoint pointImg2 cropRect.origin img2 drawAtPoint pointImg2 UIImage result UIGraphicsGetImageFromCurrentImageContext.. size CGPoint pointImg1 CGPointMake 0 0 img drawAtPoint pointImg1 CGPoint pointImg2 cropRect.origin img2 drawAtPoint pointImg2 UIImage result UIGraphicsGetImageFromCurrentImageContext UIGraphicsEndImageContext return result Method 3 RoundRect..

Drawing incrementally in a UIView (iPhone)

http://stackoverflow.com/questions/1798414/drawing-incrementally-in-a-uiview-iphone

self.frame.size CGContextRef ctx UIGraphicsGetCurrentContext ctx is now the image's context cachedImage drawAtPoint CGPointZero if myPoints count 0 Drop drop myPoints objectAtIndex myPoints count 1 CGContextClipToMask ctx self.bounds maskRef.. self.bounds maskRef draw the mask CGContextSetBlendMode context kCGBlendModeColorBurn set blending mode cachedImage drawAtPoint CGPointZero draw the cached image EDIT After all I combined one of the methods mention below with redrawing only in the..

Add text to CALayer

http://stackoverflow.com/questions/2209734/add-text-to-calayer

withFont UIFont systemFontOfSize 32 lineBreakMode UILineBreakModeWordWrap alignment UITextAlignmentCenter word drawAtPoint CGPointMake 30.0f 30.0f forWidth 200.0f withFont UIFont boldSystemFontOfSize 32 lineBreakMode UILineBreakModeClip UIGraphicsPopContext..

How do I use the NSString draw functionality to create a UIImage from text

http://stackoverflow.com/questions/2765537/how-do-i-use-the-nsstring-draw-functionality-to-create-a-uiimage-from-text

ctx CGSizeMake 1.0 1.0 5.0 UIColor grayColor CGColor draw in context you can use also drawInRect withFont text drawAtPoint CGPointMake 0.0 0.0 withFont font transfer image UIImage image UIGraphicsGetImageFromCurrentImageContext UIGraphicsEndImageContext..

Inner Shadow in UILabel

http://stackoverflow.com/questions/3231690/inner-shadow-in-uilabel

setFill CGContextFillRect UIGraphicsGetCurrentContext rect UIColor whiteColor setFill custom shape goes here text_ drawAtPoint CGPointMake self.bounds.size.width 2 fontSize.width 2 0 withFont font text_ drawAtPoint CGPointMake self.bounds.size.width.. custom shape goes here text_ drawAtPoint CGPointMake self.bounds.size.width 2 fontSize.width 2 0 withFont font text_ drawAtPoint CGPointMake self.bounds.size.width 2 fontSize.width 2 1 withFont font CGImageRef cutoutRef CGImageCreateWithMask self blackSquareOfSize.. UIGraphicsGetCurrentContext CGSizeMake 0 1 1.0f UIColor colorWithWhite 0.0 alpha 0.5 CGColor cutout drawAtPoint CGPointZero create negative image UIGraphicsBeginImageContextWithOptions rect.size NO 0 UIColor blackColor setFill custom..

Create a UIImage from two other UIImages on the iPhone

http://stackoverflow.com/questions/679245/create-a-uiimage-from-two-other-uiimages-on-the-iphone

size CGSizeMake 50 50 UIGraphicsBeginImageContext size CGPoint thumbPoint CGPointMake 0 25 thumb.size.height 2 thumb drawAtPoint thumbPoint UIImage starred UIImage imageNamed @ starred.png CGPoint starredPoint CGPointMake 0 0 starred drawAtPoint starredPoint.. drawAtPoint thumbPoint UIImage starred UIImage imageNamed @ starred.png CGPoint starredPoint CGPointMake 0 0 starred drawAtPoint starredPoint UIImage result UIGraphicsGetImageFromCurrentImageContext UIGraphicsEndImageContext return result share improve..

Draw text in circle overlay

http://stackoverflow.com/questions/7825220/draw-text-in-circle-overlay