Hi,
I was hoping to be able to draw filled polygons using an FT813 so that I can replace some large icon bitmaps with a small list of vertices, saving me a whole load of flash memory space.
I looked at application note AN334
https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_334-FT801_Polygon_Application.pdf and I saw filled polygons.
On closer inspection, it seems that the polygon is split up into smaller sections so that they have vertical and horizontal edges for the scissor command to trim to.
This makes diagonals impractical however, as they would have to be cut up into squares whose sides match the width of the diagonal section. A long thin diagonal would require many cuts.
Concave polygons also need to be chopped up into straight edged convex pieces, and would need some thinking about..
Firstly, is filled concave polygons something that is likely to be supported in the future? Are the existing range of chips field upgradable, or would this feature require rolling out a new product?
Secondly, what would be the best way of getting around this?
1) I could draw over the unwanted part of the polygon with another polygon set to the background colour, but this wouldn't preserve non uniform backgrounds.
2) Perhaps I could draw to the stencil channel instead, but the stencil is 1bit and wouldn't have nice smooth edges when I fill, so far as I can tell from the docs, haven't tried it yet. I suppose I could then draw the outline with with a LINE_STIP to get the anti-aliased edges.
3) Or I could break up the icons into smaller components and composite them, making use of completely blank rectangular bitmaps that can be generated with the MEMFILL command and using the bitmap transform to rotate them to get the diagonals. Rotating bitmaps is a bit iffy, though. I did try animating a rotating circle and it did not look good. Its size and position kept shifting about.
4) Or I could give up and just use bitmaps, take the hit on space, hope deflate does a good job.
I think option (1) would suit my immediate needs, but I'd like to know if other folk have encountered this limitation, how they've gotten around it, and why that method, so I can make an informed decision before making a commitment.
Cheers,
AT38