Is it possible to play a path backwards in a CAKeyFrameAnimation?
I want to animate the position of a CALayer based on a CGPath, but I want to play it backwards. Is there any way to animate a path backwards, or reverse a CGPath? ...
I want to animate the position of a CALayer based on a CGPath, but I want to play it backwards. Is there any way to animate a path backwards, or reverse a CGPath? ...
Hi there, I have a CGPath in some coordinate system that I'd like to draw. Doing so involves scaling the old coordinate system onto the Context's one. For that purpose, I use CGContextConcatCTM() which does transform all the points as it should. But, as it is a scaling operation, the horizontal/vertical line widths get changed to. E.g. ...
How can i convert between NSBezierPath to CGPath. Thanks. ...
Hello, I have been reading thru the documentation however it is not immediatly clear to me how to draw a polygon using CGPath. All I need to do is to draw CGPath around something like this: __ \ \ \ \ \__\ Could anyone please provide an snippet on how to do this? Additionally I assume CGPathContainsPoint will help me determine...
Hello, I am creating a CGPath to define an area in my game like this: CGPathMoveToPoint ( myPath, NULL, center.x, center.y ); CGPathAddLineToPoint( myPath, NULL,center.x + 100, center.y); CGPathAddLineToPoint( myPath, NULL, center.x + 100, center.y + 100); CGPathAddLineToPoint( myPath, NULL, center.x, center.y + 100); CGPathCloseSubp...
this is in GameViewController.m -(void)fillMutablePath{ CGPoint movePoint = CGPointFromString([pointsToFillArray objectAtIndex:0]); CGPathMoveToPoint(fillPath, NULL, movePoint.x, movePoint.y); for (int i=0; i<[pointsToFillArray count]; i++) { CGPoint tempPoint = CGPointFromString([pointsToFillArray objectAtIndex:...
Whenever I stroke a path with rounded corners on iPhone, the rounded corners are thicker than the rest of the stroked path. See here for what I mean: Not sure why this happens, any ideas? ...
I'm looking for a way to draw a curve (perhaps a parametric function?) into a CGContext The best example which I can think of is the Adobe Ideas iPad application. As the user drags their finger, the application draws lines for every touchesMoved: using CGContextAddLineToPoint. After the user picks up their finger at touchesEnded:, the a...
I have a CGPath and I want to draw it once to a NSView. Seems relatively simple but I haven't found a way in AppKit (non iphone). ...
Just checking to see if someone has done this before. I used to have ways to modify the size of a UIPickerView. But it seems that ever since iOS4.0 it seems to be locked. If I do the usual trickery and compile targeting 3.0 it works as usual. But this is for a free app with iAd so it's going to be an iOS4 only affair. So I'm thinking o...
Hi every one ! I juste watch this effect : I would like to reproduce it. Is it simply a CGPath animation? Have you got some indications so implement this beautiful loader view ? Thanks for your tips ;) ...
I defined specified CGPathRef, and i am trying to dragging some objects on this path. I tried several tricks, but couldn't make the required dragging. ...
I've drawn two circles that overlap. I want to be able to fill and stroke them as a merged new shape. At the moment, I create the path sequence once, stroke it, then create a copy of it, fill it and add the two identical paths on top of each other, so they appear as a single shape. Is there a better approach or is this ok? Update: Her...
Hi, I am looking for some way to make an image (a ball) move along a predefined path in iPhone. My intention is to create a ball movement similar to the labyrinth movement. I understand there is a way to create paths programmatically using CGPath. But I believe it is difficult to create complex paths. Is there a be...
I'm trying to use CGPathApply to iterate over each CGPathElement in a CGPathRef object (mainly to write a custom way to persist CGPath data). The problem is, each time it get to the call to CGPathApply, my program crashes without any information at all. I suspect the problem is in the applier function, but I can't tell. Here is a samp...
I am trying to render text to a shape that isn't a rectangle. The following code works when I add a rectangular path but not when I add an elliptical path. Ultimately, I'd like to draw to any path (L shape, etc), has anyone had any luck with this? -(void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext();...