核心代码:
/// <summary>
/// 创建立体感的饼状图
/// </summary>
/// <param name="angles">扇区角度List集合</param>
/// <param name="lightColors">扇区上面亮度List集合</param>
/// <param name="darkColors">扇区下面暗度List集合</param>
/// <returns></returns>
public static Texture2D PieChart3d(ref Texture2D lp, List<float> angles,List<System.Drawing.Color> lightColors,List<System.Drawing.Color> darkColors,System.Drawing.Color light,System.Drawing.Color dark)
{
if (lp == null)
{
lp = new Texture2D(512, 512);
}
Bitmap bitmap = new Bitmap(512, 512);
System.Drawing.Graphics ccd = System.Drawing.Graphics.FromImage(bitmap);
ccd.SmoothingMode = SmoothingMode.AntiAlias;
ccd.Clear(System.Drawing.Color.Transparent);
IntPtr ccdhdc = ccd.GetHdc(); //获取设备
int vOffset = 30;
int left