View previous topic :: View next topic |
Author |
Message |
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Thu Jan 17, 2008 7:25 pm Post subject: Display 3000 2.1" |
|
|
hello,
I discover the Display3000, it nice but I have a problem, the line is difficult to draw, I have a solution but it is a little bit heavy: draw dot by dot.
I explain to draw a line the X1, Y1 coordinate must be in the upper left corner, and the X2, Y2 in the lower right corner.
My problem is to make an analogic clock so I need to have the center of circle X1, Y1 and I dont find the method to draw the line for 7 hours for example
Bascom 9.0, atmega128
Many thanks
JP |
|
Back to top |
|
|
AdrianJ
Joined: 16 Jan 2006 Posts: 2483 Location: Queensland
|
Posted: Thu Jan 17, 2008 10:05 pm Post subject: |
|
|
In fact all lines are drawn dot-by-dot, you just need a good way of figuring out where the dots go. Lookup "Bresenham algorithm" on the net. This is the standard line drawing technique. _________________ Adrian Jansen
Computer language is a framework for creativity |
|
Back to top |
|
|
Arera
Joined: 23 Sep 2007 Posts: 386 Location: Wuppertal, Germany
|
Posted: Fri Feb 29, 2008 12:21 pm Post subject: |
|
|
Hi JP,
I using a D072 2.1" display since monday. Itīs great!
Why donīt you use the commands from display3000?
Include a few .bas files from display3000 into your prog, and draw a line:
call ldc_draw (x1,y1, x2,y2, [thickness], [color])
Read the display3000 software-manual! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|