kishan94 kishan94 - 4 years ago 256
Swift Question

Convert CGPathRef to CGMutablePathRef

How can i convert

CGPathRef
to
CGMutablePathRef
.

I think this are Structure not class so no API available to convert.

code:-

CGAffineTransform transform = CGAffineTransformMakeScale(2.0, 2.0);
CGPathRef intermediatePath = CGPathCreateCopyByTransformingPath(pt.custompath, &transform);


How to save intermediatePath variable to
CGMutablePathRef
.

Answer Source

Use CGPathCreateMutableCopy().

CGMutablePathRef mutablePath = CGPathCreateMutableCopy(intermediatePath);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download