Top "Cgcontext" questions

The CGContextRef opaque type represents a Quartz 2D drawing destination.

Invalid context when creating UIImageView

I have an error when I tried to create a UIImageView. Look at this code : UIImage* backgroundPanel = [[UIImage imageNamed:@"loginPanelBackground.…

ios uiimageview uiimage cgcontext
Drawing Hollow circle in iPhone

i need to draw the following image The Gray part is what i want to draw over another image what …

iphone cgcontext geometry
Rotate image using CGContextDrawImage

How can I rotate an image drawn by CGContextDrawImage() at its center? In drawRect: CGContextSaveGState(c); rect = CGRectOffset(rect, -rect.…

ios core-graphics cgcontext cgaffinetransform cgcontextdrawimage
How to create a UIImage with a transparent background

I am dynamically creating a (drawing my own custom) UIImage for the 'UIImageView' property on a UITableViewCell. When a user …

ios uitableview uiimage cgcontext
How could I get CGContextRef from UIImage?

CGContextRef context = ??; // get from UIImage *oldImage CGContextSaveGState(context); CGRect drawRect = CGRectMake(0, 0, 320, 480); CGContextConcatCTM(context, transform); UIImage *newImage = [[UIImage alloc] init]; CGContextDrawImage(…

iphone uiimage cgcontext
How to render UIView into a CGContext

I Wanted to render a UIView into a CGContextRef -(void)methodName:(CGContextRef)ctx { UIView *someView = [[UIView alloc] init]; MagicalFunction(…

iphone ipad ios uiview cgcontext
iOS to Mac GraphicContext Explanation/Conversion

I have been programming for two years on iOS and never on mac. I am working on a little utility …

ios macos core-graphics converter cgcontext
Drawing a dashed line with CGContextSetLineDash

I'm trying to draw a dashed line with CGContextSetLineDash. Here's my code: float dashPhase = 0.0; float dashLengths[] = {30, 30}; CGContextSetLineDash(context, dashPhase, dashLengths, 20.0); …

iphone objective-c ios cgcontext
Changing the background colour of a CGContext

i'm really new to dealing with CGContexts and i'm just trying to get my head around things by following a …

iphone objective-c background paint cgcontext
Convert Image to B&W problem CGContext - iPhone Dev

I am using a method to convert images taken with the camera into black and white. The problem I'm running …

iphone objective-c camera ios cgcontext