mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 18:30:14 +00:00
3.0 - unitypackage
This commit is contained in:
32
Runtime/Coord/Polar/PolarCoordHandler.cs
Normal file
32
Runtime/Coord/Polar/PolarCoordHandler.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using XUGL;
|
||||
|
||||
namespace XCharts
|
||||
{
|
||||
[UnityEngine.Scripting.Preserve]
|
||||
internal sealed class PolarCoordHandler : MainComponentHandler<PolarCoord>
|
||||
{
|
||||
public override void Update()
|
||||
{
|
||||
PolarHelper.UpdatePolarCenter(component, chart.chartPosition, chart.chartWidth, chart.chartHeight);
|
||||
}
|
||||
|
||||
public override void DrawBase(VertexHelper vh)
|
||||
{
|
||||
DrawPolar(vh, component);
|
||||
}
|
||||
|
||||
|
||||
private void DrawPolar(VertexHelper vh, PolarCoord polar)
|
||||
{
|
||||
PolarHelper.UpdatePolarCenter(polar, chart.chartPosition, chart.chartWidth, chart.chartHeight);
|
||||
if (!ChartHelper.IsClearColor(polar.backgroundColor))
|
||||
{
|
||||
UGL.DrawCricle(vh, polar.context.center, polar.context.radius, polar.backgroundColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user