iphone Programming Glossary: cgcontextsetrgbfillcolor
How is a rounded rect view with transparency done on iphone? http://stackoverflow.com/questions/1031930/how-is-a-rounded-rect-view-with-transparency-done-on-iphone iPhone SDK is to create your own UIView subclass with drawRect method CGContextRef context UIGraphicsGetCurrentContext CGContextSetRGBFillColor context 0 0 0 0.75 CGContextMoveToPoint context rect.origin.x rect.origin.y radius CGContextAddLineToPoint context rect.origin.x..
How do I make UILabel display outlined text? http://stackoverflow.com/questions/1103148/how-do-i-make-uilabel-display-outlined-text CGContextScaleCTM theContext 1 1 CGContextSelectFont theContext Helvetica viewBounds.size.height kCGEncodingMacRoman CGContextSetRGBFillColor theContext 1 1 1 1 CGContextSetRGBStrokeColor theContext 0 0 0 1 CGContextSetLineWidth theContext 1.0 ShowStringCentered..
How can I change the saturation of an UIImage? http://stackoverflow.com/questions/1144768/how-can-i-change-the-saturation-of-an-uiimage kCGBlendModeSaturation CGContextClipToMask context self.bounds image.CGImage restricts drawing to within alpha channel CGContextSetRGBFillColor context 0.0 0.0 0.0 desaturation CGContextFillRect context rect CGContextRestoreGState context restore state to reset blend..
iPhone development: pointer being freed was not allocated http://stackoverflow.com/questions/1424210/iphone-development-pointer-being-freed-was-not-allocated 6 1 256 1 256 1 256 CGImageRef mask CGImageCreateWithMaskingColors unmasked myMaskingColorsFrameColor CGContextSetRGBFillColor context 256 256 256 1 CGContextFillRect context rect CGContextDrawImage context rect mask UIImage whiteMasked UIGraphicsGetImageFromCurrentImageContext..
composite colors: CALayer and blend mode on iPhone http://stackoverflow.com/questions/1658751/composite-colors-calayer-and-blend-mode-on-iphone and alpha values so that the saturation can be animated CGContextSetBlendMode myContext kCGBlendModeSaturation CGContextSetRGBFillColor myContext 1.0 1.0 1.0 0.9 CGContextFillRect myContext UIScreen mainScreen .bounds @end And here is the main view drawrect..
Drawing incrementally in a UIView (iPhone) http://stackoverflow.com/questions/1798414/drawing-incrementally-in-a-uiview-iphone CGContextAddEllipseInRect context CGRectMake drop.point.x drop.size 2 drop.point.y drop.size 2 drop.size drop.size CGContextSetRGBFillColor context 0.5 0.0 0.0 0.8 CGContextFillPath context Which means I have to store all my Dots that's fine and re draw them all.. ctx CGRectMake drop.point.x drop.dropSize 2 drop.point.y drop.dropSize 2 drop.dropSize drop.dropSize CGContextSetRGBFillColor ctx 0.5 0.0 0.0 1.0 CGContextFillPath ctx cachedImage release cachedImage UIGraphicsGetImageFromCurrentImageContext retain.. drop.dropSize 2 drop.point.y drop.dropSize 2 drop.dropSize drop.dropSize CGContextAddPath context dotsPath CGContextSetRGBFillColor context 0.5 0.0 0.0 1.0 CGContextFillPath context Thanks everyone iphone objective c performance uiview drawing share..
How to change an UILabel/UIFont's letter spacing? http://stackoverflow.com/questions/2544905/how-to-change-an-uilabel-uifonts-letter-spacing BoldMT 60 kCGEncodingMacRoman CGContextSetCharacterSpacing context 10 CGContextSetTextDrawingMode context kCGTextFill CGContextSetRGBFillColor context 221 255.0 221 255.0 221 255.0 221 255.0 CGAffineTransform xform CGAffineTransformMake 1.0 0.0 0.0 1.0 0.0 0.0 CGContextSetTextMatrix..
Curve text on existing circle http://stackoverflow.com/questions/3841642/curve-text-on-existing-circle CGContextSetTextMatrix context CGAffineTransformIdentity CGContextSelectFont context fontName 18 kCGEncodingMacRoman CGContextSetRGBFillColor context 0 0 0 1 CGPoint centerPoint CGPointMake imageSize.size.width 2 imageSize.size.height 2 double radius frame.size.width.. context CGRectMake ringWidth ringWidth frame.size.width ringWidth 2 frame.size.height ringWidth 2 CGContextSetRGBFillColor context textColorComponents 0 textColorComponents 1 textColorComponents 2 textAlpha CGContextSaveGState context CGContextTranslateCTM..
how to fit pdf page in entire view http://stackoverflow.com/questions/4321681/how-to-fit-pdf-page-in-entire-view pageSize inSize CGSizeMake self.view.bounds.size.width self.view.bounds.size.height __TOP_BRANDING_BAR_HEIGHT CGContextSetRGBFillColor ctx 1.0 1.0 1.0 1.0 CGContextFillRect ctx CGContextGetClipBoundingBox ctx GLogDebug @ aspect fitsize of image to @ NSStringFromCGSize..
iOS SDK - Programmatically generate a PDF file http://stackoverflow.com/questions/4362734/ios-sdk-programmatically-generate-a-pdf-file CGContextSelectFont pdfContext Helvetica 16 kCGEncodingMacRoman CGContextSetTextDrawingMode pdfContext kCGTextFill CGContextSetRGBFillColor pdfContext 0 0 0 1 const char text Hello World CGContextShowTextAtPoint pdfContext 260 390 text strlen text End text We..
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 inSize CGSizeMake self.view.bounds.size.width self.view.bounds.size.height __TOP_BRANDING_BAR_HEIGHT CGContextSetRGBFillColor ctx 1.0 1.0 1.0 1.0 CGContextFillRect ctx CGContextGetClipBoundingBox ctx GLogDebug @ aspect fitsize of image to @ NSStringFromCGSize..
Recreate recipient bubble behaviour in Mail.app / Three20 http://stackoverflow.com/questions/5247072/recreate-recipient-bubble-behaviour-in-mail-app-three20 space if model kCGColorSpaceModelMonochrome monochrome color space has one grayscale value and one alpha CGContextSetRGBFillColor context colors 0 colors 0 colors 0 colors 1 else else a R G B A scheme is assumed. CGContextSetRGBFillColor context colors.. one alpha CGContextSetRGBFillColor context colors 0 colors 0 colors 0 colors 1 else else a R G B A scheme is assumed. CGContextSetRGBFillColor context colors 0 colors 1 colors 2 colors 3 else else use plain white CGContextSetRGBFillColor context 1.0f 1.0f 1.0f 1.0f.. B A scheme is assumed. CGContextSetRGBFillColor context colors 0 colors 1 colors 2 colors 3 else else use plain white CGContextSetRGBFillColor context 1.0f 1.0f 1.0f 1.0f self.text drawInRect textBounds withFont UIFont boldSystemFontOfSize UIFont systemFontSize lineBreakMode..
Beginner iphone question: drawing a rectangle. What am I doing wrong? http://stackoverflow.com/questions/970137/beginner-iphone-question-drawing-a-rectangle-what-am-i-doing-wrong all I want to do just draw a single rectangle on the screen. I'm getting an invalid context on everything but the CGContextSetRGBFillColor . Getting the context after that seems kinda wrong to me but I'm not at home looking at the examples I was using last night... CGFloat 100 mySize.width CGFloat 50 mySize.height CGFloat 50 NSLog @ 2 UIGraphicsPushContext context NSLog @ 3 CGContextSetRGBFillColor context 1.0 0.0 0.0 1.0 context UIGraphicsGetCurrentContext CGContextSetFillColorWithColor context currentColor.CGColor.. context 8.0 this is set from now on until you explicitly change it CGContextStrokePath context do actual stroking CGContextSetRGBFillColor context 0.0 1.0 0.0 0.5 green color half transparent CGContextFillRect context CGRectMake 20.0 250.0 128.0 128.0 a square..
|