Questions tagged [cgpath]

A graphics path is a mathematical description of a series of shapes or lines. CGPath defines an opaque type that represents an immutable graphics path.The issue related with this tag can be tagged using [tag:CGPath] in iOS

CGPath is available in apple "CoreGraphics" framework.CGPaths are how CoreGraphics describes the bezier paths it uses for drawing to the screen. They can go a long way to unlocking some of the power of CoreGraphics.

For More information:

CGPath related question in SO:

Related Tags:

446 questions
0
votes
1 answer

Spiral path animation using CGMutablePathRef

I'm trying to animate a view from the center of the screen to the upper left corner in a spiral-type motion. Here's what I'm doing: CGMutablePathRef curvedPath = CGPathCreateMutable(); CGPathMoveToPoint(curvedPath, NULL, viewOrigin.x,…
soleil
  • 12,133
  • 33
  • 112
  • 183
0
votes
1 answer

I am animating the path value of a filled but not stroked CAShapeLayer and I would like to make it animate more smoothly

Alright, I'll just say that again: I am animating the path value of a filled but not stroked CAShapeLayer and I would like to make it animate more smoothly. Here is the basic animation code: CABasicAnimation * pathAnimation = [CABasicAnimation…
0
votes
1 answer

Fill the interior of path keeping line width visible

I am trying to fill the interior of shape but no use. It only strokes path but do not fill with hello colour. I have googled but nothing works as fill not working. Guide me what I am doing wrong. CGContextRef ctx =…
fibnochi
  • 1,113
  • 1
  • 9
  • 26
0
votes
1 answer

CGPath does not recognize a click inside of it

I have set out a CGPath like this. - (void)drawRect:(CGRect)rect { UIImage *myImage = [UIImage imageNamed:@"mapBelgie.png"]; CGRect imageRect = self.bounds; [myImage drawInRect:imageRect]; CGContextRef context =…
Steaphann
  • 2,797
  • 6
  • 50
  • 109
0
votes
1 answer

Creating a Geometric Path from 2D points without a graphics context. Possible in iOS?

I am needing a way to test out some heavy mathematical functionality in my code and have come to the point where I need to verify that such code is working properly. I would like to be able to create a path based on an array of points and use this…
cspam
  • 2,911
  • 2
  • 23
  • 41
0
votes
1 answer

Play Video Inside Of CGPath or UIBezierPath

Is it possible to clip a video to a custom defined CGPath? I realize the UIBezierPath is really just a wrapper but I threw that in for familiarity purposes.
daveMac
  • 3,041
  • 3
  • 34
  • 59
0
votes
2 answers

A union B minus A intersection B

I see that there are methods that provide rectangles CGRect CGRectIntersection(CGRect r1, CGRect r2) CGRectUnion(CGRect r1, CGRect r2) But is there a method that provides the area or list of coordinates that has A union B minus A intersection B.…
i_raqz
  • 2,919
  • 10
  • 51
  • 87
0
votes
1 answer

Apple iOS BreadCrumb Example CGPath Route and Gradient

I'm using the "Apple iOS Breadcrumb" example to create a route with CGPath's, i know that each CGPath joined create my route, and, each CGPath use the CGContextSetRGBStrokeColor to fill the backgroundcolor but now, i want fill entire route with a…
0
votes
2 answers

Drawing a CGPath UIBezierCurve

Hi all I am looking into ways of how I can draw a shape like the one in the illustration above.I have been looking and reading but getting slightly confused of how curves are drawn using UIBezierPath. I found really nice code which uses…
snowflakes74
  • 1,307
  • 1
  • 20
  • 43
0
votes
1 answer

I used CGPath to make a picture with 4 CALayers, how can I zoom in and out?

I used CGPath to make a picture with 4 CALayers, how can I zoom in and out? The picture contained a four different circles, a rectangle, and a more complicated shape.However, I want to make it zoom in and out like UIRefreshControl. It's unrealistic…
anna
  • 662
  • 5
  • 28
0
votes
1 answer

DrawRect keeps drawing white background

//inside init _color = [UIColor orangeColor]; self.backgroundColor = [UIColor clearColor]; self.clearsContextBeforeDrawing = NO; //inside drawRect CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextSaveGState(ctx); …
Yogurt
  • 2,913
  • 2
  • 32
  • 63
0
votes
2 answers

How to add randon transparent dots over CGPath or NSBezierPath

Wanted to know how can I add transparent dots or lines over CGPath or NSBezierPath. Here are more details about the problem. I've a solid line say width = 30(drawn using NSBezierPath or CGPath) , now I wanted to draw transparent dots over it or…
Omkar
  • 1,108
  • 10
  • 19
0
votes
1 answer

Using CGPathContainsPoint on CAShapeLayer.path After Moving the Layer

When using CGPathContainsPoint my results are consistent with the original position of the CAShapeLayer but not its current position. Is this normal, and do I need to apply the tranformation on the CGPoint I am testing, or should I be looking for a…
Michael Mangold
  • 1,741
  • 3
  • 18
  • 32
0
votes
1 answer

Clipping parent view by subview and put content of first one in second one but scaled

the question is... I have a parent view in which i drew a planimetry composed by a lot of CGPaths. Well, in this App, i can insert a subview to parent view in which there are drawn others CGPaths (like lines which represent a chair, for example).…
kinghomer
  • 3,021
  • 2
  • 33
  • 56
0
votes
1 answer

Releasing CGMutablePathRef is problematic

I get hexTouchAreas as the return value of my method -drawHexagonTouchArea, but when i analyze my project, the line where it says CGMutablePathRef hexTouchArea = CGPathCreateMutable(); produces a warning : "Value stored to 'hexTouchArea' during its…
the_critic
  • 12,720
  • 19
  • 67
  • 115
1 2 3
29
30