Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
Otacom
Anmeldungsdatum: 18.06.2006 Beiträge: 45
|
Verfasst am: 05.07.2006, 22:59 Titel: CIRCLE with AKLIB |
|
|
I want to create a circle with 256 and + colors, what is the function?
XCIRCLE?  |
|
Nach oben |
|
 |
A.K.

Anmeldungsdatum: 02.05.2005 Beiträge: 467 Wohnort: HH
|
Verfasst am: 05.07.2006, 23:51 Titel: |
|
|
hi,
the AK-LIB had none XCIRCLE-Function. This was only requested by 2-3 Lib-Users and therefore i don't included it.
For Circles you must programm a own routine with XPSET or XLINE.
wfg A.K. _________________
http://forum.IconSoft.de
http://www.pnpbb.de - hol dir jetzt dein eigenes kostenloses Forum *NEU* |
|
Nach oben |
|
 |
Otacom
Anmeldungsdatum: 18.06.2006 Beiträge: 45
|
Verfasst am: 06.07.2006, 19:28 Titel: |
|
|
For example???  |
|
Nach oben |
|
 |
Michael Frey

Anmeldungsdatum: 18.12.2004 Beiträge: 2577 Wohnort: Schweiz
|
Verfasst am: 06.07.2006, 19:33 Titel: |
|
|
Is for Freebasic, but I works all so on QBasic:
Code: | PI = ATN(1)*4
Deg2Rad = ATN(1)/45 '=PI/180
screen 12
h=50 'Höhe in Pixel
b=50 'Breite in Pixel
for Beta=0 to 360
line(100,100)-(100+cos(Beta*Deg2Rad)*b,100-sin(Beta*Deg2Rad)*h)
next beta
sleep |
or
Code: | PI = ATN(1)*4
Deg2Rad = ATN(1)/45 '=PI/180
screen 12
h=50 'Höhe in Pixel
b=50 'Breite in Pixel
for Beta=0 to 360
pset(100+cos(Beta*Deg2Rad)*b,100-sin(Beta*Deg2Rad)*h)
next beta
sleep |
Of course, you must convert it in to AK-Lib compatible source, but I don't think thats a problem for you.
edit:
Oh, Sleep 500 is crazy in QBasic -> removed. _________________ http://de.wikibooks.org/wiki/FreeBasic Jede Hilfe für dieses Buch ist Willkommen!
http://de.wikibooks.org/wiki/FreeBasic:_FAQ FAQ zu Freebasic (im Aufbau, hilfe Willkommen)
Neu mit Syntax Highlight |
|
Nach oben |
|
 |
Progger_X Mr. Lagg
Anmeldungsdatum: 24.11.2004 Beiträge: 784 Wohnort: Leipzig
|
Verfasst am: 06.07.2006, 21:51 Titel: |
|
|
I think it's better to make one bitmap with this Circle you wanna draw, and then to draw this bitmap everytime, because this should be faster. |
|
Nach oben |
|
 |
jb

Anmeldungsdatum: 14.01.2005 Beiträge: 2010
|
|
Nach oben |
|
 |
|