Drawing strategy.
Posted: Sun Dec 06, 2020 5:54 pm
Hello!
Im looking for the best approach to draw graphics.
Here is what I did: I have a signal (I made a sine wave for simplicity but it can
be anything else). I want to draw it with line segments, so what I'm using is
BEGIN LINES and then for each segment, I enter its 2 extremity points.
See picture. The problem is that it takes huge amounts of data, because I enter every point
twice. This means that for an array of 640 values, I need to draw 640 segments,
each of which need 2 points which is 4 coordinates of 2 bytes each.
5K bytes only for one curve. And if I need an oscilloscope-like display with n curves,
then I have to multiply everything by n, and I don't even know if it's possible to have
so many drawing instructions due to FT815's internal buffer limitation.
Is there a kind of graphic mode that can make things a little bit easier?
For example a kind of LineTo function, that starts from current point and goes
to the next one?
What would be the best strategy for drawing graphics?
Thanks for any hint!
R.
Im looking for the best approach to draw graphics.
Here is what I did: I have a signal (I made a sine wave for simplicity but it can
be anything else). I want to draw it with line segments, so what I'm using is
BEGIN LINES and then for each segment, I enter its 2 extremity points.
See picture. The problem is that it takes huge amounts of data, because I enter every point
twice. This means that for an array of 640 values, I need to draw 640 segments,
each of which need 2 points which is 4 coordinates of 2 bytes each.
5K bytes only for one curve. And if I need an oscilloscope-like display with n curves,
then I have to multiply everything by n, and I don't even know if it's possible to have
so many drawing instructions due to FT815's internal buffer limitation.
Is there a kind of graphic mode that can make things a little bit easier?
For example a kind of LineTo function, that starts from current point and goes
to the next one?
What would be the best strategy for drawing graphics?
Thanks for any hint!
R.