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