暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. using XUGL;
  4. namespace XCharts.Runtime
  5. {
  6. [ExecuteInEditMode]
  7. public class SVGImage : MaskableGraphic
  8. {
  9. [SerializeField] private bool m_MirrorY;
  10. [SerializeField] private string m_SVGPath;
  11. private SVGPath m_Path;
  12. public string svgPath { set { m_SVGPath = value; } get { return m_SVGPath; } }
  13. public bool mirrorY { set { m_MirrorY = value; } get { return m_MirrorY; } }
  14. protected override void Awake()
  15. {
  16. base.Awake();
  17. m_Path = SVGPath.Parse(m_SVGPath);
  18. m_Path.mirrorY = m_MirrorY;
  19. }
  20. protected override void OnPopulateMesh(VertexHelper vh)
  21. {
  22. vh.Clear();
  23. if (m_Path != null)
  24. m_Path.Draw(vh);
  25. }
  26. }
  27. }