我不知道该怎么做。我有一个文本文件,坐标存储为数组中的点。每个新数组都是要绘制的新对象。它看起来像这样:
[{1413.0,1741.0},{1413.0,1757.0},{1412.0,1758.0},{1412.0,1784.0},{1413.0,1785.0},{1413.0,1788.0}] [{3136.0,1644.0},{3135.0,1645.0},{3132.0,1645.0},{3131.0,1646.0},{3130.0,1646.0},{3128.0,1648.0},{3128.0,1649.0},{3127.0,1650.0},{ 3127.0,1653.0},{3126.0,1654.0},{3126.0,1656.0},{3127.0,1657.0},{3127.0,1660.0},{3128.0,1661.0},{3128.0,1662.0},{3131.0,1665.0},{3132.0, 1665.0},{3133.0,1666.0},{3136.0,1666.0},{3137.0,1667.0},{3138.0,1667.0},{3139.0,1666.0},{3142.0,1666.0},{3143.0,1665.0},{3144.0,1665.0} ,{3147.0,1662.0},{3147.0,1661.0},{3148.0,1660.0},{3148.0,1657.0},{3149.0,1656.0},{3149.0,1654.0},{3148.0,1653.0},{3148.0,1650.0},{ 3147.0,1649.0},{3147.0,1648.0},{3145.0,1646.0},{3144.0,1646.0},{3143.0,1645.0},{3140.0,1645.0},{3139.0,1644.0}]
每个下一个数组都是新行,一个数组有很多点,但是当然每个数组都不一样,它们没有相同的长度和参数。
我已经从一个文本文件转换为一个String,在下一行加载它,但我不知道如何显示一个程序来绘制该坐标上的形状,例如:{3143.0,1645.0}。你能帮帮我吗?
编辑:我认为最好的方法是将巨大的字符串转换为
List<Points>
那会很棒。
问候,Rafał