Can WPF render a line path with 300,000 points on it in a performance-sensitive environment?

后端 未结 6 1399
一个人的身影
一个人的身影 2020-12-23 23:39

A simple XY line graph: The X axis will represent the complete range of possible rating percentages, from 0% on one end to 100% on the other. Specifically, the X value will

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-24 00:18

    If you want it to be fast, the best way is to derive from Control and implement OnRender - normally this isn't necessary, but for your application it might be.

    Also, let's take a step back - the screen you're rendering to certainly isn't 300k pixels across; before you go to render, reduce the buffer by averaging n nodes into one until you've got something closer to the resolution of the actual device, then draw it on-screen.

提交回复
热议问题