Hello,
I'm developing an iPhone app where I have a route that I display on a map. The route is made up of a bunch of waypoints and for each waypoint I have the (air) temperature at that spot. I would like to color the route according to the temperature values. Now I was wondering if I could somehow map my temperature scale, ranging from...
H,
I have an NSBezierPath that I created and I called -stroke on it. How do I remove/delete it from the view without deallocating the object.
Thanks
- Rebecca
...
Hello,
what's the best way to draw a (black) border around a line in quartz for iphone? I'm drawing lines on streets on map and if the line is yellow (which is a legit use case), it blends in with the street color. One thing I could do is lay my lines over a little thicker black line, but this doesn't sound very efficient.
...
Hi,
I'm using Quartz-2D for iPhone to display a route on a map. The route is colored according to temperature. Because some streets are colored yellow, I am using a slightly thicker black line under the route line to create a border effect, so that yellow parts of the route are spottable on yellow streets. But, even if the black line is...
Hi everyone. I have written a function that draws x number of squares in a random position every 2 seconds. A square cannot be drawn in the same position twice. Once the app has completed a cycle the grid will be filled in. Now, this works fine when the number of squares drawn is <=8, however when this is higher a square is randomly draw...
My iPhone app has a mainView. added as a sublayer to this MainView is CircleView. CircleView rotates as the phone turns and tilts as the phone tilts, using 3 concatenated CATransform3D transforms. DotView is added as a sublayer to CircleView. After all these transoforms, I have no easy (or apparent) way of knowing the coordinates of dotV...
I'm familiar with some of the basics of Quartz 2D drawing, like drawing basic shapes and gradients and so on, but I'm not sure how to draw a shape with a "beveled" look, like this:
Essentially we've got a shine on one corner, and maybe some shading in the opposite corner. I think -- I didn't make this image, although I'd like to be ab...
I have a function that takes some bitmap data and returns a UIImage * from it. It looks something like so:
UIImage * makeAnImage()
{
unsigned char * pixels = malloc(...);
// ...
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, pixels, pixelBufferSize, NULL);
CGImageRef imageRef = CGImageCreate(..., provid...
I am adding some functionality to an iPhone app, and could use some help in picking the fastest / most efficient / best practice approach for solving this problem:
At the upper-half of my screen, I have speech bubbles (think comic book) that are UIImageViews translating across the screen (dynamic x & y position). It is a UIImageView bec...
Hi,
I'm trying to implement a view that shows a grid of information without using a UITableView, however, since I'm displaying about 36 different statistics, with its label I will have to initialize and use 72 UILabels. Does having so many UILabels mean that my iPhone app's performance will be significantly negatively affected? Is there...
I'm trying to build a drawing app with redo and undo functionality.
My idea is to draw lines in a layer in "touchMoved", then saving the layer in "touchEnded".
I'm not shure that I am drawing to the layer correct, everything works fine though, until I clear the image I'm drawing in on and try to redraw the layers in the array.
- (void)...
Hi folks,
I am wondering which is the best way, in terms of speed and efficiency, to draw a frame around an image on iPhone, especially when I have to draw lots of these images:
1) Drawing the image and then the frame around
or
2) Drawing a rect, filling it with a color and then drawing the image within that rect leaving some offset pi...
I want to recreate the scope bar of a UISearchBar, just for use as tabs. I'd like to adopt the UISearchBar scope bar's style.
I've thought about Quartz 2D to draw these tabs in combination with UIControl for managing the different states of the tabs.
What are you thinking of?
...
Hi! How can I draw a button with quartz that has exactly the same style as a UIBarButtonItem. The button should be able to show different colors.
I downloaded the Three20 project, but this project is really complex, you'd need a lot of time to overlook the whole framework. I just want to draw a custom UIBarButtonItem.
Thanks for help.
...
Hello!
I've subclassed the UIButton class and now a custom view will be drawn using quartz 2d. It all looks fine, but how can I darken the button at clicking it.
How can I set the views for the different states if I am using quartz in the same class to draw the button?
Thanks for your help
...
Hi everyone,
Is it possible to 'easily' make on the iphone a MAC OSX hide window effect on a UIView? When I say easily, I mean using existing libraries or tools...
Thanks
...
Hi, I'm working on making an iPhone App where there are two ImageViews and when you touch the top one, wherever you tapped, the bottom one shows instead.
Basically what I want to do is cut an ellipse/roundedrect out of an image. To do this I was thinking on either clipping the image, or changing the alpha pixels in the rect to zero. I a...
Hi,
I've recently downloaded the GLPaint sample code and looked at a very interesting part in it. There is a recordedPaths NSMutableArray that has points in it that are then read and drawn by GLPaint.
It's declared here:
NSMutableArray *recordedPaths;
recordedPaths = [NSMutableArray arrayWithContentsOfFile:[[NSBundle mainBundle] p...
The following code converts a PDF page into a JPEG. It runs as expected on Snow Leopard:
...
//get the image from the bitmap context
CGImageRef image = CGBitmapContextCreateImage(outContext);
//create the output destination
CGImageDestinationRef outfile = CGImageDestinationCreateWithURL(fileUrl, kUTTypeJPEG, 1, NULL);
//add the image ...
Is it possible to adjust the alignment, from the default centered, of a stroke when using kCGPathFillStroke as the drawing mode?
For example, when drawing a closed path using:
CGContextDrawPath(context, kCGPathFillStroke);
The stroke lies 50% outside/50% inside the drawn path. The stroke color has a non-opaque alpha so the net effect...