|
Życie Wieczne
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 13:26, 10 Sty 2021 Temat postu: Funkcje graficzne QuickBasic |
|
|
[b]Funkcje graficzne QuickBasic[/b]
Oprócz klasycznych funkcji rysowania, warto zwrócić uwagę na funkcje GET i PUT która umożliwia kopiowanie danego fragmentu ekranu w inne miejsce, zapamiętując w tablicy ten obszar
DIM znak(0 TO 36) AS INTEGER
SCREEN 13
LOCATE 1, 1: PRINT "A"
GET (0, 0)-(7, 7), znak
FOR i = 1 TO 10
FOR j = 1 TO 10
x = RND(1) * 200 + 1
y = RND(1) * 150 + 1
PUT (x, y), znak
NEXT j
NEXT i
|
|
Powrót do góry |
|
|
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 13:45, 10 Sty 2021 Temat postu: |
|
|
Poniższy programik umożliwia narysowanie niewielkiego znaku graficznego, który zostanie zapamietany w tablicy i skopiowany na ekranie.
Ponadto ukaże się liczbowa zawartośc tablicy.
Tablica została zadeklarowana jako LONG (dla wygody) czyli zapisuje liczby na 32 bitach
DIM znak(0 TO 16) AS LONG
SCREEN 13
REM LOCATE 1, 1: PRINT "A"
FOR y = 0 TO 7
FOR x = 0 TO 7
READ a
COLOR a * 14: PSET (x, y)
NEXT x
NEXT y
DATA 0,0,1,1,1,0,0,0
DATA 0,0,1,1,1,0,0,0
DATA 0,0,0,1,0,0,0,0
DATA 0,1,1,1,1,1,0,0
DATA 1,0,0,1,0,0,1,0
DATA 0,0,1,1,1,0,0,0
DATA 0,0,1,0,1,0,0,0
DATA 0,1,1,0,1,1,0,0
GET (0, 0)-(7, 7), znak
FOR i = 1 TO 10
FOR j = 1 TO 10
x = RND(1) * 200 + 1
y = RND(1) * 150 + 1
PUT (x, y), znak
NEXT j
NEXT i
COLOR 15
PRINT znak(0); znak(1)
PRINT znak(2); znak(3)
PRINT znak(4); znak(5)
PRINT znak(6); znak(7)
PRINT znak(; znak(9)
PRINT znak(10); znak(11)
PRINT znak(12); znak(13)
PRINT znak(14); znak(15)
PRINT znak(16);
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 13:46, 10 Sty 2021 Temat postu: |
|
|
Poprawka,bez emotikona:
Poniższy programik umożliwia narysowanie niewielkiego znaku graficznego, który zostanie zapamiętany w tablicy i skopiowany na ekranie.
Ponadto ukaże się liczbowa zawartość tablicy.
Tablica została zadeklarowana jako LONG (dla wygody) czyli zapisuje liczby na 32 bitach
DIM znak(0 TO 16) AS LONG
SCREEN 13
REM LOCATE 1, 1: PRINT "A"
FOR y = 0 TO 7
FOR x = 0 TO 7
READ a
COLOR a * 14: PSET (x, y)
NEXT x
NEXT y
DATA 0,0,1,1,1,0,0,0
DATA 0,0,1,1,1,0,0,0
DATA 0,0,0,1,0,0,0,0
DATA 0,1,1,1,1,1,0,0
DATA 1,0,0,1,0,0,1,0
DATA 0,0,1,1,1,0,0,0
DATA 0,0,1,0,1,0,0,0
DATA 0,1,1,0,1,1,0,0
GET (0, 0)-(7, 7), znak
FOR i = 1 TO 10
FOR j = 1 TO 10
x = RND(1) * 200 + 1
y = RND(1) * 150 + 1
PUT (x, y), znak
NEXT j
NEXT i
COLOR 15
PRINT znak(0); znak(1)
PRINT znak(2); znak(3)
PRINT znak(4); znak(5)
PRINT znak(6); znak(7)
PRINT znak(8); znak(9)
PRINT znak(10); znak(11)
PRINT znak(12); znak(13)
PRINT znak(14); znak(15)
PRINT znak(16);
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 14:09, 10 Sty 2021 Temat postu: |
|
|
Teraz inne podejście - budujemy tablicę liczbową, która wyświetli znaczek na ekranie:
Korzystam z danych wyświetlonych poprzednio
--------------------------------------------------------------------------------------------------------
DIM znak(0 TO 16) AS LONG
SCREEN 13
znak(0) = 524352: znak(1) = 235798528: znak(2) = 14: znak(3) = 235798528
znak(4) = 14: znak(5) = 234881024: znak(6) = 0: znak(7) = 235802112
znak( = 3598: znak(9) = 234881038: znak(10) = 917504: znak(11) = 235798528
znak(12) = 14: znak(13) = 917504: znak(14) = 14: znak(15) = 921088:
znak(16) = 3598
FOR i = 1 TO 10
x = RND(1) * 200 + 1
y = RND(1) * 150 + 1
PUT (x, y), znak
NEXT i
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 14:09, 10 Sty 2021 Temat postu: |
|
|
poprawka, bez emotikona:
DIM znak(0 TO 16) AS LONG
SCREEN 13
znak(0) = 524352: znak(1) = 235798528: znak(2) = 14: znak(3) = 235798528
znak(4) = 14: znak(5) = 234881024: znak(6) = 0: znak(7) = 235802112
znak(8) = 3598: znak(9) = 234881038: znak(10) = 917504: znak(11) = 235798528
znak(12) = 14: znak(13) = 917504: znak(14) = 14: znak(15) = 921088:
znak(16) = 3598
FOR i = 1 TO 10
x = RND(1) * 200 + 1
y = RND(1) * 150 + 1
PUT (x, y), znak
NEXT i
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 16:10, 10 Sty 2021 Temat postu: |
|
|
W QuickBasic-u można zapisywać liczby w postaci szestnastkowej. W ten sposób mamy względną kontrolę nad wyglądem ludzika.
Pierwszy element tablicy znak(0) zawiera formatowanie tablicy. Powtarzajaca się literka E to żółty kolor poszczególnych punktów ludzika.
DIM ZNAK(0 TO 16) AS LONG
SCREEN 13
ZNAK(0) = &H80040
ZNAK(1) = &HE0E0000: ZNAK(2) = &HFF00000E
ZNAK(3) = &HE0E0000: ZNAK(4) = &HFF00000E
ZNAK(5) = &HE000000: ZNAK(6) = &H0
ZNAK(7) = &HE0E0E00: ZNAK(8) = &HE0E
ZNAK(9) = &HE00000E: ZNAK(10) = &HE0000
ZNAK(11) = &HE0E0000: ZNAK(12) = &HE
ZNAK(13) = &HE0000: ZNAK(14) = &HE
ZNAK(15) = &HE0E00: ZNAK(16) = &HE0E
FOR i = 1 TO 10
FOR j = 1 TO 10
x = RND(1) * 200 + 1
y = RND(1) * 150 + 1
PUT (x, y), ZNAK
NEXT j
NEXT i
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 16:20, 10 Sty 2021 Temat postu: |
|
|
Literkę E (a ściślej 0E, bo quickbasic ucina to zero) można teraz łatwiej zamienić na dowolną liczbę liczbę szesnastkową 00-FF, aby zmienić kolor poszczególnych punktów ludzika, czyli różne kolory ubrania:
DIM ZNAK(0 TO 16) AS LONG
SCREEN 13
ZNAK(0) = &H80040
ZNAK(1) = &H7070000: ZNAK(2) = &H7
ZNAK(3) = &HF0F0000: ZNAK(4) = &HF
ZNAK(5) = &HF000000: ZNAK(6) = &H0
ZNAK(7) = &HC0C0C00: ZNAK(8) = &HC0C
ZNAK(9) = &HC00000F: ZNAK(10) = &HF0000
ZNAK(11) = &HB0B0000: ZNAK(12) = &HB
ZNAK(13) = &HB0000: ZNAK(14) = &HB
ZNAK(15) = &HE0E00: ZNAK(16) = &HE0E
FOR i = 1 TO 10
FOR j = 1 TO 10
x = RND(1) * 200 + 1
y = RND(1) * 150 + 1
PUT (x, y), ZNAK
NEXT j
NEXT i
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 18:06, 10 Sty 2021 Temat postu: |
|
|
W razie gdyby ten zapis był za mało czytelny, można rozpisać te hexe w komentarzach REM gdzie 0 nie będzie ucinane.
--------------------------------------------------
Teraz przykład ludzika 8x16 pixeli:
DIM ZNAK(0 TO 32) AS LONG
SCREEN 13
ZNAK(0) = &H100040
ZNAK(1) = &H8080000: ZNAK(2) = &H8
ZNAK(3) = &HF0F0000: ZNAK(4) = &HF
ZNAK(5) = &HF0F0000: ZNAK(6) = &HF
ZNAK(7) = &HF000000: ZNAK(8) = &H0
ZNAK(9) = &HC0C0C00: ZNAK(10) = &HC0C
ZNAK(11) = &HC0C0C0C: ZNAK(12) = &HC0C0C
ZNAK(13) = &HC0C0C0C: ZNAK(14) = &HC0C0C
ZNAK(15) = &HC0C000C: ZNAK(16) = &HC000C
ZNAK(17) = &H808000F: ZNAK(18) = &HF0008
ZNAK(19) = &HB0B0000: ZNAK(20) = &HB
ZNAK(21) = &HB0000: ZNAK(22) = &HB
ZNAK(23) = &HB0000: ZNAK(24) = &HB
ZNAK(25) = &HB0000: ZNAK(26) = &HB
ZNAK(27) = &HB0000: ZNAK(28) = &HB
ZNAK(29) = &HB0000: ZNAK(30) = &HB
ZNAK(31) = &H70700: ZNAK(32) = &H707
FOR i = 1 TO 10
FOR j = 1 TO 10
x = RND(1) * 200 + 1
y = RND(1) * 150 + 1
PUT (x, y), ZNAK
NEXT j
NEXT i
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Wto 22:35, 12 Sty 2021 Temat postu: |
|
|
Programik "cegła" wstawia na ekran element czerwonej cegły, a następnie mnoży ten element na ekranie.
Za każdym razem podwojony element wpisywany jest do podwojonej wielkości tablicy, dzięki czemu szybko uzyskujemy tablice 2,4,8,16 elementowe. Im większe zastosujemy, tym szybciej grafika pojawi się na ekranie.
SCREEN 13
DEF SEG = 0
DIM cegla(0 TO 16) AS LONG
DIM dwiecegly(0 TO 32) AS LONG
DIM czterycegly(0 TO 64) AS LONG
DIM osiemcegiel(0 TO 128) AS LONG
DIM szesnasciecegiel(0 TO 256) AS LONG
cegla(0) = &H80040
FOR i = 1 TO 8: READ a1$, a2$
cegla(i * 2) = VAL("&H" + a1$)
cegla(i * 2 - 1) = VAL("&H" + a2$)
NEXT i
DATA "00000000","00000000"
DATA "0C0C0C0C","000C0C0C"
DATA "0C0C0C0C","000C0C0C"
DATA "0C0C0C0C","000C0C0C"
DATA "00000000","00000000"
DATA "000C0C0C","0C0C0C0C"
DATA "000C0C0C","0C0C0C0C"
DATA "000C0C0C","0C0C0C0C"
PUT (0, 0), cegla, PSET
PUT (8, 0), cegla, PSET
GET (0, 0)-(15, 7), dwiecegly
PUT (16, 0), dwiecegly, PSET
GET (0, 0)-(31, 7), czterycegly
PUT (32, 0), czterycegly, PSET
GET (0, 0)-(63, 7), osiemcegiel
PUT (64, 0), osiemcegiel, PSET
GET (0, 0)-(127, 7), szesnasciecegiel
PUT (0, 150), szesnasciecegiel, PSET
t0 = PEEK(1132)
FOR i = 1 TO 10
x = RND(1) * 150
y = RND(1) * 150
PUT (x, y), szesnasciecegiel, PSET
NEXT i
t1 = PEEK(1132)
PRINT t0; t1
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 18:49, 24 Sty 2021 Temat postu: |
|
|
Kilka tablic rysunkowych do pomocy
SCREEN 13
DIM a$(0 TO 14)
a$(0) = "0000020202020000"
a$(1) = "0002020202020200"
a$(2) = "0002020202020200"
a$(3) = "0002020202020200"
a$(4) = "0000020202020000"
a$(5) = "0000000606000000"
a$(6) = "0000000606000000"
a$(7) = "0000000606000000"
FOR y = 0 TO 7
FOR x = 0 TO 7
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 10, y + 10), col
NEXT x
NEXT y
REM 10x10
a$(0) = "00000002020202000000"
a$(1) = "00000202020202020000"
a$(2) = "00020202020202020200"
a$(3) = "00020202020202020200"
a$(4) = "00000202020202020000"
a$(5) = "00000002020202000000"
a$(6) = "00000000060600000000"
a$(7) = "00000000060600000000"
a$(8) = "00000000060600000000"
a$(9) = "00000006060606000000"
FOR y = 0 TO 9
FOR x = 0 TO 9
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 50, y + 10), col
NEXT x
NEXT y
REM 12x12
a$(0) = "000000020202020200000000"
a$(1) = "000002020202020202000000"
a$(2) = "000202020202020202020000"
a$(3) = "000202020202020202020000"
a$(4) = "000202020202020202020000"
a$(5) = "000002020202020202000000"
a$(6) = "000000020202020200000000"
a$(7) = "000000000606060000000000"
a$(8) = "000000000606060000000000"
a$(9) = "000000000606060000000000"
a$(10) = "000000000606060000000000"
a$(11) = "000000060606060600000000"
FOR y = 0 TO 11
FOR x = 0 TO 11
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 100, y + 10), col
NEXT x
NEXT y
REM 14x14
a$(0) = "0F0F010102020202020101010E0E"
a$(1) = "010101020202020202020101010E"
a$(2) = "0101020205020202020202010101"
a$(3) = "0101020202020202050202010101"
a$(4) = "0101020202020202020202010101"
a$(5) = "0101020202050202020202010101"
a$(6) = "0808080202020202020208080808"
a$(7) = "0808080802020202020808080808"
a$(8) = "0707070707060606070707070707"
a$(9) = "0707070707060606070707070707"
a$(10) = "0705070707060606070507070507"
a$(11) = "0702070707060606070207070207"
a$(12) = "0202020202060606020202020202"
a$(13) = "0202020206060606060202020202"
FOR y = 0 TO 13
FOR x = 0 TO 13
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 150, y + 10), col
NEXT x
NEXT y
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 19:22, 24 Sty 2021 Temat postu: |
|
|
SCREEN 13
DIM a$(0 TO 20)
REM 14x14
a$(0) = "0F0F010102020202020101010E0E"
a$(1) = "010101020202020202020101010E"
a$(2) = "0101020205020202020202010101"
a$(3) = "0101020202020202050202010101"
a$(4) = "0101020202020202020202010101"
a$(5) = "0101020202050202020202010101"
a$(6) = "0808080202020202020208080808"
a$(7) = "0808080802020202020808080808"
a$(8) = "0707070707060606070707070707"
a$(9) = "0707070707060606070707070707"
a$(10) = "0705070707060606070507070507"
a$(11) = "0702070707060606070207070207"
a$(12) = "0202020202060606020202020202"
a$(13) = "0202020206060606060202020202"
FOR y = 0 TO 13
FOR x = 0 TO 13
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 150, y + 10), col
NEXT x
NEXT y
REM 16x16
a$(0) = "0F0F0F01010202020202010101010E0E"
a$(1) = "0F0F010102020202020202010011010E"
a$(2) = "01010102020502020202020201010101"
a$(3) = "01010202020202020205020202010101"
a$(4) = "01010202020202020202020202010101"
a$(5) = "01010202020202020202020202010101"
a$(6) = "01010102020205020202020201010101"
a$(7) = "08080808020202020202020808080808"
a$(8) = "08080808080202020202080808080808"
a$(9) = "08080808080806060608080808080808"
a$(10) = "07070707070706060607070707070707"
a$(11) = "07070707070706060607070707070707"
a$(12) = "07070507070706060607050707050707"
a$(13) = "07070207070706060607020707020707"
a$(14) = "02020202020206060602020202020202"
a$(15) = "02020202020606060606020202020202"
FOR y = 0 TO 15
FOR x = 0 TO 15
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 200, y + 10), col
NEXT x
NEXT y
REM 18x18
a$(0) = "0F0F0F010101020202020202010101010E0E"
a$(1) = "0F0F0101010202020202020202010101010E"
a$(2) = "010101010202020502020202020201010101"
a$(3) = "010101020202020202020202020202010101"
a$(4) = "010101020202020202020502020202010101"
a$(5) = "010101020202020202020202020202010101"
a$(6) = "010101020202020202020202020202010101"
a$(7) = "010101010202020502020202020201010101"
a$(8) = "080808080802020202020202020808080808"
a$(9) = "080808080808020202020202080808080808"
a$(10) = "080808080808080606060608080808080808"
a$(11) = "070707070707070606060607070707070707"
a$(12) = "070707070707070606060607070707070707"
a$(13) = "070707070707070606060607070707070707"
a$(14) = "070707050707070606060607050707070507"
a$(15) = "070707020707070606060607020707070207"
a$(16) = "020202020202020606060602020202020202"
a$(17) = "020202020202060606060606020202020202"
FOR y = 0 TO 17
FOR x = 0 TO 17
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 250, y + 10), col
NEXT x
NEXT y
REM 20x20
a$(0) = "0F0F0F0F01010102020202020201010101010E0E"
a$(1) = "0F0F0F010101020202020202020201010101010E"
a$(2) = "0F01010101020202020202020202020101010101"
a$(3) = "0101010102020202050202020202020201010101"
a$(4) = "0101010102020202020202020202020201010101"
a$(5) = "0101010102020202020202050202020201010101"
a$(6) = "0101010102020202020202020202020201010101"
a$(7) = "0101010102020202020202020202020201010101"
a$(8) = "0101010101020202050202020202020101010101"
a$(9) = "0808080808080202020202020202080808080808"
a$(10) = "0808080808080802020202020208080808080808"
a$(11) = "0808080808080808060606060808080808080808"
a$(12) = "0808080808080808060606060808080808080808"
a$(13) = "0707070707070707060606060707070707070707"
a$(14) = "0707070707070707060606060707070707070707"
a$(15) = "0707070705070707060606060705070707050707"
a$(16) = "0707070702070707060606060702070707020707"
a$(17) = "0202020202020202060606060202020202020202"
a$(18) = "0202020202020206060606060602020202020202"
a$(19) = "0202020202020606060606060606020202020202"
FOR y = 0 TO 19
FOR x = 0 TO 19
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 50, y + 50), col
NEXT x
NEXT y
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 20:21, 24 Sty 2021 Temat postu: |
|
|
SCREEN 13
DIM a$(0 TO 24)
REM 16x16
a$(0) = "0F0F0F01010202020202010101010E0E"
a$(1) = "0F0F010102020202020202010011010E"
a$(2) = "01010102020502020202020201010101"
a$(3) = "01010202020202020205020202010101"
a$(4) = "01010202020202020202020202010101"
a$(5) = "01010202020202020202020202010101"
a$(6) = "01010102020205020202020201010101"
a$(7) = "08080808020202020202020808080808"
a$(8) = "08080808080202020202080808080808"
a$(9) = "08080808080806060608080808080808"
a$(10) = "07070707070706060607070707070707"
a$(11) = "07070707070706060607070707070707"
a$(12) = "07070507070706060607050707050707"
a$(13) = "07070207070706060607020707020707"
a$(14) = "02020202020206060602020202020202"
a$(15) = "02020202020606060606020202020202"
FOR y = 0 TO 15
FOR x = 0 TO 15
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 200, y + 10), col
NEXT x
NEXT y
REM 18x18
a$(0) = "0F0F0F010101020202020202010101010E0E"
a$(1) = "0F0F0101010202020202020202010101010E"
a$(2) = "010101010202020502020202020201010101"
a$(3) = "010101020202020202020202020202010101"
a$(4) = "010101020202020202020502020202010101"
a$(5) = "010101020202020202020202020202010101"
a$(6) = "010101020202020202020202020202010101"
a$(7) = "010101010202020502020202020201010101"
a$(8) = "080808080802020202020202020808080808"
a$(9) = "080808080808020202020202080808080808"
a$(10) = "080808080808080606060608080808080808"
a$(11) = "070707070707070606060607070707070707"
a$(12) = "070707070707070606060607070707070707"
a$(13) = "070707070707070606060607070707070707"
a$(14) = "070707050707070606060607050707070507"
a$(15) = "070707020707070606060607020707070207"
a$(16) = "020202020202020606060602020202020202"
a$(17) = "020202020202060606060606020202020202"
FOR y = 0 TO 17
FOR x = 0 TO 17
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 250, y + 10), col
NEXT x
NEXT y
REM 20x20
a$(0) = "0F0F0F0F01010102020202020201010101010E0E"
a$(1) = "0F0F0F010101020202020202020201010101010E"
a$(2) = "0F01010101020202020202020202020101010101"
a$(3) = "0101010102020202050202020202020201010101"
a$(4) = "0101010102020202020202020202020201010101"
a$(5) = "0101010102020202020202050202020201010101"
a$(6) = "0101010102020202020202020202020201010101"
a$(7) = "0101010102020202020202020202020201010101"
a$(8) = "0101010101020202050202020202020101010101"
a$(9) = "0808080808080202020202020202080808080808"
a$(10) = "0808080808080802020202020208080808080808"
a$(11) = "0808080808080808060606060808080808080808"
a$(12) = "0808080808080808060606060808080808080808"
a$(13) = "0707070707070707060606060707070707070707"
a$(14) = "0707070707070707060606060707070707070707"
a$(15) = "0707070705070707060606060705070707050707"
a$(16) = "0707070702070707060606060702070707020707"
a$(17) = "0202020202020202060606060202020202020202"
a$(18) = "0202020202020206060606060602020202020202"
a$(19) = "0202020202020606060606060606020202020202"
FOR y = 0 TO 19
FOR x = 0 TO 19
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 50, y + 50), col
NEXT x
NEXT y
REM 22x22
a$(0) = "0F0F0F0F0F0101010202020202020201010101010E0E"
a$(1) = "0F0F0F0F01010102020202020202020201010101010E"
a$(2) = "0F0F0101010102020202020202020202020101010101"
a$(3) = "01010101010202020205020202020202020201010101"
a$(4) = "01010101010202020202020202020202020201010101"
a$(5) = "01010101010202020202020202050202020201010101"
a$(6) = "01010101010202020202020202020202020201010101"
a$(7) = "01010101010202020202020202020202020201010101"
a$(8) = "01010101010202020202020202020202020201010101"
a$(9) = "01010101010102020205020202020202020101010101"
a$(10) = "08080808080808020202020202020202080808080808"
a$(11) = "08080808080808080202020202020208080808080808"
a$(12) = "08080808080808080806060606060808080808080808"
a$(13) = "08080808080808080806060606060808080808080808"
a$(14) = "07070707070707070706060606060707070707070707"
a$(15) = "07070707070707070706060606060707070707070707"
a$(16) = "07070707070707070706060606060707070707070707"
a$(17) = "07070707070507070706060606060705070707050707"
a$(18) = "07070707070207070706060606060702070707020707"
a$(19) = "02020202020202020206060606060202020202020202"
a$(20) = "02020202020202020606060606060602020202020202"
a$(21) = "02020202020202060606060606060606020202020202"
FOR y = 0 TO 21
FOR x = 0 TO 21
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 100, y + 50), col
NEXT x
NEXT y
REM 24x24
a$(0) = "0F0F0F0F0F0F0101010202020202020201010101010E0E0E"
a$(1) = "0F0F0F0F0F01010102020202020202020201010101010E0E"
a$(2) = "0F0F0F010101010202020202020202020202010101010101"
a$(3) = "010101010101020202020206020202020202020101010101"
a$(4) = "010101010102020202020202060206020202020201010101"
a$(5) = "010101010102020202020202060602020202020201010101"
a$(6) = "010101010102020206020202060202020206020201010101"
a$(7) = "010101010102020202060202060202020602020201010101"
a$(8) = "010101010102020202020606060602060202020201010101"
a$(9) = "010101010102020202020206060606020202020201010101"
a$(10) = "010101010102020202020206060602020202020101010101"
a$(11) = "080808080808020206020206060602020602080808080808"
a$(12) = "080808080808080202060206060602060202080808080808"
a$(13) = "080808080808080802020606060606020208080808080808"
a$(14) = "080808080808080808020206060602020808080808080808"
a$(15) = "070707070707070707070706060607070707070707070707"
a$(16) = "070707070707070707070706060607070707070707070707"
a$(17) = "070707070707070707070706060607070707070707070707"
a$(18) = "070707070707070707070706060607070707070707070707"
a$(19) = "070707070707050707070706060607070507070705070707"
a$(20) = "070707070707020707070706060607070207070702070707"
a$(21) = "020202020202020202020206060602020202020202020202"
a$(22) = "020202020202020202060606060606060202020202020202"
a$(23) = "020202020202020202020202020202020202020202020202"
FOR y = 0 TO 23
FOR x = 0 TO 23
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 150, y + 50), col
NEXT x
NEXT y
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Nie 20:36, 24 Sty 2021 Temat postu: |
|
|
SCREEN 13
DIM a$(0 TO 32)
REM 20x20
a$(0) = "0F0F0F0F01010102020202020201010101010E0E"
a$(1) = "0F0F0F010101020202020202020201010101010E"
a$(2) = "0F01010101020202020202020202020101010101"
a$(3) = "0101010102020202050202020202020201010101"
a$(4) = "0101010102020202020202020202020201010101"
a$(5) = "0101010102020202020202050202020201010101"
a$(6) = "0101010102020202020202020202020201010101"
a$(7) = "0101010102020202020202020202020201010101"
a$(8) = "0101010101020202050202020202020101010101"
a$(9) = "0808080808080202020202020202080808080808"
a$(10) = "0808080808080802020202020208080808080808"
a$(11) = "0808080808080808060606060808080808080808"
a$(12) = "0808080808080808060606060808080808080808"
a$(13) = "0707070707070707060606060707070707070707"
a$(14) = "0707070707070707060606060707070707070707"
a$(15) = "0707070705070707060606060705070707050707"
a$(16) = "0707070702070707060606060702070707020707"
a$(17) = "0202020202020202060606060202020202020202"
a$(18) = "0202020202020206060606060602020202020202"
a$(19) = "0202020202020606060606060606020202020202"
FOR y = 0 TO 19
FOR x = 0 TO 19
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 50, y + 50), col
NEXT x
NEXT y
REM 22x22
a$(0) = "0F0F0F0F0F0101010202020202020201010101010E0E"
a$(1) = "0F0F0F0F01010102020202020202020201010101010E"
a$(2) = "0F0F0101010102020202020202020202020101010101"
a$(3) = "01010101010202020205020202020202020201010101"
a$(4) = "01010101010202020202020202020202020201010101"
a$(5) = "01010101010202020202020202050202020201010101"
a$(6) = "01010101010202020202020202020202020201010101"
a$(7) = "01010101010202020202020202020202020201010101"
a$(8) = "01010101010202020202020202020202020201010101"
a$(9) = "01010101010102020205020202020202020101010101"
a$(10) = "08080808080808020202020202020202080808080808"
a$(11) = "08080808080808080202020202020208080808080808"
a$(12) = "08080808080808080806060606060808080808080808"
a$(13) = "08080808080808080806060606060808080808080808"
a$(14) = "07070707070707070706060606060707070707070707"
a$(15) = "07070707070707070706060606060707070707070707"
a$(16) = "07070707070707070706060606060707070707070707"
a$(17) = "07070707070507070706060606060705070707050707"
a$(18) = "07070707070207070706060606060702070707020707"
a$(19) = "02020202020202020206060606060202020202020202"
a$(20) = "02020202020202020606060606060602020202020202"
a$(21) = "02020202020202060606060606060606020202020202"
FOR y = 0 TO 21
FOR x = 0 TO 21
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 100, y + 50), col
NEXT x
NEXT y
REM 24x24
a$(0) = "0F0F0F0F0F0F0101010202020202020201010101010E0E0E"
a$(1) = "0F0F0F0F0F01010102020202020202020201010101010E0E"
a$(2) = "0F0F0F010101010202020202020202020202010101010101"
a$(3) = "010101010101020202020206020202020202020101010101"
a$(4) = "010101010102020202020202060206020202020201010101"
a$(5) = "010101010102020202020202060602020202020201010101"
a$(6) = "010101010102020206020202060202020206020201010101"
a$(7) = "010101010102020202060202060202020602020201010101"
a$(8) = "010101010102020202020606060602060202020201010101"
a$(9) = "010101010102020202020206060606020202020201010101"
a$(10) = "010101010102020202020206060602020202020101010101"
a$(11) = "080808080808020206020206060602020602080808080808"
a$(12) = "080808080808080202060206060602060202080808080808"
a$(13) = "080808080808080802020606060606020208080808080808"
a$(14) = "080808080808080808020206060602020808080808080808"
a$(15) = "070707070707070707070706060607070707070707070707"
a$(16) = "070707070707070707070706060607070707070707070707"
a$(17) = "070707070707070707070706060607070707070707070707"
a$(18) = "070707070707070707070706060607070707070707070707"
a$(19) = "070707070707050707070706060607070507070705070707"
a$(20) = "070707070707020707070706060607070207070702070707"
a$(21) = "020202020202020202020206060602020202020202020202"
a$(22) = "020202020202020202060606060606060202020202020202"
a$(23) = "020202020202020202020202020202020202020202020202"
FOR y = 0 TO 23
FOR x = 0 TO 23
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 150, y + 50), col
NEXT x
NEXT y
REM 24x28
a$(0) = "0F0F0F0F0F0F0101010202020202020201010101010E0E0E"
a$(1) = "0F0F0F0F0F01010102020202020202020201010101010E0E"
a$(2) = "0F0F0F010101010202020602020202020202010101010101"
a$(3) = "010101010101020202020602020202060202020101010101"
a$(4) = "010101010102020202020602020202060202020201010101"
a$(5) = "010101010102020202020602020206020202020201010101"
a$(6) = "010101010102020602020602020206020206020201010101"
a$(7) = "010101010102020602020206020206020206020201010101"
a$(8) = "010101010102020206020206020602020602020201010101"
a$(9) = "010101010102020202060206020602020602020201010101"
a$(10) = "010101010102020202060206060602060202020201010101"
a$(11) = "010101010102020202020606060606020202020201010101"
a$(12) = "010101010102020602020206060602020206020201010101"
a$(13) = "010101010101020206020206060602020602020101010101"
a$(14) = "080808080808080202060206060602060202080808080808"
a$(15) = "080808080808080802020606060606020208080808080808"
a$(16) = "080808080808080808020206060602020808080808080808"
a$(17) = "080808080808080808080806060608080808080808080808"
a$(18) = "070707070707070707070706060607070707070707070707"
a$(19) = "070707070707070707070706060607070707070707070707"
a$(20) = "070707070707070707070706060607070707070707070707"
a$(21) = "070707070707070707070706060607070707070707070707"
a$(22) = "070707070707070707070706060607070707070707070707"
a$(23) = "070707070707050707070706060607070507070705070707"
a$(24) = "070707070707020707070706060607070207070702070707"
a$(25) = "020202020202020202020206060602020202020202020202"
a$(26) = "020202020202020202060606060606060202020202020202"
a$(27) = "020202020202020202020202020202020202020202020202"
FOR y = 0 TO 27
FOR x = 0 TO 23
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 200, y + 50), col
NEXT x
NEXT y
REM 24x32
a$(0) = "0F0F0F0F0F0F0101010101010101010101010101010E0E0E"
a$(1) = "0F0F0F0F0F010101010202020202020201010101010E0E0E"
a$(2) = "0F0F0F0F0101010102020202020202020201010101010E0E"
a$(3) = "010101010101010202020602020202020202010101010101"
a$(4) = "010101010101020202020602020202060202020101010101"
a$(5) = "010101010102020202020602020202060202020201010101"
a$(6) = "010101010102020202020602020206020202020201010101"
a$(7) = "010101010102020602020602020206020206020201010101"
a$(8) = "010101010102020602020206020206020206020201010101"
a$(9) = "010101010102020206020206020602020602020201010101"
a$(10) = "010101010102020206020206020602020602020201010101"
a$(11) = "010101010102020202060206020602020602020201010101"
a$(12) = "010101010102020202060206060602060202020201010101"
a$(13) = "010101010102020202020606060606020202020201010101"
a$(14) = "010101010102020602020206060602020206020201010101"
a$(15) = "010101010101020206020206060602020602020101010101"
a$(16) = "080808080808080202060206060602060202080808080808"
a$(17) = "080808080808080802020606060606020208080808080808"
a$(18) = "080808080808080808020206060602020808080808080808"
a$(19) = "080808080808080808080806060608080808080808080808"
a$(20) = "080808080808080808080806060608080808080808080808"
a$(21) = "070707070707070707070706060607070707070707070707"
a$(22) = "070707070707070707070706060607070707070707070707"
a$(23) = "070707070707070707070706060607070707070707070707"
a$(24) = "070707070707070707070706060607070707070707070707"
a$(25) = "070707070707070707070706060607070707070707070707"
a$(26) = "070707070707070707070706060607070707070707070707"
a$(27) = "070707070707050707070706060607070507070705070707"
a$(28) = "070707070707020707070706060607070207070702070707"
a$(29) = "020202020202020202020606060606020202020202020202"
a$(30) = "020202020202020202060606060606060202020202020202"
a$(31) = "020202020202020202020202020202020202020202020202"
FOR y = 0 TO 31
FOR x = 0 TO 23
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 250, y + 50), col
NEXT x
NEXT y
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Wto 13:39, 26 Sty 2021 Temat postu: |
|
|
Programik jest wstępem do napisania procedury powiększana obrazków.
SCREEN 13
DIM a$(0 TO 32)
DIM kopia(0 TO 100)
REM 24x32
a$(0) = "0F0F0F0F0F0F0101010101010101010101010101010E0E0E"
a$(1) = "0F0F0F0F0F010101010202020202020201010101010E0E0E"
a$(2) = "0F0F0F0F0101010102020202020202020201010101010E0E"
a$(3) = "010101010101010202020602020202020202010101010101"
a$(4) = "010101010101020202020602020202060202020101010101"
a$(5) = "010101010102020202020602020202060202020201010101"
a$(6) = "010101010102020202020602020206020202020201010101"
a$(7) = "010101010102020602020602020206020206020201010101"
a$(8) = "010101010102020602020206020206020206020201010101"
a$(9) = "010101010102020206020206020602020602020201010101"
a$(10) = "010101010102020206020206020602020602020201010101"
a$(11) = "010101010102020202060206020602020602020201010101"
a$(12) = "010101010102020202060206060602060202020201010101"
a$(13) = "010101010102020202020606060606020202020201010101"
a$(14) = "010101010102020602020206060602020206020201010101"
a$(15) = "010101010101020206020206060602020602020101010101"
a$(16) = "080808080808080202060206060602060202080808080808"
a$(17) = "080808080808080802020606060606020208080808080808"
a$(18) = "080808080808080808020206060602020808080808080808"
a$(19) = "080808080808080808080806060608080808080808080808"
a$(20) = "080808080808080808080806060608080808080808080808"
a$(21) = "070707070707070707070706060607070707070707070707"
a$(22) = "070707070707070707070706060607070707070707070707"
a$(23) = "070707070707070707070706060607070707070707070707"
a$(24) = "070707070707070707070706060607070707070707070707"
a$(25) = "070707070707070707070706060607070707070707070707"
a$(26) = "070707070707070707070706060607070707070707070707"
a$(27) = "070707070707050707070706060607070507070705070707"
a$(28) = "070707070707020707070706060607070207070702070707"
a$(29) = "020202020202020202020606060606020202020202020202"
a$(30) = "020202020202020202060606060606060202020202020202"
a$(31) = "020202020202020202020202020202020202020202020202"
FOR y = 0 TO 31
FOR x = 0 TO 23
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 250, y + 50), col
NEXT x
NEXT y
GET (250, 50)-(250, 81), kopia
PUT (0, 0), kopia
REM pomniejszenie w skali 0.7
skala = .7
FOR i = 0 TO 31: GET (0, i)-(0, 31 + i), kopia
PUT (10, i * skala), kopia, PSET
REM PUT (10, i * skala + 1), kopia, PSET
NEXT i
FOR powt = 0 TO 5 STEP .1
REM powiekszenie w skali 3.5
skala = 3.5
iley = INT(skala) + 1
FOR i = 0 TO 31: GET (0, i)-(0, 31 + i), kopia
FOR j = 0 TO iley
PUT (20 + powt * 10, i * skala + j), kopia, PSET
NEXT j
NEXT i
NEXT powt
|
|
Powrót do góry |
|
|
Zobacz poprzedni temat :: Zobacz następny temat |
Autor |
Wiadomość |
Piotr-246
Gość
|
Wysłany: Wto 14:07, 26 Sty 2021 Temat postu: |
|
|
Prędkość nie zachwyca...
REM prawidlowo rozciaga obrazek przy calkowitej skali np 4
SCREEN 13
DIM a$(0 TO 32)
DIM kopia(0 TO 100)
REM 24x32
a$(0) = "0F0F0F0F0F0F0101010101010101010101010101010E0E0E"
a$(1) = "01010F0F0F010101010202020202020201010101010E0E0E"
a$(2) = "05010F0F0101010102020202020202020201010101010E0E"
a$(3) = "010101010101010202020602020202020202010101010101"
a$(4) = "070101010101020202020602020202060202020101010101"
a$(5) = "010101010102020202020602020202060202020201010101"
a$(6) = "010101010102020202020602020206020202020201010101"
a$(7) = "010101010102020602020602020206020206020201010101"
a$(8) = "010101010102020602020206020206020206020201010101"
a$(9) = "010101010102020206020206020602020602020201010101"
a$(10) = "010101010102020206020206020602020602020201010101"
a$(11) = "010101010102020202060206020602020602020201010101"
a$(12) = "010101010102020202060206060602060202020201010101"
a$(13) = "010101010102020202020606060606020202020201010101"
a$(14) = "010101010102020602020206060602020206020201010101"
a$(15) = "010101010101020206020206060602020602020101010101"
a$(16) = "080808080808080202060206060602060202080808080808"
a$(17) = "080808080808080802020606060606020208080808080808"
a$(18) = "080808080808080808020206060602020808080808080808"
a$(19) = "080808080808080808080806060608080808080808080808"
a$(20) = "080808080808080808080806060608080808080808080808"
a$(21) = "070707070707070707070706060607070707070707070707"
a$(22) = "070707070707070707070706060607070707070707070707"
a$(23) = "070707070707070707070706060607070707070707070707"
a$(24) = "070707070707070707070706060607070707070707070707"
a$(25) = "070707070707070707070706060607070707070707070707"
a$(26) = "070707070707070707070706060607070707070707070707"
a$(27) = "070707070707050707070706060607070507070705070707"
a$(28) = "070707070707020707070706060607070207070702070707"
a$(29) = "020202020202020202020606060606020202020202020202"
a$(30) = "020202020202020202060606060606060202020202020202"
a$(31) = "020202020202020202020202020202020202020202020202"
FOR y = 0 TO 31
FOR x = 0 TO 23
col = VAL("&H" + MID$(a$(y), x * 2 + 1, 2))
PSET (x + 250, y + 0), col
NEXT x
NEXT y
GET (250, 0)-(250, 31), kopia
PUT (0, 0), kopia
skala = 4
iley = INT(skala) + 10
FOR x = 0 TO 23
GET (250 + x, 0)-(250 + x, 31), kopia
PUT (x, 0), kopia, PSET
FOR i = 0 TO 31: GET (x, i)-(x, 31 + i), kopia
FOR j = 0 TO iley
PUT (30 + (powt * 10 + x), i * skala + j), kopia, PSET
NEXT j
NEXT i
NEXT x
|
|
Powrót do góry |
|
|
|
|
Możesz pisać nowe tematy Możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach
|
fora.pl - załóż własne forum dyskusyjne za darmo
Powered by phpBB © 2001, 2005 phpBB Group
|