How can I render line faster than CGContextStrokePath?

后端 未结 3 359
情深已故
情深已故 2021-02-01 10:46

I\'m plotting ~768 points for a graph using CGContextStrokePath. The problem is that every second I get a new data point, and thus redraw the graph. This is currently taking 5

3条回答
  •  春和景丽
    2021-02-01 11:08

    You don't have to rasterize whole path every time you draw it - you can cache it as raster bitmap. BTW, your idea with "scrolling" is standard solution for such task...

提交回复
热议问题