I wrote some simple horizontal and vertical line subroutines for CircleOS. Perhaps they could be incorporated into a later release. The complete source code is available from my web site:
http://dalewheat.com/Str8Line.c
Create a new CircleOS application program using RIDE7, remove the generated file 'Application.c' and then add Str8Line.c. It compiles as a standard CircleOS application and can be executed from the main menu. All it does is a short demo drawing horizontal then vertical lines and then waits for you to press the button to return to the menu.
This isn't really a complete 'project' so I'm not posting it as such.
There are two subroutines:
DRAW_HLine ( u8 x0, u8 y, u8 x1, u16 color )
DRAW_VLine (u8 x, u8 y0, u8 y1, u16 color )
To draw a horizontal line with endpoints (x0,y0) and (x1,y1) call DRAW_HLine like so:
DRAW_HLine ( x0, y0, x1, RGB_BLACK );
Remember that on a horizontal line, y0=y1. 'RGB_BLACK' could be any color you want.
The same thing for DRAW_VLine, except that x0=x1.
I will eventually code up the Bresenham line routines for lines of arbitrary angle. These routines will still come in handy for the horizontal and vertical cases as they are a lot faster from an I/O standpoint.
If you have any questions, please let me know.
Enjoy!
Dale Wheat