In Quartz 2D, the CGColorSpaceCreateLab() function takes a range parameter defined as follows:
CGFloat range[4]: An array of 4 numbers that specify the range of valid values for the a* and b* components of the color space. The a* component represents values running from green to red, and the b* component represents values running fro...
Hi, I am trying to draw a map annotation in my app - very much like MapKit's MKAnnotationView, but without the mapkit.
I have a problem with the ordering of the path for the view outline that I cant figure out.
Image of results:
http://img504.imageshack.us/img504/5458/screenshot20091010at703.png
Code:
CGFloat minx = CGRectGetMinX(cu...
I have several .png images (ETA: but the format could also be JPEG or something else) that I am going to display in UITableViewCells. Right now, in order to get the row heights, I load in the images, get their size properties, and use that to figure out how high to make the rows (calculating any necessary changes along the way, since mo...
I have drawn an enclosed shape using CGContext and filled a default color. I want to change the fill color on some event, how can I do that. There is only one enclosed shape in the context.
...
How can I write a YUV frame data into a CGContext?
...
Hi,
I am drawing a String using CGContextShowTextAtPoint. Thus I need to convert my NSString I want to draw into c Strings. Unfortunately special symbols like the euro currency symbol are not correctly shown.
CGContextSelectFont(currentContext, "TrebuchetMS", 15, kCGEncodingMacRoman);
CGContextShowTextAtPoint(currentContext, 0, 0, [my...
Im trying to draw specific colour rectangles into a CGBitmapContext and then later compare pixel values with the colour i drew (a kind of hit-testing).
On Leopard this works fine but on SnowLeopard the pixel-values i get out are different to the colour values i draw in - i guess due to colorspace confusion and ignorance on my part.
...
I'd like to create a dial with similar behavior to some of the retro phone apps. These have a circular dialer that lets you spin it around with your finger. Any ideas how that is created or some links that discuss aspects of it?
...
While running my application (which does a good bit of custom drawing) I get this error (it happens a good bit with no observable side effects, but I'd like to understand what's happening).
<Error>: kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
<Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch
...
New to Quartz and I am curious on the drawing speeds of simple shapes, gradients, and shadows; specifically comparing Quartz drawing functions to Quartz image drawing on the iPhone.
Say that I need to draw a filled, stroked, and shadowed rectangle. I'm assuming that importing a pre-baked rect as a PNG and drawing it using drawInRect: o...
I am attempting to fill some text with a gradient-fill, where by I set the text drawing mode to clipping, and then paint a gradient-fill.
The problem is, whenever I set the text drawing mode to clip, every character of the text string is placed on top of each other, rather than being painted in a sequence to form a word - it is most biza...
I have a line graph I've drawn in Quartz, and a UIView 'bubble' that I'd like to ideally pop up when the user touches the single plot line, and moves their finger along it. The bubble displays some extra graph information.
I'd like to 'attach' the UIView to the CGPath plot, but I'm having trouble conceptually figuring out the best way t...
Hey guys,
I'm developing an iPhone OpenGL application, and I need to use some textures with transparency. I have saved the images as PNGs. I already have all the code to load PNGs as OpenGL textures and render them. This is working fine for all images that don't have transparency (all alpha values are 1.0). However, now that I'm try...
I've been plugging away at this for a few hours now, and haven't found a good answer. In Leopard, I can programmatically change the screen resolution using Quartz Display Services with CGConfigureDisplayMode. Unfortunately, this has been deprecated in 10.6.
This seems like a simple task: how can I change the screen resolution with non-d...
In my iPhone application I'm generating an HTML file. I would like to convert that HTML file to a PDF file programatically. The PDF will then be attached to an email.
Does anyone know (have an example) how to convert the HTML file to a PDF?
...
I have a UIImageView showing a image that is larger than it's frame.
It's set to rescale the image to fit it's frame. But, the image is scaled with a low quality filter.
I've read here that this is caused by it using a low interpolation quality.
How can I get it's context to CGContextSetInterpolationQuality to kCGInterpolationHigh?
...
I've got a collection of roughly 10 overlapping UIImageViews. Each one is rectangular but each is rotated and scaled separately. Are there any Core Graphics tricks for drawing a path around the perimeter of ALL the images?
CGRectUnion may give me a rectangle encompassing all the views (though I vaguely remember the frame is undefined o...
I'm creating an application where I will be drawing two circles onto the screen, one large circle with a smaller circle inside. I want the user to be able to touch/drag on the screen inside or outside of the large circle and it will move the smaller circle in that direction. If the user touches outside of the large circle the smaller cir...
Hi,
I am going to develope the 2D game in Iphone using Quartz.
what is the main Difference between Quartz and QuartzCore?
I have searched a lot over the internet, but only able to find out the MAC OS with Quartz Examples.
If any body has any Link/URL for Examples of Quartz(2D) using Iphone Developement,which would be run in the Real ...
I'm using this code to resize an image on the iPhone:
CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0);
UIGraphicsBeginImageContext(screenRect.size);
[value drawInRect:screenRect blendMode:kCGBlendModePlusDarker alpha:1];
UIImage *tmpValue = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
Which is working g...