// Use this for initialization void Start() { m_graph = RetroGraphCreator.InitGraph(120, 90, eGraphType.Texture); m_image = m_graph.CreateFrameBuff(10, 10); m_graph.Clear(null, Color.red); m_graph.Clear(m_image, Color.blue); m_graph.DrawLine(m_image, new Vector2(0, 4), new Vector2(9, 4), Color.green); }
/// <summary> /// 初始化绘图底层 /// </summary> /// <param name="width"></param> /// <param name="height"></param> /// <param name="type"></param> /// <returns></returns> public static IRetroGraph InitGraph(int width, int height, eGraphType type) { IRetroGraph graph = null; if (type == eGraphType.Texture) { graph = TextureGraph.Create(width, height); } else { //TODO } return(graph); }