1
我试图设置一个条纹填充用CorePlot创建的图形。我在网上找到一个例子:CorePlot stipes填充
CPColor *firstStripesColor = [CPColor colorWithComponentRed:1.0 green:1.0 blue:1.0 alpha:0.0];
CPColor *secondStripesColor = [CPColor colorWithComponentRed:1.0 green:1.0 blue:1.0 alpha:0.6];
CPFill *areaStripesFill = [CPFill fillWithFirstColor:firstStripesColor secondColor:secondStripesColor stripeWidth:2];
scatterPlot.areaFill = areaStripesFill;
我觉得这个代码是使用旧版本的CorePlot库(我使用的是1.0)。我只是用CPTColor和CPFill用CPTFill更改CPColor,但没有名为fillWithFirstColor:secondColor:的方法。 我想创建一个像iPhone股票应用程序中的填充。
有什么想法?
非常感谢
克劳斯
是否有可能使图案重复?例如。每隔一个单位有一个梯度,另一个单位是平面? – Setomidor 2012-08-23 06:31:21
在轴上设置'alternatingBandFills'。请参阅示例代码的Plot Gallery示例应用程序。 – 2012-08-23 22:28:53
谢谢!试过,但它没有完全按照我的意图去做。我最终使用了带有透明元素的平铺PNG(取决于您在另一个线程中的建议):) – Setomidor 2012-08-24 07:46:58