In Photoshop, my designer used the "Range" setting to get the outer glow to "fill out" a little more. Here is a snapshot of the settings he used:
With the range in Photoshop set to 100%, here is the look:
That looks like my rendering on the iPhone using this code (assume the gradient fill and stroke around the circle are both working fine, we're only focusing on the glow):
CGContextAddPath(context, spectralImagePath);
CGContextSaveGState(context);
CGContextSetShado开发者_如何学CwWithColor(context, CGSizeMake(0.0, 0.0), 21.0, [[UIColor colorWithRed:65.0/255.0 green:79.0/255.0 blue:246.0/255.0 alpha:1.0] CGColor]);
CGContextSetBlendMode(context, kCGBlendModeScreen);
CGContextFillPath(context);
CGContextRestoreGState(context);
But, it needs to look like this (with range set to 50% in photoshop):
Notice how the shadow is a little more dense around the edges of the circle. Any ideas if Core Graphics contains a range-like property?
I don’t know of one. As an alternative, you might try just drawing the same shadowed path multiple times via repeated calls to CGContextFillPath
.
精彩评论