假设我有一个名为somePath的CGPathRef,我这样做:
CAShapeLayer *shapeLayer = [[CAShapeLayer alloc] init];
shapeLayer.path = somePath;
shapeLayer.geometryFlipped = YES;
但由于某种原因,我不想翻转几何 - 我想做这样的事情:
CAShapeLayer *shapeLayer = [[CAShapeLayer alloc] init];
CGAffineTransform flipTransform = ........;
shapeLayer.path = CGPathApplyAffineTransform(somePath, &flipTransform);
shapeLayer.geometryFlipped = NO;
flipTransform如何使图层显示与以前完全相同?
:)
答案 0 :(得分:0)
CGAffineTransform flipTransform = CGAffineTransformMakeScale(1, -1);