VGAclocks


Author Message
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 353
Posted: 04:49pm 16 Apr 2025      

Hello :)

I am happy for taking the next big step.

VGA_clocks_V1RC4.bas.zip

Everything is drawn with polygon, circle or arc.
Polygon is such a fantastic command and must be written by a genius.
A line drawn with a polygon looks simply the best. You can achieve any possible line width, by simply scaling the coordinates.

So VGAclocks draws objects, which can seamlessly be scaled.

Every and each element that an object consists of can be configured in terms of colour and size. You can initialize up to 30 objects.

The polygon can have up to 16 corners and is individual for every object and for every clock hand.

The minute/second drawing is now also an polygon.

This program in the main loop:
Option explicit
CLS
Option console serial
VGAclocks(1,"INIT",,,,1) 'debug is on

VGAclocks 1,"SET_TIMEZONE",,13,,1
'VGAclocks 3,"SET_TIMEZONE",,103
MODE 3 : Font 1
FRAMEBUFFER create
FRAMEBUFFER write f
CLS RGB(white)
Dim integer counter

Do
 'Memory :Pause 1000
 For counter = 1 To clk_amount
   VGAclocks counter,"",110,400,300,,Time$    ',counter',"",80,400,300,,"10:10:02"
If Inkey$<>"" Then Save image "b:pic.bmp"
 Next counter
'  Print @(50,50)Timer:Timer =0
  FRAMEBUFFER copy f,n
  FRAMEBUFFER write f
  CLS RGB(white)
' Memory
Loop


this if you press a key ;) Have fun!