FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
21
Product Page
Document Feedback Copyright © Bridgetek Limited
2.5.3 Drawing pattern
The general pattern for drawing is:
BEGIN with one of the primitive types
Input one or more vertices, which specify the placement of the primitive on
the screen
END to mark the end of the primitive
(note: In many examples the END command is not explicitly listed)
The primitive types that the graphics engine support are:
BITMAPS - rectangular pixel arrays, in various color formats
POINTS - anti-aliased points, point radius is 1-256 pixels
LINES - anti-aliased lines, with width from 0 to 4095 1/16th of pixel units.
(width is from center of the line to boundary)
LINE_STRIP - anti-aliased lines, connected head-to-tail
RECTS - round-cornered rectangles, curvature of the corners can be adjusted
using LINE_WIDTH.
EDGE_STRIP_A/B/L/R - edge strips
Examples
Draw points with varying radius from 5 pixels to 13 pixels with different colors:
dl( COLOR_RGB(128, 0, 0) );
dl( POINT_SIZE(5 * 16) );
dl( BEGIN(POINTS) );
dl( VERTEX2F(30 * 16,17 * 16) );
dl( COLOR_RGB(0, 128, 0) );
dl( POINT_SIZE(8 * 16) );
dl( VERTEX2F(90 * 16, 17 * 16) );
dl( COLOR_RGB(0, 0, 128) );
dl( POINT_SIZE(10 * 16) );
dl( VERTEX2F(30 * 16, 51 * 16) );
dl( COLOR_RGB(128, 128, 0) );
dl( POINT_SIZE(13 * 16) );
dl( VERTEX2F(90 * 16, 51 * 16) );