Menu

[r760]: / trunk / lispbuilder-sdl / documentation / lispbuilder-sdl.html  Maximize  Restore  History

Download this file

5568 lines (3617 with data), 264.8 kB

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<title>LISPBUILDER-SDL - a cool library</title>
<style type=\"text/css\">
pre { padding:5px; background-color:#e0e0e0 }
h3, h4 { text-decoration: underline; }
a { text-decoration: none; padding: 1px 2px 1px 2px; }
a:visited { text-decoration: none; padding: 1px 2px 1px 2px; }
a:hover { text-decoration: none; padding: 1px 1px 1px 1px; border: 1px solid #000000; }
a:focus { text-decoration: none; padding: 1px 2px 1px 2px; border: none; }
a.none { text-decoration: none; padding: 0; }
a.none:visited { text-decoration: none; padding: 0; }
a.none:hover { text-decoration: none; border: none; padding: 0; }
a.none:focus { text-decoration: none; border: none; padding: 0; }
a.noborder { text-decoration: none; padding: 0; }
a.noborder:visited { text-decoration: none; padding: 0; }
a.noborder:hover { text-decoration: none; border: none; padding: 0; }
a.noborder:focus { text-decoration: none; border: none; padding: 0; }
pre.none { padding:5px; background-color:#ffffff }
/* code for examples, code and pathnames*/
div.code, div.path {
color: black;
}
div.repl {
color: Green;
}
</style>
</head>
<body bgcolor=white>
<h3> LISPBUILDER-SDL - a cool library</h3>
<blockquote>
<br>&nbsp;</br><h3><a name=abstract class=none>Abstract</a></h3>
<p>
LISPBUILDER-SDL comprises several of packages that allow game development using Common Lisp.
LISPBUILDER-SDL provides a set of bindings and Lispy abstractions for
<a href="http://www.libsdl.org">SDL</a> and other graphics, sound, physics, character animation
and 3D libraries. LISPBUILDER-SDL core functionality includes
window and event management, 2D graphics, 3D graphics using OpenGL and sound support.
The goal for the LISPBUILDER-SDL project is to become a useful resource for the development of games in Lisp.
</p>
<p>
<a href="http://www.libsdl.org">SDL</a> provides the low-level 2D rendering support.
LISPBUILDER-SDL adds 2D graphical effects such as rotation,
rendering circles, polygons, squares, Bezier and Cuttmull-Rom curves as well as bitmap font support.
Additional packages provide native C drawing functions, True Type font rendering,
loading of multiple image formats, a sound mixer and networking support.
The lispbuilder packages are meant to work together with each package providing a specific core set of
functionality. For example, an image that is loaded by lispbuilder-sdl-image may be rotated using
lispbuilder-sdl-gfx. Text may be rendered to a surface using lispbuilder-sdl-ttf and finally blitted to
the display using lispbuilder-sdl.
</p>
<ul>
<li><a href="lispbuilder-sdl-gfx.html" title="lispbuilder-sdl-gfx">lispbuilder-sdl-gfx</a>:
2D graphical effects such as zooming, rotation, circles, polygons and squares, using
<a href="http://www.ferzkopp.net/Software/SDL_gfx-2.0/" title="http://www.ferzkopp.net/Software/SDL_gfx-2.0/" rel="nofollow">SDL_gfx</a></li>
<li> <a href="lispbuilder-sdl-image.html" title="lispbuilder-sdl-image">lispbuilder-sdl-image</a>:
Support for multople image formats such as <acronym title="Portable Network Graphics">PNG</acronym> and
<acronym title="Joint Photographics Experts Group">JPG</acronym>,
using <a href="http://www.libsdl.org/projects/SDL_image/" title="http://www.libsdl.org/projects/SDL_image/" rel="nofollow">SDL_image</a></li>
<li>lispbuilder-sdl-mixer: Sound mixing, using
<a href="http://www.libsdl.org/projects/SDL_mixer/" title="http://www.libsdl.org/projects/SDL_mixer/" rel="nofollow">SDL_mixer</a>
a multi-channel audio mixer library</li>
<li><a href="lispbuilder-sdl-ttf.html" title="lispbuilder-sdl-ttf">lispbuilder-sdl-ttf</a>:
True-type font rendering, using
<a href="http://www.libsdl.org/projects/SDL_ttf/" title="http://www.libsdl.org/projects/SDL_ttf/" rel="nofollow">SDL_ttf</a></li>
<li>lispbuilder-sdl-net: Networking, using
<a href="http://www.libsdl.org" title="http://www.libsdl.org" rel="nofollow">SDL_net</a>
a cross-platform, blocking network library</li>
</ul>
<p>
The code comes with
a <a href="http://en.wikipedia.org/wiki/MIT_License">MIT-style license</a> so you can basically
do with it whatever you want.
</p>
<p>
<font color=red>Download shortcut:</font> <a href="http://www.balooga.com/lispbuilder/lispbuilder-sdl.tgz">http://www.balooga.com/lispbuilder/lispbuilder-sdl.tgz</a>.
</p>
</blockquote>
<br>&nbsp;</br><h3><a class=none name="examplesimple">Simple Example</a></h3>
<div class="example">
<pre>
<img src="sdl-alien.png" width="200" height="167" title="Alien Technology" alt="Alien Technology" align=right border=0 vspace=10 hspace=10/>
(sdl:with-init ()
(sdl:window 320 240)
(sdl:draw-surface (load-image "lisp.bmp"))
(sdl:update-display)
(sdl:with-events ()
(:quit-event () t)
(:video-expose-event (sdl:update-display))))
</pre>
</div>
<br>&nbsp;</br><h3><a class=none name="contents">Contents</a></h3>
<ol>
<li><a href="#top">LISPBUILDER-SDL</a></li>
<ol>
<li><a href="#abstract">Abstract</a></li>
<li><a href="#compatibility">Compatibility</a></li>
<li><a href="#dependencies">Dependencies</a></li>
<li><a href="#download">Download</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#examples">Included Examples</a></li>
<li><a href="#support">Support</a></li>
<li><a href="#license">License</a></li>
<li><a href="#packageoverview">Package Overview</a></li>
<ol>
<li><a href="#packageexports">Package Exports</a></li>
<li><a href="#packagestruct">Package Structure</a></li>
</ol>
<li><a href="#devintro">Introduction</a></li>
<ol>
<li><a href="#devinit">Initialisation</a></li>
<li><a href="#devwin">Creation of the SDL Window</a></li>
<li><a href="#devloop">Events and the Game Loop</a></li>
<li><a href="#devprim">Primitives</a></li>
<ol>
<li><a href="#devprimrect">Rectangle</a></li>
<li><a href="#devprimcol">Color</a></li>
</ol>
<li><a href="#devdraw">Drawing</a></li>
<li><a href="#font">Fonts</a></li>
<ol>
<li><a href="#fontinit">Initialisation</a></li>
<li><a href="#fontrend">Rendering Text</a></li>
</ol>
<li><a href="#devsurf">Surfaces</a></li>
<ol>
<li><a href="#devsurfover">Overview</a></li>
<li><a href="#devsurfcreat">Creation</a></li>
<li><a href="#devsurfload">Loading Images</a></li>
<li><a href="#devsurfpos">Positioning</a></li>
<li><a href="#devsurfblit">Drawing & Blitting</a></li>
</ol>
<li><a href="#devdisp">The SDL Display</a></li>
<li><a href="#devcursor">The Cursor</a></li>
<li><a href="#devex">Simple Example</a></li>
<li><a href="#devgarbage">Garbage Collection</a></li>
</ol>
<li><a href="#dictionary">The LISPBUILDER-SDL dictionary</a></li>
<ul>
<li><a href="#*black*"><code>*black*</code></a></li>
<li><a href="#*blue*"><code>*blue*</code></a></li>
<li><a href="#*cyan*"><code>*cyan*</code></a></li>
<li><a href="#*default-color*"><code>*default-color*</code></a></li>
<li><a href="#*default-display*"><code>*default-display*</code></a></li>
<li><a href="#*default-font*"><code>*default-font*</code></a></li>
<li><a href="#*default-font-path*"><code>*default-font-path*</code></a></li>
<li><a href="#*default-position*"><code>*default-position*</code></a></li>
<li><a href="#*default-rectangle*"><code>*default-rectangle*</code></a></li>
<li><a href="#*default-surface*"><code>*default-surface*</code></a></li>
<li><a href="#*external-init-on-startup*"><code>*external-init-on-startup*</code></a></li>
<li><a href="#*external-quit-on-exit*"><code>*external-quit-on-exit*</code></a></li>
<li><a href="#*font-10x20*"><code>*font-10x20*</code></a></li>
<li><a href="#*font-5x7*"><code>*font-5x7*</code></a></li>
<li><a href="#*font-5x8*"><code>*font-5x8*</code></a></li>
<li><a href="#*font-6x10*"><code>*font-6x10*</code></a></li>
<li><a href="#*font-6x12*"><code>*font-6x12*</code></a></li>
<li><a href="#*font-6x13*"><code>*font-6x13*</code></a></li>
<li><a href="#*font-6x13b*"><code>*font-6x13b*</code></a></li>
<li><a href="#*font-6x13o*"><code>*font-6x13o*</code></a></li>
<li><a href="#*font-6x9*"><code>*font-6x9*</code></a></li>
<li><a href="#*font-7x13*"><code>*font-7x13*</code></a></li>
<li><a href="#*font-7x13b*"><code>*font-7x13b*</code></a></li>
<li><a href="#*font-7x13o*"><code>*font-7x13o*</code></a></li>
<li><a href="#*font-7x14*"><code>*font-7x14*</code></a></li>
<li><a href="#*font-7x14b*"><code>*font-7x14b*</code></a></li>
<li><a href="#*font-8x13*"><code>*font-8x13*</code></a></li>
<li><a href="#*font-8x13b*"><code>*font-8x13b*</code></a></li>
<li><a href="#*font-8x13o*"><code>*font-8x13o*</code></a></li>
<li><a href="#*font-8x8*"><code>*font-8x8*</code></a></li>
<li><a href="#*font-9x15*"><code>*font-9x15*</code></a></li>
<li><a href="#*font-9x15b*"><code>*font-9x15b*</code></a></li>
<li><a href="#*font-9x18*"><code>*font-9x18*</code></a></li>
<li><a href="#*font-9x18b*"><code>*font-9x18b*</code></a></li>
<li><a href="#*green*"><code>*green*</code></a></li>
<li><a href="#*magenta*"><code>*magenta*</code></a></li>
<li><a href="#*opengl-context*"><code>*opengl-context*</code></a></li>
<li><a href="#*red*"><code>*red*</code></a></li>
<li><a href="#*sdl-initialized*"><code>*sdl-initialized*</code></a></li>
<li><a href="#*white*"><code>*white*</code></a></li>
<li><a href="#*yellow*"><code>*yellow*</code></a></li>
<li><a href="#a"><code>a</code></a></li>
<li><a href="#all-integers?"><code>all-integers?</code></a></li>
<li><a href="#alpha"><code>alpha</code></a></li>
<li><a href="#alpha-enabled-p"><code>alpha-enabled-p</code></a></li>
<li><a href="#any-color-but-this"><code>any-color-but-this</code></a></li>
<li><a href="#average-fps"><code>average-fps</code></a></li>
<li><a href="#b"><code>b</code></a></li>
<li><a href="#bit-depth"><code>bit-depth</code></a></li>
<li><a href="#bitmap-font"><code>bitmap-font</code></a></li>
<li><a href="#blit-surface"><code>blit-surface</code></a></li>
<li><a href="#cached-surface"><code>cached-surface</code></a></li>
<li><a href="#cast"><code>cast</code></a></li>
<li><a href="#cast-all-to-int"><code>cast-all-to-int</code></a></li>
<li><a href="#cast-to-int"><code>cast-to-int</code></a></li>
<li><a href="#catmull-rom-spline"><code>catmull-rom-spline</code></a></li>
<li><a href="#char-height"><code>char-height</code></a></li>
<li><a href="#char-width"><code>char-width</code></a></li>
<li><a href="#check-types"><code>check-types</code></a></li>
<li><a href="#clear-cell"><code>clear-cell</code></a></li>
<li><a href="#clear-clip-rect"><code>clear-clip-rect</code></a></li>
<li><a href="#clear-color-key"><code>clear-color-key</code></a></li>
<li><a href="#clear-display"><code>clear-display</code></a></li>
<li><a href="#clip-rect"><code>clip-rect</code></a></li>
<li><a href="#color"><code>color</code></a></li>
<li><a href="#color"><code>color</code></a></li>
<li><a href="#color-*"><code>color-*</code></a></li>
<li><a href="#color-a"><code>color-a</code></a></li>
<li><a href="#color-key"><code>color-key</code></a></li>
<li><a href="#color-key-enabled-p"><code>color-key-enabled-p</code></a></li>
<li><a href="#color="><code>color=</code></a></li>
<li><a href="#convert-surface"><code>convert-surface</code></a></li>
<li><a href="#convert-to-display-format"><code>convert-to-display-format</code></a></li>
<li><a href="#copy-channel-to-alpha"><code>copy-channel-to-alpha</code></a></li>
<li><a href="#copy-point"><code>copy-point</code></a></li>
<li><a href="#copy-surface"><code>copy-surface</code></a></li>
<li><a href="#create-list-if-not"><code>create-list-if-not</code></a></li>
<li><a href="#create-path"><code>create-path</code></a></li>
<li><a href="#create-rwops-from-file"><code>create-rwops-from-file</code></a></li>
<li><a href="#create-surface"><code>create-surface</code></a></li>
<li><a href="#disable-key-repeat"><code>disable-key-repeat</code></a></li>
<li><a href="#display-surface"><code>display-surface</code></a></li>
<li><a href="#distance"><code>distance</code></a></li>
<li><a href="#distance-*"><code>distance-*</code></a></li>
<li><a href="#draw-bezier"><code>draw-bezier</code></a></li>
<li><a href="#draw-box"><code>draw-box</code></a></li>
<li><a href="#draw-box-*"><code>draw-box-*</code></a></li>
<li><a href="#draw-circle"><code>draw-circle</code></a></li>
<li><a href="#draw-circle-*"><code>draw-circle-*</code></a></li>
<li><a href="#draw-curve"><code>draw-curve</code></a></li>
<li><a href="#draw-ellipse"><code>draw-ellipse</code></a></li>
<li><a href="#draw-ellipse-*"><code>draw-ellipse-*</code></a></li>
<li><a href="#draw-filled-circle"><code>draw-filled-circle</code></a></li>
<li><a href="#draw-filled-circle-*"><code>draw-filled-circle-*</code></a></li>
<li><a href="#draw-filled-ellipse"><code>draw-filled-ellipse</code></a></li>
<li><a href="#draw-filled-ellipse-*"><code>draw-filled-ellipse-*</code></a></li>
<li><a href="#draw-filled-pie"><code>draw-filled-pie</code></a></li>
<li><a href="#draw-filled-pie-*"><code>draw-filled-pie-*</code></a></li>
<li><a href="#draw-filled-polygon"><code>draw-filled-polygon</code></a></li>
<li><a href="#draw-filled-trigon"><code>draw-filled-trigon</code></a></li>
<li><a href="#draw-font"><code>draw-font</code></a></li>
<li><a href="#draw-font-at"><code>draw-font-at</code></a></li>
<li><a href="#draw-font-at-*"><code>draw-font-at-*</code></a></li>
<li><a href="#draw-hline"><code>draw-hline</code></a></li>
<li><a href="#draw-line"><code>draw-line</code></a></li>
<li><a href="#draw-line-*"><code>draw-line-*</code></a></li>
<li><a href="#draw-pie"><code>draw-pie</code></a></li>
<li><a href="#draw-pie-*"><code>draw-pie-*</code></a></li>
<li><a href="#draw-pixel"><code>draw-pixel</code></a></li>
<li><a href="#draw-pixel-*"><code>draw-pixel-*</code></a></li>
<li><a href="#draw-polygon"><code>draw-polygon</code></a></li>
<li><a href="#draw-rectangle"><code>draw-rectangle</code></a></li>
<li><a href="#draw-rectangle-*"><code>draw-rectangle-*</code></a></li>
<li><a href="#draw-shape"><code>draw-shape</code></a></li>
<li><a href="#draw-string-shaded"><code>draw-string-shaded</code></a></li>
<li><a href="#draw-string-shaded-*"><code>draw-string-shaded-*</code></a></li>
<li><a href="#draw-string-solid"><code>draw-string-solid</code></a></li>
<li><a href="#draw-string-solid-*"><code>draw-string-solid-*</code></a></li>
<li><a href="#draw-surface"><code>draw-surface</code></a></li>
<li><a href="#draw-surface-at"><code>draw-surface-at</code></a></li>
<li><a href="#draw-surface-at-*"><code>draw-surface-at-*</code></a></li>
<li><a href="#draw-trigon"><code>draw-trigon</code></a></li>
<li><a href="#draw-vline"><code>draw-vline</code></a></li>
<li><a href="#enable-alpha"><code>enable-alpha</code></a></li>
<li><a href="#enable-color-key"><code>enable-color-key</code></a></li>
<li><a href="#enable-key-repeat"><code>enable-key-repeat</code></a></li>
<li><a href="#enable-key-repeat-p"><code>enable-key-repeat-p</code></a></li>
<li><a href="#enable-rle-accel"><code>enable-rle-accel</code></a></li>
<li><a href="#enable-unicode"><code>enable-unicode</code></a></li>
<li><a href="#enable-unicode-p"><code>enable-unicode-p</code></a></li>
<li><a href="#fill-surface"><code>fill-surface</code></a></li>
<li><a href="#fill-surface-*"><code>fill-surface-*</code></a></li>
<li><a href="#flood-fill"><code>flood-fill</code></a></li>
<li><a href="#flood-fill-*"><code>flood-fill-*</code></a></li>
<li><a href="#flood-fill-stack"><code>flood-fill-stack</code></a></li>
<li><a href="#flood-fill-stack-*"><code>flood-fill-stack-*</code></a></li>
<li><a href="#fp"><code>fp</code></a></li>
<li><a href="#frame-rate"><code>frame-rate</code></a></li>
<li><a href="#free"><code>free</code></a></li>
<li><a href="#free-cached-surface"><code>free-cached-surface</code></a></li>
<li><a href="#g"><code>g</code></a></li>
<li><a href="#get-clip-rect"><code>get-clip-rect</code></a></li>
<li><a href="#get-key-state"><code>get-key-state</code></a></li>
<li><a href="#get-native-window"><code>get-native-window</code></a></li>
<li><a href="#get-point"><code>get-point</code></a></li>
<li><a href="#get-position"><code>get-position</code></a></li>
<li><a href="#get-rectangle"><code>get-rectangle</code></a></li>
<li><a href="#get-surface-rect"><code>get-surface-rect</code></a></li>
<li><a href="#height"><code>height</code></a></li>
<li><a href="#image-p"><code>image-p</code></a></li>
<li><a href="#image-type-of"><code>image-type-of</code></a></li>
<li><a href="#init-sdl"><code>init-sdl</code></a></li>
<li><a href="#init-sub-systems"><code>init-sub-systems</code></a></li>
<li><a href="#initialise-default-font"><code>initialise-default-font</code></a></li>
<li><a href="#initialise-font"><code>initialise-font</code></a></li>
<li><a href="#initialize-on-startup"><code>initialize-on-startup</code></a></li>
<li><a href="#initialized-sub-systems-p"><code>initialized-sub-systems-p</code></a></li>
<li><a href="#is-valid-ptr"><code>is-valid-ptr</code></a></li>
<li><a href="#key-repeat-delay"><code>key-repeat-delay</code></a></li>
<li><a href="#key-repeat-interval"><code>key-repeat-interval</code></a></li>
<li><a href="#key="><code>key=</code></a></li>
<li><a href="#list-modes"><code>list-modes</code></a></li>
<li><a href="#list-sub-systems"><code>list-sub-systems</code></a></li>
<li><a href="#load-image"><code>load-image</code></a></li>
<li><a href="#map-color"><code>map-color</code></a></li>
<li><a href="#map-color-*"><code>map-color-*</code></a></li>
<li><a href="#num-joysticks"><code>num-joysticks</code></a></li>
<li><a href="#pack-color"><code>pack-color</code></a></li>
<li><a href="#pixel-alpha-enabled-p"><code>pixel-alpha-enabled-p</code></a></li>
<li><a href="#point"><code>point</code></a></li>
<li><a href="#point-*"><code>point-*</code></a></li>
<li><a href="#position-*"><code>position-*</code></a></li>
<li><a href="#push-quit-event"><code>push-quit-event</code></a></li>
<li><a href="#push-user-event"><code>push-user-event</code></a></li>
<li><a href="#query-cursor"><code>query-cursor</code></a></li>
<li><a href="#quit-on-exit"><code>quit-on-exit</code></a></li>
<li><a href="#quit-sdl"><code>quit-sdl</code></a></li>
<li><a href="#quit-sub-systems"><code>quit-sub-systems</code></a></li>
<li><a href="#r"><code>r</code></a></li>
<li><a href="#random+1"><code>random+1</code></a></li>
<li><a href="#random-rectangle"><code>random-rectangle</code></a></li>
<li><a href="#read-pixel"><code>read-pixel</code></a></li>
<li><a href="#read-pixel-*"><code>read-pixel-*</code></a></li>
<li><a href="#rectangle"><code>rectangle</code></a></li>
<li><a href="#rectangle"><code>rectangle</code></a></li>
<li><a href="#rectangle-*"><code>rectangle-*</code></a></li>
<li><a href="#rectangle-from-edges"><code>rectangle-from-edges</code></a></li>
<li><a href="#rectangle-from-edges-*"><code>rectangle-from-edges-*</code></a></li>
<li><a href="#rectangle-from-midpoint-*"><code>rectangle-from-midpoint-*</code></a></li>
<li><a href="#render-string-shaded"><code>render-string-shaded</code></a></li>
<li><a href="#render-string-solid"><code>render-string-solid</code></a></li>
<li><a href="#return-sub-systems-of-status"><code>return-sub-systems-of-status</code></a></li>
<li><a href="#rle-accel-enabled-p"><code>rle-accel-enabled-p</code></a></li>
<li><a href="#rotate-surface"><code>rotate-surface</code></a></li>
<li><a href="#rotate-surface-xy"><code>rotate-surface-xy</code></a></li>
<li><a href="#rwops"><code>rwops</code></a></li>
<li><a href="#save-image"><code>save-image</code></a></li>
<li><a href="#sdl-any-format"><code>sdl-any-format</code></a></li>
<li><a href="#sdl-async-blit"><code>sdl-async-blit</code></a></li>
<li><a href="#sdl-doublebuf"><code>sdl-doublebuf</code></a></li>
<li><a href="#sdl-fullscreen"><code>sdl-fullscreen</code></a></li>
<li><a href="#sdl-get-ticks"><code>sdl-get-ticks</code></a></li>
<li><a href="#sdl-hw-accel"><code>sdl-hw-accel</code></a></li>
<li><a href="#sdl-hw-palette"><code>sdl-hw-palette</code></a></li>
<li><a href="#sdl-hw-surface"><code>sdl-hw-surface</code></a></li>
<li><a href="#sdl-init-audio"><code>sdl-init-audio</code></a></li>
<li><a href="#sdl-init-cdrom"><code>sdl-init-cdrom</code></a></li>
<li><a href="#sdl-init-eventthread"><code>sdl-init-eventthread</code></a></li>
<li><a href="#sdl-init-everything"><code>sdl-init-everything</code></a></li>
<li><a href="#sdl-init-joystick"><code>sdl-init-joystick</code></a></li>
<li><a href="#sdl-init-noparachute"><code>sdl-init-noparachute</code></a></li>
<li><a href="#sdl-init-on-startup"><code>sdl-init-on-startup</code></a></li>
<li><a href="#sdl-init-timer"><code>sdl-init-timer</code></a></li>
<li><a href="#sdl-init-video"><code>sdl-init-video</code></a></li>
<li><a href="#sdl-iyuv-overlay"><code>sdl-iyuv-overlay</code></a></li>
<li><a href="#sdl-joystick-name"><code>sdl-joystick-name</code></a></li>
<li><a href="#sdl-no-frame"><code>sdl-no-frame</code></a></li>
<li><a href="#sdl-opengl"><code>sdl-opengl</code></a></li>
<li><a href="#sdl-pre-alloc"><code>sdl-pre-alloc</code></a></li>
<li><a href="#sdl-quit-on-exit"><code>sdl-quit-on-exit</code></a></li>
<li><a href="#sdl-resizable"><code>sdl-resizable</code></a></li>
<li><a href="#sdl-rle-accel"><code>sdl-rle-accel</code></a></li>
<li><a href="#sdl-rle-accel-ok"><code>sdl-rle-accel-ok</code></a></li>
<li><a href="#sdl-src-alpha"><code>sdl-src-alpha</code></a></li>
<li><a href="#sdl-src-color-key"><code>sdl-src-color-key</code></a></li>
<li><a href="#sdl-surface"><code>sdl-surface</code></a></li>
<li><a href="#sdl-sw-surface"><code>sdl-sw-surface</code></a></li>
<li><a href="#sdl-uyvy-overlay"><code>sdl-uyvy-overlay</code></a></li>
<li><a href="#sdl-wm-grab-input"><code>sdl-wm-grab-input</code></a></li>
<li><a href="#sdl-yuy2-overlay"><code>sdl-yuy2-overlay</code></a></li>
<li><a href="#sdl-yv12-overlay"><code>sdl-yv12-overlay</code></a></li>
<li><a href="#sdl-yvyu-overlay"><code>sdl-yvyu-overlay</code></a></li>
<li><a href="#set-cell"><code>set-cell</code></a></li>
<li><a href="#set-cell-*"><code>set-cell-*</code></a></li>
<li><a href="#set-clip-rect"><code>set-clip-rect</code></a></li>
<li><a href="#set-color"><code>set-color</code></a></li>
<li><a href="#set-color-*"><code>set-color-*</code></a></li>
<li><a href="#set-gl-attribute"><code>set-gl-attribute</code></a></li>
<li><a href="#set-point"><code>set-point</code></a></li>
<li><a href="#set-point-*"><code>set-point-*</code></a></li>
<li><a href="#set-position"><code>set-position</code></a></li>
<li><a href="#set-position-*"><code>set-position-*</code></a></li>
<li><a href="#set-rectangle"><code>set-rectangle</code></a></li>
<li><a href="#set-rectangle-*"><code>set-rectangle-*</code></a></li>
<li><a href="#set-surface"><code>set-surface</code></a></li>
<li><a href="#set-surface-*"><code>set-surface-*</code></a></li>
<li><a href="#show-cursor"><code>show-cursor</code></a></li>
<li><a href="#surface"><code>surface</code></a></li>
<li><a href="#surface-info"><code>surface-info</code></a></li>
<li><a href="#time-scale"><code>time-scale</code></a></li>
<li><a href="#to-degree"><code>to-degree</code></a></li>
<li><a href="#to-radian"><code>to-radian</code></a></li>
<li><a href="#update-display"><code>update-display</code></a></li>
<li><a href="#update-surface"><code>update-surface</code></a></li>
<li><a href="#update-surface-*"><code>update-surface-*</code></a></li>
<li><a href="#video-dimensions"><code>video-dimensions</code></a></li>
<li><a href="#video-driver-name"><code>video-driver-name</code></a></li>
<li><a href="#video-info"><code>video-info</code></a></li>
<li><a href="#video-memory"><code>video-memory</code></a></li>
<li><a href="#width"><code>width</code></a></li>
<li><a href="#window"><code>window</code></a></li>
<li><a href="#with-bezier"><code>with-bezier</code></a></li>
<li><a href="#with-color"><code>with-color</code></a></li>
<li><a href="#with-curve"><code>with-curve</code></a></li>
<li><a href="#with-default-font"><code>with-default-font</code></a></li>
<li><a href="#with-events"><code>with-events</code></a></li>
<li><a href="#with-font"><code>with-font</code></a></li>
<li><a href="#with-foreign-color-copy"><code>with-foreign-color-copy</code></a></li>
<li><a href="#with-init"><code>with-init</code></a></li>
<li><a href="#with-locked-surface"><code>with-locked-surface</code></a></li>
<li><a href="#with-locked-surfaces"><code>with-locked-surfaces</code></a></li>
<li><a href="#with-point"><code>with-point</code></a></li>
<li><a href="#with-rectangle"><code>with-rectangle</code></a></li>
<li><a href="#with-rectangles"><code>with-rectangles</code></a></li>
<li><a href="#with-shape"><code>with-shape</code></a></li>
<li><a href="#with-surface"><code>with-surface</code></a></li>
<li><a href="#with-surface-slots"><code>with-surface-slots</code></a></li>
<li><a href="#with-surfaces"><code>with-surfaces</code></a></li>
<li><a href="#within-range"><code>within-range</code></a></li>
<li><a href="#within-range-*"><code>within-range-*</code></a></li>
<li><a href="#x"><code>x</code></a></li>
<li><a href="#x2"><code>x2</code></a></li>
<li><a href="#y"><code>y</code></a></li>
<li><a href="#y2"><code>y2</code></a></li>
<li><a href="#zoom-surface"><code>zoom-surface</code></a></li>
</ul>
<li><a href="#ack">Acknowledgements</a></li>
</ol>
</div>
<br>&nbsp;</br><h3><a class=none name="compatibility">Compatibility</h3>
<p>
The following table describes the status of LISPBUILDER-SDL on the major Common Lisp
implementations:
</p>
<table id="mytable" cellspacing="0" summary="Compatibility">
<tr>
<th><b>Lisp Implementation</b></th>
<th colspan="3"><b>LISPBUILDER-SDL Status</b></th>
<th><b>Comments</b></th>
</tr>
<tr>
<th colspan="1"></th>
<th><b>Win32</b></th>
<th><b>Linux</b></th>
<th><b>MacOS</b></th>
<th></th>
</tr>
<tr>
<th class="spec" scope="row">
<a href="http://clisp.cons.org/">CLISP v2.38</a>
</th>
<td bgcolor="#60c060">Working</td>
<td bgcolor="#60c060">Working</td>
<td bgcolor="#60c060">Working</td>
<td></td>
</tr>
<tr>
<th class="specalt" scope="row">
<a href="http://www.lispworks.com/">Lispworks v4.4.6 Personal</a>
</th>
<td class="alt" bgcolor="#60c060">Working</td>
<td class="alt" bgcolor="#60c060">Working</td>
<td class="alt" bgcolor="#60c060">Working</td>
<td></td>
</tr>
<tr>
<th class="spec" scope="row">
<a href="http://www.franz.com/">Allegro Express 8.0</a>
</th>
<td bgcolor="#ff6060">Unknown</td>
<td bgcolor="#60c060">Working</td>
<td bgcolor="#ff6060">Unknown</td>
<td></td>
</tr>
<tr>
<th class="specalt" scope="row">
<a href="http://openmcl.clozure.com/">OpenMCL</a>
</th>
<td class="alt" bgcolor=blue><font color="#FFFFFF">NA</font></td>
<td class="alt" bgcolor=blue><font color="#FFFFFF">NA</font></td>
<td class="alt" bgcolor="#ff6060">Unknown</td>
<td></td>
</tr>
<tr>
<th class="spec" scope="row">
<a href="http://www.sbcl.org/">SBCL</a>
</th>
<td bgcolor="#60c060">Working</td>
<td bgcolor="#60c060">Working</td>
<td bgcolor="#ff6060">Unknown</td>
<td></td>
</tr>
<tr>
<th class="spec" scope="row">
<a href="http://www.cons.org/cmucl">CMUCL</a>
</th>
<td bgcolor="#60c060">Not Working</td>
<td bgcolor="#60c060">Not Working</td>
<td bgcolor="#ff6060">Not Working</td>
<td></td>
</tr>
</table>
<br>&nbsp;</br><h3><a class=none name="dependencies">Dependencies</a></h3>
<ul>
<li><a href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/cclan/asdf/asdf.lisp?rev=1.92" title="http://cvs.sourceforge.net/viewcvs.py/*checkout*/cclan/asdf/asdf.lisp?rev=1.92">ASDF:</a>
ASDF is already installed for users of SBCL, OpenMCL, ECL or ACL, or Lispworks and Edi Weitz's Lisp Starter Pack.
Otherwise, please refer to the official <a href="http://cvs.sourceforge.net/viewcvs.py/*checkout*/cclan/asdf/README?rev=HEAD&content-type=text/plain">ASDF README</a> for installation instructions.</li>
<li><a href="http://common-lisp.net/project/cffi" title="http://common-lisp.net/project/cffi">CFFI</a>:
Automatically installed if using <a href="http://www.cliki.net/ASDF-Install">ASDF-INSTALL</a>, or Edi Weitz's Starter Pack. Otherwise,
please refer to the official <a href="http://common-lisp.net/project/cffi" title="http://common-lisp.net/project/cffi">installation instructions</a>.</li>
<li><a href="http://www.libsdl.org" title="http://www.libsdl.org">SDL</a>:
Automatically installed by Edi Weitz's Lisp Starter Pack. Otherwise, Windows/Mac users should download the binaries from <a href="http://www.libsdl.org" title="http://www.libsdl.org">www.libsdl.org</a>, while
Linux users should use their package managers to install the RPM's or DEBs.</li>
</ul>
<br>&nbsp;</br><h3><a class=none name="download">Download</a></h3>
<p>
<font color=red>Current Version:</font> The latest stable version of LISPBUILDER-SDL, together with this documentation can be downloaded from
<a href="http://www.balooga.com.com/lispbuilder/lispbuilder-sdl.tgz">http://www.balooga.com/lispbuilder/lispbuilder-sdl.tgz</a>. The
current version is 0.9.5.
</p>
<br>&nbsp;</br><h3><a class=none name="installation">Installation</a></h3>
See <a href="http://lispbuilder.sourceforge.net/index.html">the LISPBUILDER documentation</a>
for installation instructions for <a href="http://lispbuilder.sourceforge.net/index.html#windows">Windows</a>,
<a href="http://lispbuilder.sourceforge.net/index.html#mac">Mac OS-X</a> and
<a href="http://lispbuilder.sourceforge.net/index.html#linux">Linux</a>.
<br>&nbsp;</br><h3><a class=none name="usage">Using LISPBUILDER-SDL</a></h3>
<p>
Enter the following at the REPL to compile and load the LISPBUILDER-SDL package:
<div class="repl">
<pre>(asdf:operate 'asdf:load-op :lispbuilder-sdl)</pre>
</div>
ASDF will take care of loading the CFFI and :LISPBUILDER-SDL dependencies.
The SDL.dll library will also be loaded into the Lisp image at this time.
</p>
<br>&nbsp;</br><h3><a class=none name="examples">Running the Included Examples</a></h3>
<p>Enter the following at the REPL to compile and load the examples included in the
LISPBUILDER-SDL-EXAMPLES package:</p>
<div class="repl">
<pre>
(asdf:operate 'asdf:load-op :lispbuilder-sdl-examples)
</pre>
</div>
<p>Run the examples by entering any of the following at the REPL:
</p>
<div class="repl">
<pre>
(SDL-EXAMPLES:BEZIER)
(SDL-EXAMPLES:BMP-SAMPLE)
(SDL-EXAMPLES:CIRCLE-1)
(SDL-EXAMPLES:CIRCLE-2)
(SDL-EXAMPLES:CIRCLE-3)
(SDL-EXAMPLES:CIRCLE-4)
(SDL-EXAMPLES:CIRCLE-5)
(SDL-EXAMPLES:DISTANCE-2D)
(SDL-EXAMPLES:FLOOD-FILL)
(SDL-EXAMPLES:INBUILT-FONTS)
(SDL-EXAMPLES:LINE-DRAWING)
(SDL-EXAMPLES:MANDELBROT)
(SDL-EXAMPLES:METABALLS)
(SDL-EXAMPLES:MOUSE-2D)
(SDL-EXAMPLES:MOUSE-PAINTER)
(SDL-EXAMPLES:PIXELS-1)
(SDL-EXAMPLES:PIXELS-2)
(SDL-EXAMPLES:PIXELS-3)
(SDL-EXAMPLES:PIXELS-4)
(SDL-EXAMPLES:POINTS-AND-LINES)
(SDL-EXAMPLES:RANDOM-RECTS)
(SDL-EXAMPLES:RANDOM-BOX-1)
(SDL-EXAMPLES:RANDOM-BOX-2)
(SDL-EXAMPLES:RANDOM-BOX-3)
(SDL-EXAMPLES:RANDOM-BOX-4)
(SDL-EXAMPLES:RECURSIVE-RECTS)
(SDL-EXAMPLES:SETUP-AND-DRAW)
(SDL-EXAMPLES:SIMPLE-FONT-DEMO)
(SDL-EXAMPLES:STROKE)
(SDL-EXAMPLES:VERTICES)
(SDL-EXAMPLES:WIDTH-HEIGHT)
</pre>
</div>
<br>&nbsp;</br><h3><a class=none name="support">Documentation, Support & Mailing Lists</a></h3>
Questions answered and help given on the <a href="http://www.lispniks.com/mailman/listinfo/application-builder">lispbuilder discussion list</a>.
Documentation for LISPBUILDER-SDL and related packages is available on the <a href="http://lispbuilder.sourceforge.net">LISPBUILDER project page on Sourceforge</a>.
For additional information, look at the <a href="http://wiki.alu.org/Gardeners_Projects">Lisp Gardeners page</a>, and
<a href="http://wiki.alu.org/Application_Builder">Application Builder page</a>
on the ALU's (Association of Lisp Users) wiki.
<br>&nbsp;</br><h3><a class=none name="license">License</a></h3>
<p>
LISPBUILDER-SDL is distributed under the
<a href="http://en.wikipedia.org/wiki/MIT_License">MIT-style license</a>.
</p>
<br>&nbsp;</br><h3><a class=none name="packageoverview">Package Overview</a></h3>
<h3><a class=none name="packageexports">Package Exports</a></h3>
<p>
Functions and symbols exported from the LISPBUILDER-SDL package are
accessible from the <code>LISPBUILDER-SDL:</code> prefix or the
shorter form <code>SDL:</code> nickname.
</p>
<h3><a class=none name="packagestruct">Package Structure</a></h3>
<p>
The <code>cffi/</code> directory contains the raw CFFI bindings.
These bindings may be automatically generated by <a href="http://www.swig.org">SWIG</a> or created by hand.
CFFI translation functions perform simple low-level conversions for example,
converting Lisp strings to C strings and back (see <code>cffi-translate.lisp</code>).
All functions in <code>cffi/</code> accept and return foreign objects only.
</p>
<p>
The <code>base/</code> directory defines wrappers over the functions in <code>cffi/</code> .
The functions in <code>base/</code> accept keyword arguments and accept NIL instead
of CFFI:NULL-POINTER where appropriate. Generally functions in <code>base/</code> accept and return foreign
objects. <code>base/</code> may perform some type checks (IS-VALID-PTR SURFACE) but
this layer is meant to be lean. Someone who implements a graphics engine
might use this layer instead of <code>sdl/</code> if speed is a concern.
There are no fancy drawing primitives in this layer.
</p>
<p>
The <code>sdl/</code> directory defines the abstractions over <code>cffi/</code> and <code>base/</code>.
Foreign objects are passed around <code>sdl/</code> neatly wrapped in CLOS objects, using TRIVIAL-GARBAGE for
automatic garbage collection (minimize foreign objects being left on the
heap). There are no functions in <code>sdl/</code> that accept or return foreign
objects (with the exception of the functions that create the CLOS
wrapper objects) Functions in <code>sdl/</code> call down into
<code>cffi/</code> and <code>base/</code> as appropriate. All LISPBUILDER-SDL symbols available in
<code>SDL:</code> are exported from <code>sdl/</code>, with symbols imported into <code>sdl/</code> from
<code>cffi/</code> and <code>base/</code> as appropriate (e.g. WITH-EVENTS). All drawing primitives are
defined in this layer; circles, rectangles, lines, triangles, with-bezier etc.
Functions in <code>sdl/</code> implement a lot of type checking.
</p>
<p>
An example of the difference between <code>base/</code> and <code>sdl/</code> is
WITH-RECTANGLE. The WITH-RECTANGLE macro in <code>base/</code> creates and destroys a foreign
SDL_Rect. The WITH-RECTANGLE macro in <code>sdl/</code> will create and destroy
a RECTANGLE object.
</p>
<br>&nbsp;</br><h3><a class=none name="devintro">Introduction</a></h3>
<h3><a class=none name="devinit">Initialisation of SDL</a></h3>
<p>
The SDL library and SDL subsystems must be initialized prior to use.
This is handled automatically when using the macro <a href="#with-init">WITH-INIT</a>.
<a href="#with-init">WITH-INIT</a> also uninitialises the SDL library upon exit.
More detailed information on the LISPBUILDER-SDL initialisation process can be found in the
documentation for <a href="#with-init">WITH-INIT</a>.
</p>
<pre>
(WITH-INIT (SDL-INIT-VIDEO)
...)
</pre>
<h3><a class=none name="devwin">Creation of the SDL Window</a></h3>
<p>
A window must be created to display any kind of output. A window of a specific pixel width and height
is created using the function <a href="#window">WINDOW</a>. <a href="#window">WINDOW</a> takes
additional keyword parameters to set the requested video mode, color bit depth, the window title and
the icon title.
More detailed information can be found in in the documentation for <a href="#window">WINDOW</a>.
</p>
<pre>
(WITH-INIT (SDL-INIT-VIDEO)
(WINDOW 320 240))
</pre>
<h3><a class=none name="devloop">Handling Events and the Game Loop</a></h3>
<p>
LISPBUILDER-SDL provides the <a href="#with-events">WITH-EVENTS</a> macro that simplifies
the game loop and handling SDL events. Event handlers are defined by specifying the event type a well as an
optional list of fields specific to that event.
</p>
<p>
More detailed information on all SDL events (Keyboard events, Joystick events, User events etc.) can be
found in in the documentation for <a href="#with-events">WITH-EVENTS</a>.
</p>
<p>
For example, to process the current x and y mouse position
when the mouse is moved:
</p>
<pre>
(:MOUSE-MOTION-EVENT (:X X-POS :Y Y-POS)
...)
</pre>
<p>
Or to process the x and y relative mouse positions when the mouse is moved:
</p>
<pre>
(:MOUSE-MOTION-EVENT (:X-REL relative-x :Y-REL relative-y)
...)
</pre>
<p>
The only event that must be handled with <a href="#with-events">WITH-EVENTS</a>
is the :QUIT-EVENT. If :QUIT-EVENT is ignored then it is impossible for the user to close the SDL Window
or exit the game loop.
</p>
<pre>
(WITH-EVENTS ()
(:QUIT-EVENT () T)
(:MOUSE-MOTION-EVENT (:X mouse-x :Y mouse-y)
...))
</pre>
<p>
In addition to handling events, <a href="#with-events">WITH-EVENTS</a> also manages the game loop.
Introducing the :IDLE event. :IDLE, although not technically an actual event, is executed once per game
loop after all events have been processed in the SDL event queue. :IDLE is where the user can place code
that needs to be executed once per game loop and that is not 'event' driven. This code may involve
updating world physics, updating the state of game objects and rendering sprites to the display.
</p>
<pre>
(WITH-EVENTS ()
(:QUIT-EVENT () T)
(:MOUSE-MOTION-EVENT (:X mouse-x :Y mouse-y)
...)
(:IDLE ()
(UPDATE-DISPLAY)))
</pre>
<p>
<a href="#with-events">WITH-EVENTS</a> can also limit execution of the the game loop to a specific number
of iterations a second using <a href="#frame-rate">FRAME-RATE</a>. This effectively limits the number of
frames displayed per second. To set the frame rate to 60 frames per second,
<code>(SETF (SDL:FRAME-RATE) 60)</code>. To unlock the frame rate effectively running the game loop as fast
as the CPU will allow set the FRAME-RATE to NIL, <code>(SETF (SDL:FRAME-RATE) NIL)</code>
</p>
<p>The SDL display surface needs to be updated once per game loop, as described in the section
<a href="#devdisp">SDL Display</a>.
</p>
<pre>
(SETF (FRAME-RATE) 30)
(WITH-EVENTS ()
...)
</pre>
<h3><a class=none name="devprim">Primitives</a></h3>
<p>
LISPBUILDER-SDL supports the SDL <a href="#rectangle">RECTANGLE</a> and <a href="#color">COLOR</a> primitives.
These are described below.
</p>
<h4><a class=none name="devprimrect">Rectangle</a></h4>
<p>
A new rectangle is created by the function <a href="#rectangle">RECTANGLE</a>.
The function <a href="#rectangle-from-edges">RECTANGLE-FROM-EDGES</a> will create a new rectangle
from the specified top left and bottom right coordinates. The function
<a href="#rectangle-from-midpoint-*">RECTANGLE-FROM-MIDPOINT-*</a> will create a new rectangle from midpoint.
</p>
<p>
The macros <a href="#with-rectangle">WITH-RECTANGLE</a> and <a href="#with-rectangle">WITH-RECTANGLEs</a>
will create a new rectangle and free this rectangle when it goes out of scope.
</p>
<p>
The rectangle position and width and height can be inspected and modified using the following functions:
<a href="#x">X</a>, <a href="#y">Y</a>, <a href="#width">WIDTH</a> and <a href="#height">HEIGHT</a>.
<a href="#x2">X2</a> and <a href="#y2">Y2</a> will return the (+ x width) and (+ y height) of the rectangle respectively.
</p>
<p>
Additional functions that operate on rectangles are as follows:
<ul>
<li><a href="#point-*">POINT-*</a></li>
<li><a href="#get-point">GET-POINT</a></li>
<li><a href="#set-point">SET-POINT</a></li>
<li><a href="#position">POSITION</a></li>
<li><a href="#get-position">GET-POSITION</a></li>
<li><a href="#rectangle-*">RECTANGLE-*</a></li>
<li><a href="#get-rectangle">GET-RECTANGLE</a></li>
<li><a href="#set-rectangle">SET-RECTANGLE</a></li>
<li><a href="#draw-box">DRAW-BOX</a>, <a href="#draw-rectangle">DRAW-RECTANGLE</a></li>
</ul>
The section <a href="#devdraw">Drawing</a> describes how to render a rectangle to a surface.
</p>
<h4><a class=none name="devprimcol">Color</a></h4>
<p>
A new SDL color is created by <a href="#color">COLOR</a>, returning either a new RGB or RGBA color.
</p>
<p>
RGB/A color componets can be manipulated using the functions <a href="#r">R</a>, <a href="#g">G</a>,
<a href="#b">B</a>, <a href="#a">A</a>, <a href="#set-color">SET-COLOR</a> and
<a href="#set-color-*">SET-COLOR-*</a>. Two colors may be compared using <a href="#color=">COLOR=</a>.
</p>
<p>
Functions that accept a color parameter will most likely bind color to
<a href="#*default-color*">*DEFAULT-COLOR*</a> when unspecified. The macro
<a href="#with-font">WITH-COLOR</a> will bind a color to <a href="#*default-color*">*DEFAULT-COLOR*</a>
within the scope of this macro. When <a href="#*default-color*">*DEFAULT-COLOR*</a> is bound to a color,
all subsequent drawing functions will use this implied color while it remains in scope.
</p>
<p>
Additional functions that operate on colors are as follows:
<ul>
<li><a href="#color-*">COLOR-*</a></li>
<li><a href="#any-color-but-this">ANY-COLOR-BUT-THIS</a></li>
<li><a href="#map-color">MAP-COLOR</a></li>
<li><a href="#pack-color">PACK-COLOR</a></li>
</ul>
</p>
<p>
LISPBULDER-SDL contains several predefined colors; <a href="#*black*">*BLACK*</a>,
<a href="#*white*">*WHITE*</a>, <a href="#*red*">*RED*</a>, <a href="#*green*">*GREEN*</a>,
<a href="#*blue*">*BLUE*</a>, <a href="#*yellow*">*YELLOW*</a>, <a href="#*cyan*">*CYAN*</a>,
<a href="#*magenta*">*MAGENTA*</a>.
</p>
<h3><a class=none name="devdraw">Drawing</a></h3>
<p>
LISPBUILDER-SDL provides low-level drawing support for several primitives. Most primitives can be drawn
with or without alpha transparency. In addition, the filled primitives can be drawn with a single pixel
outline (or stroke) that is a different color to the fill color.
<ul>
<li>Blitting Surfaces: <a href="#draw-surface">DRAW-SURFACE</a> and
<a href="#blit-surface">BLIT-SURFACE</a></li>
<li>Bezier and Cutmull-Rom Curves: <a href="#draw-bezier">DRAW-BEZIER</a>,
<a href="#draw-shape">DRAW-SHAPE</a>, <a href="#with-bezier">WITH-BEZIER</a>,
<a href="#with-curve">WITH-CURVE</a> and <a href="#draw-curve">DRAW-CURVE</a>.</li>
<li>Boxes and Rectangles: <a href="#draw-box">DRAW-BOX</a>,
<a href="#draw-rectangle">DRAW-RECTANGLE</a></li>
<li>Circles: <a href="#draw-circle">DRAW-CIRCLE</a> and
<a href="#draw-filled-circle">DRAW-FILLED-CIRCLE</a></li>
<li>Lines: <a href="#draw-hline">DRAW-HLINE</a>, <a href="#draw-vline">DRAW-VLINE</a> and
<a href="#draw-line">DRAW-LINE</a></li>
<li>Points: <a href="#draw-point">DRAW-POINT</a></li>
<li>Polygons and Triangles: <a href="#draw-polygon">DRAW-POLYGON</a>,
<a href="#draw-trigon">DRAW-TRIGON</a> and <a href="#with-shape">WITH-SHAPE</a></li>
<li>Filling Surfaces with Color: <a href="#fill-surface">FILL-SURFACE</a></li>
<li>Filling Arbitrary Shapes with Color: <a href="#flood-fill">FLOOD-FILL</a></li>
</ul>
</p>
<p>
Drawing functions require a target surface and color. LISPBUILDER-SDL uses defaults for both
target surface (<a href="#*default-surface*">*DEFAULT-SURFACE*</a>) and color
(<a href="#*default-color*">*DEFAULT-COLOR*</a>) unless these are otherwise specified by the user.
The macros <a href="#with-surface">with-surface</a>, and
<a href="#with-surfaces">with-surfaces</a> will bind a surface to <A HREF="#*DEFAULT-SURFACE*">*DEFAULT-SURFACE*</A> within the scope these
macros. For example, instead of specifying a target surface for each draw-* function a user may bind
<A HREF="#*DEFAULT-SURFACE*">*DEFAULT-SURFACE*</A> to a surface once and subsequent draw-* functions will use this implied surface
while it remains in scope.
</p>
<pre>
(DRAW-POINT (sdl:point :x x1 :y y1) :surface a-surface :color *white*)
(DRAW-POINT (sdl:point :x x2 :y y2) :surface a-surface :color *white*)
(DRAW-POINT (sdl:point :x x3 :y y3) :surface a-surface :color *white*)
(DRAW-POINT (sdl:point :x x4 :y y4) :surface a-surface :color *white*)
</pre>
<p>Now, we use <a href="#with-surface">WITH-SURFACE</a> to bind a surface to <A HREF="#*DEFAULT-SURFACE*">*DEFAULT-SURFACE*</A>.</p>
<pre>
(WITH-SURFACE (a-surface)
(DRAW-POINT (sdl:point :x x1 :y y1) :color *white*)
(DRAW-POINT (sdl:point :x x2 :y y2) :color *white*)
(DRAW-POINT (sdl:point :x x3 :y y3) :color *white*)
(DRAW-POINT (sdl:point :x x4 :y y4) :color *white*))
</pre>
<p>
We can use <a href="#with-color">WITH-COLOR</a> to bind <A HREF="#*DEFAULT-COLOR*">*DEFAULT-COLOR*</A> to
<a href="#*white*">*WHITE*</a>:
</p>
<pre>
(WITH-SURFACE (a-surface)
(WITH-COLOR (*white*)
(DRAW-POINT (sdl:point :x x1 :y y1))
(DRAW-POINT (sdl:point :x x2 :y y2))
(DRAW-POINT (sdl:point :x x3 :y y3))
(DRAW-POINT (sdl:point :x x4 :y y4)))
</pre>
<p>
Finally, if the target surface is the display then <A HREF="#WITH-SURFACE">*WITH-SURFACE*</A> is not required as :SURFACE when NIL
will be bound to <A HREF="#*DEFAULT-DISPLAY*">*DEFAULT-DISPLAY*</A> as a default. So the above code can be shortened as follows:
</p>
<pre>
(WITH-COLOR (*white*)
(DRAW-POINT (sdl:point :x x1 :y y1))
(DRAW-POINT (sdl:point :x x2 :y y2))
(DRAW-POINT (sdl:point :x x3 :y y3))
(DRAW-POINT (sdl:point :x x4 :y y4)))
</pre>
<h3><a class=none name="font">Fonts</a></h3>
<p>
LISPBUILDER-SDL contains several bitmap fonts of different sizes and faces (italics/bolded). See
<a href="#initialise-font">INITIALISE-FONT</a> for the complete list of built-in fonts.
</p>
<h4><a class=none name="fontinit">Initialisation</a></h3>
<p>
Fonts are initialised using <a href="#initialise-default-font">INITIALISE-DEFAULT-FONT</a>, or
<a href="#initialise-font">INITIALISE-FONT</a>. The resouces allocated to a font are freed by
<a href="#free-font">FREE-FONT</a>. A font must be initialised prior to use.
</p>
<p>
LISPBUILDER-SDL provides the macros <a href="#with-default-font">WITH-DEFAULT-FONT</a> and
<a href="#with-font">WITH-FONT</a> for the above functions that bind
<a href="#*default-font*">*DEFAULT-FONT*</a> to font within the scope of the macro.
<p>
<h4><a class=none name="fontrend">Rendering Text</a></h3>
<p>
LISPBUILDER-SDL supports the rendering of colored text over a transparent background (Solid rendering),
and the rendering of colored text over a solid colored background (Shaded rendering). Text may be left, right or
center justified. Text can be drawn directly to a target surface using
<a href="#draw-string-solid">DRAW-STRING-SOLID</a> and <a href="#draw-string-shaded">DRAW-STRING-SHADED</a>.
Text can be rendered to a new surface of character height and string width using
<a href="#render-string-solid">RENDER-STRING-SOLID</a> and
<a href="#render-string-shaded">RENDER-STRING-SHADED</a>. This new surface may be optionally cached in the
font object. A cached surface font can be accessed using <a href="#cached-surface">CACHED-SURFACE</a>) and can
be blitted to a target surface using <a href="#draw-font">DRAW-FONT</a>.
</p>
<p>
The font rendering functions accept a font object. This font parameter is bound to
<a href="#*default-font*">*DEFAULT-FONT*</a> when unspecified. The function
<a href="#initialise-default-font">INITIALISE-DEFAULT-FONT</a> and the macros
<a href="#with-font">WITH-FONT</a> and <a href="#with-default-font">WITH-DEFAULT-FONT</a> will bind a
font to <a href="#*default-font*">*DEFAULT-FONT*</a> within the scope of these macros. When
<a href="#*default-font*">*DEFAULT-FONT*</a> is bound to a font, all subsequent font drawing
or font rendering functions will use this implied font while it remains in scope.
</p>
<p>The following methods also apply to fonts; <a href="#x">X</a>, <a href="#y">Y</a>,
<a href="#width">WIDTH</a>, <a href="#height">HEIGHT</a>, Returns the width of the cached [SURFACE](#surface) when `OBJ` is a [FONT](#font).
<pre>
(WITH-COLOR (*WHITE*)
(WITH-FONT (*FONT-8x8*)
(DRAW-STRING-SOLID-* "Font is 8x8." 10 10)
(WITH-FONT (*FONT-10x20*)
(DRAW-STRING-SOLID-* "Font is 10x20." 10 20))
(DRAW-STRING-SOLID-* "Font is 8x8 again." 10 40)))
</pre>
<h3><a class=none name="devsurf">Surfaces</a></h3>
<p>
</p>
<h4><a class=none name="devsurfover">Overview of Surfaces</a></h4>
<p>
An SDL surface, <a href="#surface">SURFACE</a>, represents an area of <em>graphical</em> memory
that can be drawn or rendered to, for example the video framebuffer or an image that is loaded from disk.
</p>
<h4><a class=none name="devsurfcreat">Creating Surfaces</a></h4>
<p>
A surface is created:
<ul>
<li>Automatically by the SDL library to represent a framebuffer by
calling <a href="#window">WINDOW</a>.</li>
<li>When loading an image from disk using <a href="#load-image">LOAD-IMAGE</a>.</li>
<li>Explicitely using <a href="#create-surface">CREATE-SURFACE</a>, or
<a href="#copy-surface">COPY-SURFACE</a>.</li>
<li>Implicitely using <a href="#convert-surface">CONVERT-SURFACE</a>.</li>
</ul>
</p>
<p>
Functions that accept a surface parameter will most likely bind surface to
<a href="#*default-surface*">*DEFAULT-SURFACE*</a> when unspecified.
The macros <a href="#with-surface">WITH-SURFACE</a> and <a href="#with-surfaces">WITH-SURFACES</a> will bind a
surface to <a href="#*default-surface*">*DEFAULT-SURFACE*</a> within the scope of these macro.
When <a href="#*default-surface*">*DEFAULT-SURFACE*</a> is bound to a surface,
all subsequent drawing functions will use this implied surface while it remains in scope.
</p>
<p>
A surface can be explicitely freed by calling <a href="#free-surface">FREE-SURFACE</a>.
</p>
<h4><a class=none name="devsurfload">Images</a></h4>
<p>
BMP images are loaded from disk using <a href="#load-image">LOAD-IMAGE</a>. Support for additional
image formats is provided in the <a href="lispbuilder-sdl-image.html">LISPBUILDER-SDL-IMAGE</a> package.
A surface is saved to disk as a BMP image using <a href="#save-image">SAVE-IMAGE</a>.
</p>
<pre>
(DRAW-SURFACE (LOAD-IMAGE "sdl.bmp")
:surface *default-display*)
</pre>
<h4><a class=none name="devsurfpos">Positioning Surfaces</a></h4>
<p>
A <a href="#surface">SURFACE</a> stores its own position X/Y coordinates. These coordinates
can be inspected and modified using the following functions:
<a href="#x">X</a>, <a href="#y">Y</a>, <a href="#width">WIDTH</a> and <a href="#height">HEIGHT</a>.
</p>
<p>
Additional functions and macros that manage surface coordinates are as follows:
<ul>
<li><a href="#point-*">POINT-*</a></li>
<li><a href="#get-point">GET-POINT</a></li>
<li><a href="#set-point">SET-POINT</a></li>
<li><a href="#set-point-*">SET-POINT-*</a></li>
<li><a href="#position-*">POSITION-*</a></li>
<li><a href="#get-position">GET-POSITION</a></li>
<li><a href="#set-position-*">GET-POSITION</a></li>
<li><a href="#set-surface">SET-SURFACE</a></li>
<li><a href="#set-surface-*">SET-SURFACE-*</a></li>
<li><a href="#rectangle-*">RECTANGLE-*</a></li>
<li><a href="#get-rectangle-*">GET-RECTANGLE-*</a></li>
<li><a href="#get-surface-rect">GET-SURFACE-RECT</a></li>
<li><a href="#draw-surface-at">DRAW-SURFACE-AT</a></li>
</ul>
</p>
<h4><a class=none name="devsurfblit">Drawing & Blitting Surfaces</a></h4>
<p>The functions <a href="#blit-surface">BLIT-SURFACE</a> and <a href="#draw-surface">DRAW-SURFACE</a> will
blit or draw a source surface onto a destination surface using the position coordinates stored in the source surface.
<a href="#draw-surface-at">DRAW-SURFACE-AT</a> will draw the source surface at a specified position.
</p>
<p>
The composition rules that determine how the source surface is composed over the destination surface are
described in the description of <a href="#blit-surface">BLIT-SURFACE</a>.
<a href="#fill-surface">FILL-SURFACE</a> fill will the target surface with a single color.
<a href="#devprim">Drawing Primitives</a> describes how <a href="#*default-surface*">*DEFAULT-SURFACE*</a>
is used when calling blitting operations.
</p>
<p>
Use <a href="#set-color-key">SET-COLOR-KEY</a>, <a href="#clear-color-key">CLEAR-COLOR-KEY</a> and
<a href="#set-alpha">SET-ALPHA</a> to modify the key color and alpha transparency properties of a surface after the
surface has been created.
</p>
<p>
Set a <em>clipping</em> rectangle to limit the draw area on a destination surface.
The clipping rectangle for a surface is manipulated using <a href="#get-clip-rect">GET-CLIP-RECT</a> and
<a href="#set-clip-rect">SET-CLIP-RECT</a>. When this surface is the destination of a blit,
only the area within the <em>clip</em> rectangle will be drawn into.
</p>
<p>
Set a <em>cell</em> rectangle to limit the surface area on the source surface.
The cell rectangle for a surface is manipulated using <a href="#clear-cell">CLEAR-CELL</a> and
<a href="#set-cell">SET-CELL</a>. When this surface is the source of a blit,
only the areas within the <em>cell</em> rectangle will be used.
The cell is useful when only a small area of the source surface needs to be blitted to the destination surface.
For example a sequence of images composed into a single sprite sheet and only the current frame of animation
is to be drawn to the display at any one time.
</p>
<p>
<img src="waddle.png" width="285" height="51" title="Sprite Sheet" alt="Sprite Sheet"/>
</p>
<h4><a class=none name="devupdate">Updating SDL Surfaces and the SDL Display</a></h4>
<p>
The functions <a href="#update-display">UPDATE-DISPLAY</a> and <a href="#update-surface">UPDATE-SURFACE</a>
update the SDL display surface (or OpenGL context) and general SDL surfaces respectively.
</p>
<h3><a class=none name="devdisp">The SDL Display</a></h3>
<p>
The SDL display surface must be updated at least once each game loop using the function
<a href="#update-display">UPDATE-DISPLAY</a>. This function will call
<a href="#sdl-gl-swap-buffers">SDL-GL-SWAP-BUFFERS</a> to update the OpenGL display,
or <a href="#sdl-flip">SDL-FLIP</a> to update the SDL surface depending on the current
<a href="#*opengl-context*">*OPENGL-CONTEXT*</a>. The display can be filled with a background
color using <a href="#clear-display">CLEAR-DISPLAY</a>.
</p>
<p>
The properties of an SDL surface can be queried using <a href="#surface-info">SURFACE-INFO</a>.
The properties of the SDL display and video hardware can be queried using <a href="#video-info">VIDEO-INFO</a>.
The screen resolutions supported by a particular set of video flags can be retrieved using
<a href="#list-modes">LIST-MODES</a>. A pointer to the native SDL window can be retrieved using
<a href="#get-native-window">GET-NATIVE-WINDOW</a>. The name of the video driver can be retrieved as a STRING
using <a href="#video-driver-name">VIDEO-DRIVER-NAME</a>.
<h3><a class=none name="devcursor">The Cursor</a></h3>
<p>
The the current state of the cursor is returned using <a href="#query-cursor">QUERY-CURSOR</a>, and is set using
<a href="#query-cursor">SHOW-CURSOR</a>.
</p>
<h3><a class=none name="devex">Simple Example</a></h3>
<p>
Putting this all together, we can write short example showing a white rectangle that follows the users mouse
movements within an SDL Window. Exit the example by closing the window or pressing the Esc key on the keyboard.
</p>
<pre>
;; Initialise SDL and the Video subsystem
(WITH-INIT (SDL-INIT-VIDEO)
(WINDOW 320 240) ; Open a window, 320 x 240
(SETF (FRAME-RATE) 30) ; Lock the frame rate to 30 fps
(WITH-EVENTS ()
(:QUIT-EVENT () T) ; Absolutely have to handle the :QUIT-EVENT
(:KEY-DOWN-EVENT (:KEY key) (WHEN (KEY= key :SDL-KEY-ESCAPE) (PUSH-QUIT-EVENT)))
(:MOUSE-MOTION-EVENT (:X mouse-x :Y mouse-y)
(CLEAR-DISPLAY *black*)
;; Draw the box with center at the mouse x/y coordinates.
(DRAW-BOX-* (- mouse-x (/ 50 2)) (- mouse-y (/ 50 2)) 50 50 :color *white*))
(:IDLE ()
(UPDATE-DISPLAY))))
</pre>
<h3><a class=none name="devgarbage">Object Lifecycles and Garbage Collection</a></h3>
<p>
...
</p>
<br>&nbsp;</br><h3><a class=none name="dictionary">The LISPBUILDER-SDL dictionary</a></h3>
<!-- Entry for *BLACK* -->
<p><br>[Special variable]<br><a class=none name='*black*'><b>*black*</b></a>
<blockquote><br>
<p><code>RGB</code><a href="#color">COLOR</a> black. </p>
</blockquote>
<!-- End of entry for *BLACK* -->
<!-- Entry for *BLUE* -->
<p><br>[Special variable]<br><a class=none name='*blue*'><b>*blue*</b></a>
<blockquote><br>
<p><code>RGB</code><a href="#color">COLOR</a> blue. </p>
</blockquote>
<!-- End of entry for *BLUE* -->
<!-- Entry for *CYAN* -->
<p><br>[Special variable]<br><a class=none name='*cyan*'><b>*cyan*</b></a>
<blockquote><br>
<p><code>RGB</code><a href="#color">COLOR</a> cyan. </p>
</blockquote>
<!-- End of entry for *CYAN* -->
<!-- Entry for *DEFAULT-COLOR* -->
<p><br>[Special variable]<br><a class=none name='*default-color*'><b>*default-color*</b></a>
<blockquote><br>
<p>Functions that accept the <code>KEY</code>word parameter <code>COLOR</code> will most likely bind to the symbol <code>*DEFAULT-COLOR*</code> by default if <code>COLOR</code> is not specified. </p><p>A color is bound to <code>*DEFAULT-COLOR*</code> by the following macro: <a href="#with-color">WITH-COLOR</a>. </p><h5>Example </h5>
<pre><code>(DRAW-BOX A-BOX :SURFACE SDL:DEFAULT-DISPLAY* :COLOR SDL:*BLACK*)
(DRAW-BOX B-BOX :SURFACE SDL:DEFAULT-DISPLAY* :COLOR SDL:*BLACK*)
(DRAW-BOX C-BOX :SURFACE SDL:DEFAULT-DISPLAY* :COLOR SDL:*BLACK*)
</code></pre><p>The above can be shortened by setting <code>*DEFAULT-COLOR*</code> to <code>*BLACK*</code>. </p><pre><code>(WITH-SURFACE (DISP SDL:*DEFAULT-DISPLAY*)
(WITH-COLOR (COL SDL:*BLACK*)
(DRAW-BOX A-BOX)
(DRAW-BOX B-BOX)
(DRAW-BOX C-BOX)))
</code></pre>
</blockquote>
<!-- End of entry for *DEFAULT-COLOR* -->
<!-- Entry for *DEFAULT-DISPLAY* -->
<p><br>[Special variable]<br><a class=none name='*default-display*'><b>*default-display*</b></a>
<blockquote><br>
<p>The symbol <code>*DEFAULT-DISPLAY*</code> is bound to the current display surface <a href="#display-surface">DISPLAY-SURFACE</a>) by the function <a href="#WINDOW">WINDOW</a>). </p>
</blockquote>
<!-- End of entry for *DEFAULT-DISPLAY* -->
<!-- Entry for *DEFAULT-FONT* -->
<p><br>[Special variable]<br><a class=none name='*default-font*'><b>*default-font*</b></a>
<blockquote><br>
<p>Functions that accept the <code>KEY</code>word parameter <code>FONT</code> will most likely bind to the symbol <code>*DEFAULT-FONT*</code> by default if <code>FONT</code> is not specified. </p><p>A font is bound to <code>*DEFAULT-FONT*</code> by the following; <a href="#with-default-font">WITH-DEFAULT-FONT</a>, <a href="#with-font">WITH-FONT</a> and <a href="#initialise-default-font">INITIALISE-DEFAULT-FONT</a>. </p><h5>Example </h5>
<pre><code>(draw-string-solid-* &amp;quot;draw string centered&amp;quot; 100 100
:justify :center :color sdl:*white* :font a-font)
(draw-string-solid-* &amp;quot;draw string left&amp;quot; 100 100
:justify :left :color sdl:*white* :font a-font)
(draw-string-solid-* &amp;quot;draw string right&amp;quot; 100 100
:justify :right :color sdl:*white* :font a-font)
</code></pre><p>The above can be shortened by setting <code>*DEFAULT-FONT*</code> to <code>a-font</code>. </p><pre><code>(WITH-DEFAULT-FONT (a-font)
(WITH-COLOR (COL SDL:*WHITE*)
(DRAW-STRING-SOLID-* &amp;quot;draw string centered&amp;quot; 100 100 :JUSTIFY :CENTER)
(DRAW-STRING-SOLID-* &amp;quot;draw string left&amp;quot; 100 100 :JUSTIFY :LEFT)
(DRAW-STRING-SOLID-* &amp;quot;draw string right&amp;quot; 100 100 :JUSTIFY :RIGHT)))
</code></pre>
</blockquote>
<!-- End of entry for *DEFAULT-FONT* -->
<!-- Entry for *DEFAULT-FONT-PATH* -->
<p><br>[Special variable]<br><a class=none name='*default-font-path*'><b>*default-font-path*</b></a>
<blockquote><br>
<p>The path to any fonts used in teh <code>LISPBUILDER-SDL</code> packages. </p>
</blockquote>
<!-- End of entry for *DEFAULT-FONT-PATH* -->
<!-- Entry for *DEFAULT-POSITION* -->
<p><br>[Special variable]<br><a class=none name='*default-position*'><b>*default-position*</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for *DEFAULT-POSITION* -->
<!-- Entry for *DEFAULT-RECTANGLE* -->
<p><br>[Special variable]<br><a class=none name='*default-rectangle*'><b>*default-rectangle*</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for *DEFAULT-RECTANGLE* -->
<!-- Entry for *DEFAULT-SURFACE* -->
<p><br>[Special variable]<br><a class=none name='*default-surface*'><b>*default-surface*</b></a>
<blockquote><br>
<p>Functions that accept the <code>KEY</code>word parameter <code>:SURFACE</code> will most likely bind to the symbol <code>*DEFAULT-SURFACE*</code> by default if <code>SURFACE</code> is not specified. </p><p>A surface is bound to <code>*DEFAULT-SURFACE*</code> by the following macros: <a href="#with-surface">WITH-SURFACE</a>, and <a href="#with-surfaces">WITH-SURFACES</a>. </p><h5>Example </h5>
<pre><code>(DRAW-SURFACE SURF-1 :SURFACE SDL:*DEFAULT-DISPLAY*)
(DRAW-SURFACE SURF-2 :SURFACE SDL:*DEFAULT-DISPLAY*)
(DRAW-SURFACE SURF-2 :SURFACE SDL:*DEFAULT-DISPLAY*)
</code></pre><p>The above can be shortened using by setting the <code>*DEFAULT-SURFACE*</code> to the display surface. </p><pre><code>(WITH-SURFACE (DISP SDL:*DEFAULT-DISPLAY*)
(DRAW-SURFACE SURF-1)
(DRAW-SURFACE SURF-2)
(DRAW-SURFACE SURF-2))
</code></pre>
</blockquote>
<!-- End of entry for *DEFAULT-SURFACE* -->
<!-- Entry for *EXTERNAL-INIT-ON-STARTUP* -->
<p><br>[Special variable]<br><a class=none name='*external-init-on-startup*'><b>*external-init-on-startup*</b></a>
<blockquote><br>
<p>The list of functions that are called from <a href="#init-sdl">INIT-SDL</a>. </p>
</blockquote>
<!-- End of entry for *EXTERNAL-INIT-ON-STARTUP* -->
<!-- Entry for *EXTERNAL-QUIT-ON-EXIT* -->
<p><br>[Special variable]<br><a class=none name='*external-quit-on-exit*'><b>*external-quit-on-exit*</b></a>
<blockquote><br>
<p>The list of functions that are called from <a href="#quit-sdl">QUIT-SDL</a>. </p>
</blockquote>
<!-- End of entry for *EXTERNAL-QUIT-ON-EXIT* -->
<!-- Entry for *FONT-10X20* -->
<p><br>[Special variable]<br><a class=none name='*font-10x20*'><b>*font-10x20*</b></a>
<blockquote><br>
<p>Contains the font data for an 10x20 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-10X20* -->
<!-- Entry for *FONT-5X7* -->
<p><br>[Special variable]<br><a class=none name='*font-5x7*'><b>*font-5x7*</b></a>
<blockquote><br>
<p>Contains the font data for an 5x7 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-5X7* -->
<!-- Entry for *FONT-5X8* -->
<p><br>[Special variable]<br><a class=none name='*font-5x8*'><b>*font-5x8*</b></a>
<blockquote><br>
<p>Contains the font data for an 5x8 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-5X8* -->
<!-- Entry for *FONT-6X10* -->
<p><br>[Special variable]<br><a class=none name='*font-6x10*'><b>*font-6x10*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x10 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-6X10* -->
<!-- Entry for *FONT-6X12* -->
<p><br>[Special variable]<br><a class=none name='*font-6x12*'><b>*font-6x12*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x12 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-6X12* -->
<!-- Entry for *FONT-6X13* -->
<p><br>[Special variable]<br><a class=none name='*font-6x13*'><b>*font-6x13*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x13 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-6X13* -->
<!-- Entry for *FONT-6X13B* -->
<p><br>[Special variable]<br><a class=none name='*font-6x13b*'><b>*font-6x13b*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x13 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-6X13B* -->
<!-- Entry for *FONT-6X13O* -->
<p><br>[Special variable]<br><a class=none name='*font-6x13o*'><b>*font-6x13o*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x13 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-6X13O* -->
<!-- Entry for *FONT-6X9* -->
<p><br>[Special variable]<br><a class=none name='*font-6x9*'><b>*font-6x9*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x9 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-6X9* -->
<!-- Entry for *FONT-7X13* -->
<p><br>[Special variable]<br><a class=none name='*font-7x13*'><b>*font-7x13*</b></a>
<blockquote><br>
<p>Contains the font data for an 7x13 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-7X13* -->
<!-- Entry for *FONT-7X13B* -->
<p><br>[Special variable]<br><a class=none name='*font-7x13b*'><b>*font-7x13b*</b></a>
<blockquote><br>
<p>Contains the font data for an 7x13 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-7X13B* -->
<!-- Entry for *FONT-7X13O* -->
<p><br>[Special variable]<br><a class=none name='*font-7x13o*'><b>*font-7x13o*</b></a>
<blockquote><br>
<p>Contains the font data for an 7x13 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-7X13O* -->
<!-- Entry for *FONT-7X14* -->
<p><br>[Special variable]<br><a class=none name='*font-7x14*'><b>*font-7x14*</b></a>
<blockquote><br>
<p>Contains the font data for an 7x14 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-7X14* -->
<!-- Entry for *FONT-7X14B* -->
<p><br>[Special variable]<br><a class=none name='*font-7x14b*'><b>*font-7x14b*</b></a>
<blockquote><br>
<p>Contains the font data for an 7x14 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-7X14B* -->
<!-- Entry for *FONT-8X13* -->
<p><br>[Special variable]<br><a class=none name='*font-8x13*'><b>*font-8x13*</b></a>
<blockquote><br>
<p>Contains the font data for an 8x13 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-8X13* -->
<!-- Entry for *FONT-8X13B* -->
<p><br>[Special variable]<br><a class=none name='*font-8x13b*'><b>*font-8x13b*</b></a>
<blockquote><br>
<p>Contains the font data for an 8x13 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-8X13B* -->
<!-- Entry for *FONT-8X13O* -->
<p><br>[Special variable]<br><a class=none name='*font-8x13o*'><b>*font-8x13o*</b></a>
<blockquote><br>
<p>Contains the font data for an 8x13 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-8X13O* -->
<!-- Entry for *FONT-8X8* -->
<p><br>[Special variable]<br><a class=none name='*font-8x8*'><b>*font-8x8*</b></a>
<blockquote><br>
<p>Contains the font data for an 8x8 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-8X8* -->
<!-- Entry for *FONT-9X15* -->
<p><br>[Special variable]<br><a class=none name='*font-9x15*'><b>*font-9x15*</b></a>
<blockquote><br>
<p>Contains the font data for an 9x15 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-9X15* -->
<!-- Entry for *FONT-9X15B* -->
<p><br>[Special variable]<br><a class=none name='*font-9x15b*'><b>*font-9x15b*</b></a>
<blockquote><br>
<p>Contains the font data for an 9x15 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-9X15B* -->
<!-- Entry for *FONT-9X18* -->
<p><br>[Special variable]<br><a class=none name='*font-9x18*'><b>*font-9x18*</b></a>
<blockquote><br>
<p>Contains the font data for an 9x18 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-9X18* -->
<!-- Entry for *FONT-9X18B* -->
<p><br>[Special variable]<br><a class=none name='*font-9x18b*'><b>*font-9x18b*</b></a>
<blockquote><br>
<p>Contains the font data for an 9x18 bitmap font. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for *FONT-9X18B* -->
<!-- Entry for *GREEN* -->
<p><br>[Special variable]<br><a class=none name='*green*'><b>*green*</b></a>
<blockquote><br>
<p><code>RGB</code><a href="#color">COLOR</a> green. </p>
</blockquote>
<!-- End of entry for *GREEN* -->
<!-- Entry for *MAGENTA* -->
<p><br>[Special variable]<br><a class=none name='*magenta*'><b>*magenta*</b></a>
<blockquote><br>
<p><code>RGB</code><a href="#color">COLOR</a> magenta. </p>
</blockquote>
<!-- End of entry for *MAGENTA* -->
<!-- Entry for *OPENGL-CONTEXT* -->
<p><br>[Special variable]<br><a class=none name='*opengl-context*'><b>*opengl-context*</b></a>
<blockquote><br>
<p>The symbol <code>*OPENGL-CONTEXT*</code> is <code>T</code> when an OpenGL display context is created, and <code>NIL</code> otherwise. <a href="#update-surface">UPDATE-SURFACE</a> will swap the <code>OPENGL</code> buffers when <code>*OPENGL-CONTEXT*</code> is <code>T</code>, and swap the <code>SDL</code> video buffers otherwise. </p>
</blockquote>
<!-- End of entry for *OPENGL-CONTEXT* -->
<!-- Entry for *RED* -->
<p><br>[Special variable]<br><a class=none name='*red*'><b>*red*</b></a>
<blockquote><br>
<p><code>RGB</code><a href="#color">COLOR</a> red. </p>
</blockquote>
<!-- End of entry for *RED* -->
<!-- Entry for *SDL-INITIALIZED* -->
<p><br>[Special variable]<br><a class=none name='*sdl-initialized*'><b>*sdl-initialized*</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for *SDL-INITIALIZED* -->
<!-- Entry for *WHITE* -->
<p><br>[Special variable]<br><a class=none name='*white*'><b>*white*</b></a>
<blockquote><br>
<p><code>RGB</code><a href="#color">COLOR</a> white. </p>
</blockquote>
<!-- End of entry for *WHITE* -->
<!-- Entry for *YELLOW* -->
<p><br>[Special variable]<br><a class=none name='*yellow*'><b>*yellow*</b></a>
<blockquote><br>
<p><code>RGB</code><a href="#color">COLOR</a> yellow. </p>
</blockquote>
<!-- End of entry for *YELLOW* -->
<!-- Entry for A -->
<p><br>[Generic accessor]<br><a class=none name='a'><b>a</b> <i>color</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>a</b> <i>color</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the alpha color component of the object. </p>
</blockquote>
<!-- End of entry for A -->
<!-- Entry for ALL-INTEGERS? -->
<p><br>[Macro]<br><a class=none name='all-integers?'><b>all-integers?</b> <i><tt>&amp;rest</tt> values</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if all values are <code>INTEGERS</code>. </p>
</blockquote>
<!-- End of entry for ALL-INTEGERS? -->
<!-- Entry for ALPHA -->
<p><br>[Generic accessor]<br><a class=none name='alpha'><b>alpha</b> <i>surface</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>alpha</b> <i>surface</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for ALPHA -->
<!-- Entry for ALPHA -->
<p><br>[Specialized accessor]<br><a class=none><b>alpha</b> <i>(surface sdl-surface)</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>alpha</b> <i>(surface sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for ALPHA -->
<!-- Entry for ALPHA-ENABLED-P -->
<p><br>[Generic accessor]<br><a class=none name='alpha-enabled-p'><b>alpha-enabled-p</b> <i>surface</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>alpha-enabled-p</b> <i>surface</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for ALPHA-ENABLED-P -->
<!-- Entry for ALPHA-ENABLED-P -->
<p><br>[Specialized accessor]<br><a class=none><b>alpha-enabled-p</b> <i>(surface sdl-surface)</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>alpha-enabled-p</b> <i>(surface sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for ALPHA-ENABLED-P -->
<!-- Entry for ANY-COLOR-BUT-THIS -->
<p><br>[Generic function]<br><a class=none name='any-color-but-this'><b>any-color-but-this</b> <i>color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a new color that is different to <code>COLOR</code>. </p>
</blockquote>
<!-- End of entry for ANY-COLOR-BUT-THIS -->
<!-- Entry for AVERAGE-FPS -->
<p><br>[Function]<br><a class=none name='average-fps'><b>average-fps</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the average frame rate of the event loop calculated over a sliding window of 100 frames. </p>
</blockquote>
<!-- End of entry for AVERAGE-FPS -->
<!-- Entry for B -->
<p><br>[Generic accessor]<br><a class=none name='b'><b>b</b> <i>color</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>b</b> <i>color</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the blue color component of the object. </p>
</blockquote>
<!-- End of entry for B -->
<!-- Entry for BIT-DEPTH -->
<p><br>[Function]<br><a class=none name='bit-depth'><b>bit-depth</b> <i><tt>&amp;optional</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the number of bytes per pixel, or bpp, of <code>SURFACE</code>. </p>
</blockquote>
<!-- End of entry for BIT-DEPTH -->
<!-- Entry for BITMAP-FONT -->
<p><br>[Standard class]<br><a class=none name='bitmap-font'><b>bitmap-font</b></a>
<blockquote><br>
<p>The <code>BITMAP-FONT</code> object manages the resources for a bitmap font. Prior to the first call to a <code>RENDER-STRING*</code> function, the cached <a href="#surface">SURFACE</a> is <code>NIL</code>. </p><p>The cached surface is created by a call to any of the RENDER-STRING* functions. Use <a href="#draw-font">DRAW-FONT</a>, <a href="#draw-font-at">DRAW-FONT-AT</a> or <a href="#draw-font-at-*">DRAW-FONT-AT-*</a> to draw the cached surface. </p><p>Free using <a href="#free">FREE</a></p>
</blockquote>
<!-- End of entry for BITMAP-FONT -->
<!-- Entry for BLIT-SURFACE -->
<p><br>[Function]<br><a class=none name='blit-surface'><b>blit-surface</b> <i>source <tt>&amp;optional</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Performs a fast blit of the <code>SOURCE</code> surface to the destination <code>SURFACE</code>. The area defined by the <code>SOURCE</code> cell is blitted to the area defined by the destination clipping rectangle. The blit function should not be called on a locked surface. The results of blitting operations vary greatly depending on whether a surface ALPHA channel is set on the source surface or not. The priorty of how color key and alpha attributes interact with surface blitting is as follows: </p><ul><li>source surface with <code>ALPHA</code> + <code>PIXEL-ALPHA</code>: Blit using per-pixel alpha only </li>
<li>source surface with <code>ALPHA</code> + <code>COLOR-KEY</code>: Blit using the colour key AND the per-surface alpha value </li>
<li>source surface with <code>ALPHA</code>: Blit using the colour key AND the per-surface alpha value </li>
<li>source surface with <code>COLOR-KEY</code>: Blit using the colour key </li>
<li>source surface: Blit using opaque rectangular blit </li>
</ul><p>An ALPHA channel has the following effect on blitting operations: </p><ul><li><STRONG>RGBA to RGB</STRONG> with <a href="#alpha-enabled-p">ALPHA-ENABLED-P</a>: The source is alpha-blended with the destination, using the alpha channel. <a href="#color-key-enabled-p">COLOR-KEY-ENABLED-P</a> and the per-surface alpha are ignored. </li>
<li><STRONG>RGBA to RGB</STRONG> without <a href="#alpha-enabled-p">ALPHA-ENABLED-P</a>: The RGB data is copied from the source. The source alpha channel and the per-surface alpha value are ignored. If <a href="#color-key-enabled-p">COLOR-KEY-ENABLED-P</a> is set, only the pixels not matching the colorkey value are copied. </li>
<li><STRONG>RGB to RGBA</STRONG> with <a href="#alpha-enabled-p">ALPHA-ENABLED-P</a>: The source is alpha-blended with the destination using the per-surface alpha value. If <a href="#color-key-enabled-p">COLOR-KEY-ENABLED-P</a> is set, only the pixels not matching the colorkey value are copied. The alpha channel of the copied pixels is set to opaque. </li>
<li><STRONG>RGB to RGBA</STRONG> without <a href="#alpha-enabled-p">ALPHA-ENABLED-P</a>: The RGB data is copied from the source and the alpha value of the copied pixels is set to opaque. If <a href="#color-key-enabled-p">COLOR-KEY-ENABLED-P</a> is set, only the pixels not matching the colorkey value are copied. </li>
<li><STRONG>RGBA to RGBA</STRONG> with <a href="#alpha-enabled-p">ALPHA-ENABLED-P</a>: The source is alpha-blended with the destination using the source alpha channel. The alpha channel in the destination surface is left untouched. <a href="#color-key-enabled-p">COLOR-KEY-ENABLED-P</a> is ignored. </li>
<li><STRONG>RGBA to RGBA</STRONG> without <a href="#alpha-enabled-p">ALPHA-ENABLED-P</a>: The RGBA data is copied to the destination surface. If <a href="#color-key-enabled-p">COLOR-KEY-ENABLED-P</a> is set, only the pixels not matching the colorkey value are copied. </li>
<li><STRONG>RGB to RGB</STRONG> with <a href="#alpha-enabled-p">ALPHA-ENABLED-P</a>: The source is alpha-blended with the destination using the per-surface alpha value. If <a href="#color-key-enabled-p">COLOR-KEY-ENABLED-P</a> is set, only the pixels not matching the colorkey value are copied. </li>
<li><STRONG>RGB to RGB</STRONG> without <a href="#alpha-enabled-p">ALPHA-ENABLED-P</a>: The RGB data is copied from the source. If <a href="#color-key-enabled-p">COLOR-KEY-ENABLED-P</a> is set, only the pixels not matching the colorkey value are copied. </li>
</ul><p><EM>Note</EM>: <STRONG>RGBA to RGBA</STRONG> blits (with <a href="#alpha-enabled-p">ALPHA-ENABLED-P</a> set) keep the alpha of the destination surface. This means that you cannot compose two arbitrary <STRONG>RGBA</STRONG> surfaces this way and get the result you would expect from &quot;overlaying&quot; them; the destination alpha will work as a mask. </p>
</blockquote>
<!-- End of entry for BLIT-SURFACE -->
<!-- Entry for CACHED-SURFACE -->
<p><br>[Generic accessor]<br><a class=none name='cached-surface'><b>cached-surface</b> <i>sdl-font</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>cached-surface</b> <i>sdl-font</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CACHED-SURFACE -->
<!-- Entry for CACHED-SURFACE -->
<p><br>[Specialized accessor]<br><a class=none><b>cached-surface</b> <i>(sdl-font sdl-font)</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>cached-surface</b> <i>(sdl-font sdl-font)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CACHED-SURFACE -->
<!-- Entry for CAST -->
<p><br>[Macro]<br><a class=none name='cast'><b>cast</b> <i>type value</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Coerces the value <code>VALUE</code> to the type <code>TYPE</code>. </p>
</blockquote>
<!-- End of entry for CAST -->
<!-- Entry for CAST-ALL-TO-INT -->
<p><br>[Macro]<br><a class=none name='cast-all-to-int'><b>cast-all-to-int</b> <i><tt>&amp;rest</tt> values</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Casts the values in <code>REST</code> to <code>FIXNUM</code>s. </p>
</blockquote>
<!-- End of entry for CAST-ALL-TO-INT -->
<!-- Entry for CAST-TO-INT -->
<p><br>[Macro]<br><a class=none name='cast-to-int'><b>cast-to-int</b> <i>value</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Casts the value <code>VALUE</code> to a <code>FIXNUM</code>. </p>
</blockquote>
<!-- End of entry for CAST-TO-INT -->
<!-- Entry for CATMULL-ROM-SPLINE -->
<p><br>[Function]<br><a class=none name='catmull-rom-spline'><b>catmull-rom-spline</b> <i>val v0 v1 v2 v3</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CATMULL-ROM-SPLINE -->
<!-- Entry for CHAR-HEIGHT -->
<p><br>[Generic function]<br><a class=none name='char-height'><b>char-height</b> <i>bitmap-font</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CHAR-HEIGHT -->
<!-- Entry for CHAR-HEIGHT -->
<p><br>[Method]<br><a class=none><b>char-height</b> <i>(bitmap-font bitmap-font)</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CHAR-HEIGHT -->
<!-- Entry for CHAR-WIDTH -->
<p><br>[Generic function]<br><a class=none name='char-width'><b>char-width</b> <i>bitmap-font</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CHAR-WIDTH -->
<!-- Entry for CHAR-WIDTH -->
<p><br>[Method]<br><a class=none><b>char-width</b> <i>(bitmap-font bitmap-font)</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CHAR-WIDTH -->
<!-- Entry for CHECK-TYPES -->
<p><br>[Macro]<br><a class=none name='check-types'><b>check-types</b> <i>type <tt>&amp;rest</tt> rest</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Performs <code>CHECK-TYPE</code> on items in rest. </p>
</blockquote>
<!-- End of entry for CHECK-TYPES -->
<!-- Entry for CLEAR-CELL -->
<p><br>[Function]<br><a class=none name='clear-cell'><b>clear-cell</b> <i><tt>&amp;key</tt> surface index</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets the <code>CELL</code> at <code>INDEX</code> to the bounds of <code>SURFACE</code>. </p>
</blockquote>
<!-- End of entry for CLEAR-CELL -->
<!-- Entry for CLEAR-CLIP-RECT -->
<p><br>[Function]<br><a class=none name='clear-clip-rect'><b>clear-clip-rect</b> <i><tt>&amp;optional</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Removes the clipping <a href="#rectangle">RECTANGLE</a>. </p>
</blockquote>
<!-- End of entry for CLEAR-CLIP-RECT -->
<!-- Entry for CLEAR-COLOR-KEY -->
<p><br>[Function]<br><a class=none name='clear-color-key'><b>clear-color-key</b> <i><tt>&amp;key</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Disables the color key. </p>
</blockquote>
<!-- End of entry for CLEAR-COLOR-KEY -->
<!-- Entry for CLEAR-DISPLAY -->
<p><br>[Function]<br><a class=none name='clear-display'><b>clear-display</b> <i>color <tt>&amp;key</tt> surface update</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Fills the display <code>SURFACE</code> using color <code>COLOR</code>. <code>SURFACE</code> is bound to <code>*DEFAULT-DISPLAY*</code> if unspecified. The display is updated when <code>UPDATE</code> is <code>T</code>. </p>
</blockquote>
<!-- End of entry for CLEAR-DISPLAY -->
<!-- Entry for CLIP-RECT -->
<p><br>[Generic accessor]<br><a class=none name='clip-rect'><b>clip-rect</b> <i>surface</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>clip-rect</b> <i>surface</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CLIP-RECT -->
<!-- Entry for CLIP-RECT -->
<p><br>[Specialized accessor]<br><a class=none><b>clip-rect</b> <i>(surface sdl-surface)</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>clip-rect</b> <i>(surface sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CLIP-RECT -->
<!-- Entry for COLOR -->
<p><br>[Standard class]<br><a class=none name='color'><b>color</b></a>
<blockquote><br>
<p>A color containing <code>INTEGER</code> Red, Green and Blue components. Free using <a href="#free">FREE</a>. </p>
</blockquote>
<!-- End of entry for COLOR -->
<!-- Entry for COLOR -->
<p><br>[Function]<br><a class=none name='color'><b>color</b> <i><tt>&amp;key</tt> r g b a</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a new <code>RGB</code><a href="#color">COLOR</a> from the specified <code>R</code>ed, <code>G</code>reen, and <code>B</code>lue components. Returns a new <code>RGBA</code><a href="#color-a">COLOR-A</a> from the specified <code>R</code>ed, <code>G</code>reen, <code>B</code>lue, and <code>A</code>lpha components. </p>
</blockquote>
<!-- End of entry for COLOR -->
<!-- Entry for COLOR-* -->
<p><br>[Generic function]<br><a class=none name='color-*'><b>color-*</b> <i>color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the <code>RGB/A</code> color components as a spread. <a href="#color-a">COLOR-A</a> returns <code>(VALUES R G B A)</code>. <a href="#color">COLOR</a> returns <code>(VALUES R G B)</code></p>
</blockquote>
<!-- End of entry for COLOR-* -->
<!-- Entry for COLOR-A -->
<p><br>[Standard class]<br><a class=none name='color-a'><b>color-a</b></a>
<blockquote><br>
<p>An color containing <code>INTEGER</code> Red, Green, Blue and Alpha components. Free using <a href="#free">FREE</a>. </p>
</blockquote>
<!-- End of entry for COLOR-A -->
<!-- Entry for COLOR-KEY -->
<p><br>[Generic accessor]<br><a class=none name='color-key'><b>color-key</b> <i>surface</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>color-key</b> <i>surface</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for COLOR-KEY -->
<!-- Entry for COLOR-KEY -->
<p><br>[Specialized accessor]<br><a class=none><b>color-key</b> <i>(surface sdl-surface)</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>color-key</b> <i>(surface sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for COLOR-KEY -->
<!-- Entry for COLOR-KEY-ENABLED-P -->
<p><br>[Generic accessor]<br><a class=none name='color-key-enabled-p'><b>color-key-enabled-p</b> <i>surface</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>color-key-enabled-p</b> <i>surface</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for COLOR-KEY-ENABLED-P -->
<!-- Entry for COLOR-KEY-ENABLED-P -->
<p><br>[Specialized accessor]<br><a class=none><b>color-key-enabled-p</b> <i>(surface sdl-surface)</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>color-key-enabled-p</b> <i>(surface sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for COLOR-KEY-ENABLED-P -->
<!-- Entry for COLOR= -->
<p><br>[Generic function]<br><a class=none name='color='><b>color=</b> <i>color1 color2</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if the <code>RGB</code>&lt;-&gt;<code>RGB</code> or <code>RGBA</code>&lt;-&gt;<code>RGBA</code> color components in <code>COLOR1</code> and <code>COLOR2</code> match. Returns <code>NIL</code> otherwise. </p>
</blockquote>
<!-- End of entry for COLOR= -->
<!-- Entry for CONVERT-SURFACE -->
<p><br>[Function]<br><a class=none name='convert-surface'><b>convert-surface</b> <i><tt>&amp;key</tt> surface to-surface enable-alpha enable-color-key free inherit type</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Converts <code>:SURFACE</code> and returns a new surface matching the pixel format and color of <code>:TO-SURFACE</code>. Calls <a href="#convert-to-display-format">CONVERT-TO-DISPLAY-FORMAT</a> if converting to the display format. </p><p>Use <code>:ENABLE-COLOR-KEY</code> or <code>:ENABLE-ALPHA</code> to take advantage of hardware colorkey or alpha blit acceleration. Enabling these flags once a surface is created will not necessarily utilize available harware acceleration if the surface was not initally created in video memory. </p><p>Will create the new surface in system menory when <code>TYPE</code> is <code>:SW</code>. Will attempt to create the new surface in video menory when <code>TYPE</code> is <code>:HW</code>, otherwise the surface is created in system memory if the combination of color key and alpha do not allow hardware acceleration. </p><p>The new surface will inherit the pixel, alpha and color key components of the source, <EM>unless</EM><code>:INHERIT</code> is <code>NIL</code>. </p><p>Use <code>:FREE</code> to delete the source <code>SURFACE</code>. </p>
</blockquote>
<!-- End of entry for CONVERT-SURFACE -->
<!-- Entry for CONVERT-TO-DISPLAY-FORMAT -->
<p><br>[Function]<br><a class=none name='convert-to-display-format'><b>convert-to-display-format</b> <i><tt>&amp;key</tt> surface enable-alpha enable-color-key pixel-alpha free inherit</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a new surface matching the pixel format and color of the video frame buffer (<code>*display surface*), that is suitable for fast blitting. The new surface will inherit the pixel, alpha and color key components of the source, *unless* </code>:INHERIT<code> is </code>NIL`. </p><p>Use <code>:ENABLE-COLOR-KEY</code> or <code>:ENABLE-ALPHA</code> to take advantage of hardware colorkey or alpha blit acceleration. Enabling these flags once a surface is created will not necessarily utilize available harware acceleration if the surface was not initally created in video memory. </p><p>Use <code>:PIXEL-ALPHA</code> to enable the pixel alpha component (alpha mask of 0xFF) for the new surface. </p><p>Use <code>:FREE</code> to delete the source <code>SURFACE</code>. </p><p>Differences between <a href="#convert-to-display-format">CONVERT-TO-DISPLAY-FORMAT</a>, <a href="#convert-surface">CONVERT-SURFACE</a>, <a href="#copy-surface">COPY-SURFACE</a>, and <a href="#create-surface">CREATE-SURFACE</a>; </p><ul><li><p><a href="#convert-to-display-format">CONVERT-TO-DISPLAY-FORMAT</a><EM> will always attempt to create a surface in video memory using hardware acceleration if key color and surface alpha are supported. </EM> A pixel alpha component can be specified. ** New surface is filled with old surface. </p></li>
<li><p><a href="#convert-surface">CONVERT-SURFACE</a> ** calls <a href="#convert-to-display-format">CONVERT-TO-DISPLAY-FORMAT</a> if converting a surface to the display format. <EM> paramatized option to create new surface in video or system memory. </EM> Pixel format and color match that of the source surface. ** New surface is filled with old surface. </p></li>
<li><a href="#copy-surface">COPY-SURFACE</a><EM> paramatized option to create new surface in video or system memory. </EM> copies a portion or all of the source surface to a new destination surface <EM> A pixel alpha component can be specified. </EM> New surface can be filled with the old surface, or the color key or both. </li>
</ul>
</blockquote>
<!-- End of entry for CONVERT-TO-DISPLAY-FORMAT -->
<!-- Entry for COPY-CHANNEL-TO-ALPHA -->
<p><br>[Function]<br><a class=none name='copy-channel-to-alpha'><b>copy-channel-to-alpha</b> <i>destination source <tt>&amp;key</tt> channel</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for COPY-CHANNEL-TO-ALPHA -->
<!-- Entry for COPY-POINT -->
<p><br>[Function]<br><a class=none name='copy-point'><b>copy-point</b> <i>point</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a copy of the point <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for COPY-POINT -->
<!-- Entry for COPY-SURFACE -->
<p><br>[Function]<br><a class=none name='copy-surface'><b>copy-surface</b> <i><tt>&amp;key</tt> cell cell-index surface color-key alpha pixel-alpha rle-accel type free inherit fill color-key-fill pixel-format</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a copy of <code>:SURFACE</code>. </p><p>Use <code>:COLOR-KEY</code> or <code>:ALPHA</code> to set the key color and surface alpha transparency. Hardware colorkey and alpha blit acceleration will be used if supported. </p><p>Will create the new surface in system menory when <code>TYPE</code> is <code>:SW</code>. Will attempt to create the new surface in video menory when <code>TYPE</code> is <code>:HW</code>, otherwise the surface is created in system memory if the combination of color key and alpha do not allow hardware acceleration. </p><p>The new surface will be filled with the old surface unless <code>:FILL</code> is <code>NIL</code>. The new surface will be filled with the color key of the old surface (if available) unless <code>:COLOR-KEY-FILL</code> is <code>NIL</code>. </p><p>The new surface will inherit the pixel, alpha and color key components of the source, <EM>unless</EM><code>:INHERIT</code> is <code>NIL</code>. </p><p>Use <code>:FREE</code> to delete the source <code>SURFACE</code>. </p>
</blockquote>
<!-- End of entry for COPY-SURFACE -->
<!-- Entry for CREATE-LIST-IF-NOT -->
<p><br>[Function]<br><a class=none name='create-list-if-not'><b>create-list-if-not</b> <i>var</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>If <code>VAR</code> is not already a list, then returns <code>(LIST VAR)</code>. </p>
</blockquote>
<!-- End of entry for CREATE-LIST-IF-NOT -->
<!-- Entry for CREATE-PATH -->
<p><br>[Function]<br><a class=none name='create-path'><b>create-path</b> <i>filename <tt>&amp;optional</tt> path</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Creates a new path from <code>FILENAME</code> and <code>PATH</code>. </p>
</blockquote>
<!-- End of entry for CREATE-PATH -->
<!-- Entry for CREATE-RWOPS-FROM-FILE -->
<p><br>[Function]<br><a class=none name='create-rwops-from-file'><b>create-rwops-from-file</b> <i>filename</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Creates and returns a new <code>RWOPS</code> object from the file at location <code>FILENAME</code>. </p>
</blockquote>
<!-- End of entry for CREATE-RWOPS-FROM-FILE -->
<!-- Entry for CREATE-SURFACE -->
<p><br>[Function]<br><a class=none name='create-surface'><b>create-surface</b> <i>width height <tt>&amp;key</tt> bpp type color-key color-key-at pixel-alpha alpha rle-accel x y</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Creates and returns a new <code>SURFACE</code> with the dimensions <code>WIDTH</code> and <code>HEIGHT</code>. </p><p><code>:COLOR-KEY</code> sets the color key of the surface and enables color-keying. </p><p><code>:ALPHA</code> sets the surface alpha transparency and enables alpha blending. This allows a pixel color of <code>RGB</code> with the surface <code>A</code>. </p><p><code>:PIXEL-ALPHA</code> enables a pixel alpha component (alpha mask of 0xFF) on the new surface. This allows a pixel color of <code>RGBA</code>. </p><p><code>:RLE-ACCEL</code> enables RLE blit acceleration. </p><p><code>:BPP</code> is the pixel depth of the surface, and my be 8, 16, 24 or 32. </p><p><code>:TYPE</code> attempts to create the <code>SURFACE</code> in video memory when <code>:HW</code>, and in system memory when <code>:SW</code></p><p><code>:X</code> and <code>:Y</code> are the positions of the <code>SURFACE</code> in screen coordinates. </p>
</blockquote>
<!-- End of entry for CREATE-SURFACE -->
<!-- Entry for DISABLE-KEY-REPEAT -->
<p><br>[Function]<br><a class=none name='disable-key-repeat'><b>disable-key-repeat</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Disables keyboard repeat. </p>
</blockquote>
<!-- End of entry for DISABLE-KEY-REPEAT -->
<!-- Entry for DISPLAY-SURFACE -->
<p><br>[Standard class]<br><a class=none name='display-surface'><b>display-surface</b></a>
<blockquote><br>
<p>The current display surface. Can be accessed using <code>SDL:*DEFAULT-DISPLAY*</code>. </p>
</blockquote>
<!-- End of entry for DISPLAY-SURFACE -->
<!-- Entry for DISTANCE -->
<p><br>[Function]<br><a class=none name='distance'><b>distance</b> <i>p1 p2</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the distance between the <code>POINT</code>s <code>P1</code> and <code>P2</code>. </p>
</blockquote>
<!-- End of entry for DISTANCE -->
<!-- Entry for DISTANCE-* -->
<p><br>[Function]<br><a class=none name='distance-*'><b>distance-*</b> <i>x1 y1 x2 y2</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the distance between the coordinates <code>X1</code>, <code>Y1</code> and <code>X2</code>, <code>Y2</code>. </p>
</blockquote>
<!-- End of entry for DISTANCE-* -->
<!-- Entry for DRAW-BEZIER -->
<p><br>[Function]<br><a class=none name='draw-bezier'><b>draw-bezier</b> <i>vertices <tt>&amp;key</tt> clipping surface color segments style</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a bezier curve of <a href="#color">COLOR</a> to <a href="#surface">SURFACE</a>. The shape of the Bezier curve is defined by several control points. A control point is a vertex containing an X and Y coordinate pair. </p><h5>Parameters </h5>
<ul><li><code>:VERTICES</code> is a list of control points of <a href="#point">POINT</a>. </li>
<li><code>:STYLE</code> describes the line style used to draw the curve and may be one of <code>:SOLID</code>, <code>:DASH</code>, or <code>:POINTS</code>. Use <code>:SOLID</code> to draw a single continuous line through the specified waypoints. Use <code>:DASH</code> to draw a line between alternate waypoint pairs. Use <code>:POINTS</code> to draw a single pixel at each waypoint. </li>
<li><code>:SEGMENTS</code> is the number of line segments used to draw the curve. The default is 20 segments if unspecified. The greater the number of segments, the smoother the curve. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the line color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:CLIPPING</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave <code>CLIPPING</code> as <code>T</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-BEZIER (LIST (SDL:POINT :X 60 :Y 40)
(SDL:POINT :X 160 :Y 10)
(SDL:POINT :X 170 :Y 150)
(SDL:POINT :X 60 :Y 150))
:style :SOLID)
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
<li><code>:STYLE</code> is ignored in <code>LISPBUILDER-SDL-GFX</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-BEZIER -->
<!-- Entry for DRAW-BOX -->
<p><br>[Function]<br><a class=none name='draw-box'><b>draw-box</b> <i>rect <tt>&amp;key</tt> clipping surface color stroke-color alpha</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-box-*">DRAW-BOX-*</a>. </p><h5>Parameters </h5>
<ul><li><code>RECT</code> is <a href="#rectangle">RECTANGLE</a>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-BOX -->
<!-- Entry for DRAW-BOX-* -->
<p><br>[Function]<br><a class=none name='draw-box-*'><b>draw-box-*</b> <i>x y w h <tt>&amp;key</tt> clipping surface color stroke-color alpha</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draws a filled rectangle of <a href="#color">COLOR</a> to <a href="#surface">SURFACE</a>. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> are the <code>INTEGER</code> coordinates of the top-left corner of the rectangle. </li>
<li><code>W</code> and <code>H</code> are the width and height of the rectangle, of type <code>INTEGER</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the line color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:STROKE-COLOR</code> when not <code>NIL</code> will draw a <code>1</code> pixel line of color <code>COLOR</code> around the perimiter of the box. </li>
<li><code>:ALPHA</code> when between <code>0</code> and <code>255</code> is used as the alpha transparency value when blitting the rectangle onto <code>SURFACE</code>. <EM>Note:</EM> An intermediate surface is created, the rectangle is drawn onto this intermediate surface and then this surface is blitted to <code>SURFACE</code>. </li>
<li><code>:CLIPPING</code> is <code>NIL</code> The default is <code>NIL</code> as the SDL library will perform the necessary clipping automatically. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-BOX-* -->
<!-- Entry for DRAW-CIRCLE -->
<p><br>[Function]<br><a class=none name='draw-circle'><b>draw-circle</b> <i>p1 r <tt>&amp;key</tt> surface color alpha aa</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-circle-*">DRAW-CIRCLE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the <a href="#point">POINT</a> coordinates at the center of the circle. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
<li><code>:AA</code> ignored in <STRONG>LISPBUILDER-SDL</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-CIRCLE -->
<!-- Entry for DRAW-CIRCLE-* -->
<p><br>[Function]<br><a class=none name='draw-circle-*'><b>draw-circle-*</b> <i>x0 y0 r <tt>&amp;key</tt> surface color alpha aa</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draws a circle circumference of <a href="#color">COLOR</a> to <a href="#surface">SURFACE</a>. Use <a href="#draw-filled-circle-*">DRAW-FILLED-CIRCLE-*</a> to draw a filled circle. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> specify the center coordinate of the circle, of type <code>INTEGER</code>. </li>
<li><code>R</code> is the circle r, of type <code>INTEGER</code>. </li>
<li><code>:AA</code> determines if the line is to be drawn using antialiasing. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the line color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:ALPHA</code> when between <code>0</code> and <code>255</code> is used as the alpha transparency value when blitting the rectangle onto <code>SURFACE</code>. <EM>Note:</EM> An intermediate surface is created, the rectangle is drawn onto this intermediate surface and then this surface is blitted to <code>SURFACE</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
<li><code>:AA</code> ignored in <STRONG>LISPBUILDER-SDL</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-CIRCLE-* -->
<!-- Entry for DRAW-CURVE -->
<p><br>[Function]<br><a class=none name='draw-curve'><b>draw-curve</b> <i>vertices <tt>&amp;key</tt> clipping surface color segments style</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a Cattmul-Rom spline of <a href="#color">COLOR</a> to <a href="#surface">SURFACE</a>. The shape of the curve is defined by waypoints. A waypoint is a vertex containing an X and Y coordinate pair. </p><h5>Parameters </h5>
<ul><li><code>VERTICES</code> is a list of waypoints or vetices for the spline, of <a href="#point">POINT</a></li>
<li><code>STYLE</code> describes the line style used to draw the curve and may be one of <code>:SOLID</code>, <code>:DASH</code>, or <code>:POINTS</code>. Use <code>:SOLID</code> to draw a single continuous line through the specified waypoints. Use <code>:DASH</code> to draw a line between alternate waypoint pairs. Use <code>:POINTS</code> to draw a single pixel at each waypoint. </li>
<li><code>SEGMENTS</code> is the number of segments used to draw the Catmull-Rom spline. Default is 20 segments if unspecified. The greater the number of segments, the smoother the spline. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the line color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:CLIPPING</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave <code>CLIPPING</code> as <code>T</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-CURVE (LIST (SDL:POINT :X 60 :Y 40)
(SDL:POINT :X 160 :Y 10)
(SDL:POINT :X 170 :Y 150)
(SDL:POINT :X 60 :Y 150)))
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-CURVE -->
<!-- Entry for DRAW-ELLIPSE -->
<p><br>[Function]<br><a class=none name='draw-ellipse'><b>draw-ellipse</b> <i>p1 rx ry <tt>&amp;key</tt> surface color aa</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-ellipse-*">DRAW-ELLIPSE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the <a href="#point">POINT</a> coordinates at the center of the ellipse. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-ELLIPSE -->
<!-- Entry for DRAW-ELLIPSE-* -->
<p><br>[Function]<br><a class=none name='draw-ellipse-*'><b>draw-ellipse-*</b> <i>x y rx ry <tt>&amp;key</tt> surface color aa</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draws an ellipse circumference of <a href="#color">COLOR</a> to the <a href="#surface">SURFACE</a>. Use <a href="#draw-filled-ellipse-*">DRAW-FILLED-ELLIPSE-*</a> to draw a filled ellipse. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> specify the center coordinate of the ellipse, of type <code>INTEGER</code>. </li>
<li><code>RX</code> and <code>RY</code> specify the ellipse radius, of type <code>INTEGER</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the pixel color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-ELLIPSE-* -->
<!-- Entry for DRAW-FILLED-CIRCLE -->
<p><br>[Function]<br><a class=none name='draw-filled-circle'><b>draw-filled-circle</b> <i>p1 r <tt>&amp;key</tt> surface color stroke-color alpha</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-filled-circle-*">DRAW-FILLED-CIRCLE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the <a href="#point">POINT</a> coordinates coordinate of the center of the filled circle. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FILLED-CIRCLE -->
<!-- Entry for DRAW-FILLED-CIRCLE-* -->
<p><br>[Function]<br><a class=none name='draw-filled-circle-*'><b>draw-filled-circle-*</b> <i>x0 y0 r <tt>&amp;key</tt> surface color stroke-color alpha</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draws a filled circle of <a href="#color">COLOR</a> to <a href="#surface">SURFACE</a>. </p><h5>Parameters </h5>
<ul><li><code>X0</code> and <code>Y0</code> specify the center coordinate of the circle, of type <code>INTEGER</code>. </li>
<li><code>R</code> is the circle radius, of type <code>INTEGER</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the line color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:STROKE-COLOR</code> when not <code>NIL</code> will draw a <code>1</code> pixel line of color <code>COLOR</code> around the perimiter of the box. </li>
<li><code>:ALPHA</code> when between <code>0</code> and <code>255</code> is used as the alpha transparency value when blitting the rectangle onto <code>SURFACE</code>. <EM>Note:</EM> An intermediate surface is created, the rectangle is drawn onto this intermediate surface and then this surface is blitted to <code>SURFACE</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FILLED-CIRCLE-* -->
<!-- Entry for DRAW-FILLED-ELLIPSE -->
<p><br>[Function]<br><a class=none name='draw-filled-ellipse'><b>draw-filled-ellipse</b> <i>p1 rx ry <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-filled-ellipse-*">DRAW-FILLED-ELLIPSE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the <a href="#point">POINT</a> coordinates at the center of the filled ellipse. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FILLED-ELLIPSE -->
<!-- Entry for DRAW-FILLED-ELLIPSE-* -->
<p><br>[Function]<br><a class=none name='draw-filled-ellipse-*'><b>draw-filled-ellipse-*</b> <i>x y rx ry <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draws a filled ellipse of <a href="#color">COLOR</a> to the <a href="#surface">SURFACE</a>. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> specify the center coordinate of the ellipse, of type <code>INTEGER</code>. </li>
<li><code>RX</code> and <code>RY</code> specify the ellipse radius, of type <code>INTEGER</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the pixel color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FILLED-ELLIPSE-* -->
<!-- Entry for DRAW-FILLED-PIE -->
<p><br>[Function]<br><a class=none name='draw-filled-pie'><b>draw-filled-pie</b> <i>p1 rad start end <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-filled-pie-*">DRAW-FILLED-PIE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the <a href="#point">POINT</a> coordinates at the center of the filled pie. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FILLED-PIE -->
<!-- Entry for DRAW-FILLED-PIE-* -->
<p><br>[Function]<br><a class=none name='draw-filled-pie-*'><b>draw-filled-pie-*</b> <i>x y rad start end <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draws a filled pie of <a href="#color">COLOR</a> to the <a href="#surface">SURFACE</a></p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> specify the center coordinate of the pie, of type <code>INTEGER</code>. </li>
<li><code>RAD</code> is the pie radius, of type <code>INTEGER</code>. </li>
<li><code>START</code> is the pie start, of type <code>INTEGER</code>. </li>
<li><code>END</code> is the pie end, of type <code>INTEGER</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the pixel color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FILLED-PIE-* -->
<!-- Entry for DRAW-FILLED-POLYGON -->
<p><br>[Function]<br><a class=none name='draw-filled-polygon'><b>draw-filled-polygon</b> <i>vertices <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a filled polygon of <a href="#color">COLOR</a> to the <a href="#surface">SURFACE</a></p><h5>Parameters </h5>
<ul><li><code>VERTICES</code> is the list of vertices of type <code>SDL:POINT</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the pixel color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FILLED-POLYGON -->
<!-- Entry for DRAW-FILLED-TRIGON -->
<p><br>[Function]<br><a class=none name='draw-filled-trigon'><b>draw-filled-trigon</b> <i>p1 p2 p3 <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a filled trigon of <a href="#color">COLOR</a> to the <a href="#surface">SURFACE</a></p><h5>Parameters </h5>
<ul><li><code>P1</code>, <code>P2</code> and <code>P3</code> specify the vertices of the trigon, of type <code>SDL:POINT</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the pixel color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FILLED-TRIGON -->
<!-- Entry for DRAW-FONT -->
<p><br>[Generic function]<br><a class=none name='draw-font'><b>draw-font</b> <i><tt>&amp;key</tt> font surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Blit the cached <a href="#surface">SURFACE</a> in <a href="#FONT">font</a> to the destination <code>SURFACE</code>. The cached surface is created during a previous call to any of the DRAW-STRING* functions. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG>, and <STRONG>LISPBUILDER-SDL-TTF</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FONT -->
<!-- Entry for DRAW-FONT-AT -->
<p><br>[Generic function]<br><a class=none name='draw-font-at'><b>draw-font-at</b> <i>position <tt>&amp;key</tt> font surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-font">DRAW-FONT</a>. The cached surface is rendered at <code>POSITION</code><a href="#point">POINT</a>. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG>, and <STRONG>LISPBUILDER-SDL-TTF</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FONT-AT -->
<!-- Entry for DRAW-FONT-AT-* -->
<p><br>[Generic function]<br><a class=none name='draw-font-at-*'><b>draw-font-at-*</b> <i>x y <tt>&amp;key</tt> font surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-font">DRAW-FONT</a>. The cached surface is rendered at poisition <code>X</code> and <code>Y</code>. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG>, and <STRONG>LISPBUILDER-SDL-TTF</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FONT-AT-* -->
<!-- Entry for DRAW-HLINE -->
<p><br>[Function]<br><a class=none name='draw-hline'><b>draw-hline</b> <i>x0 x1 y <tt>&amp;key</tt> surface color clipping template</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a horizontal line of <a href="#color">COLOR</a> from <code>X0</code> to <code>X1</code> through <code>Y</code> onto onto <a href="#surface">SURFACE</a>. </p><h5>Parameters </h5>
<ul><li><code>X0</code> and <code>X1</code> are the horizontal start and end points of the line, of type <code>INTEGER</code>. </li>
<li><code>Y</code> is the vertical <code>INTEGER</code> coordinate that the horizontal line must intersect. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the line color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:CLIPPING</code> is <code>NIL</code> The default is <code>NIL</code> as the SDL library will perform the necessary clipping automatically. </li>
<li><code>:TEMPLATE</code> specifies an optional <a href="#rectangle">RECTANGLE</a> to fill the surface. Will not free <code>TEMPLATE</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-HLINE -->
<!-- Entry for DRAW-LINE -->
<p><br>[Function]<br><a class=none name='draw-line'><b>draw-line</b> <i>p1 p2 <tt>&amp;key</tt> surface color clipping aa</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-line-*">DRAW-LINE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> and <code>P2</code> are the start and end x/y co-ordinates of the line, of <code>POINT</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-LINE -->
<!-- Entry for DRAW-LINE-* -->
<p><br>[Function]<br><a class=none name='draw-line-*'><b>draw-line-*</b> <i>x0 y0 x1 y1 <tt>&amp;key</tt> surface color clipping aa</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draws a line of <a href="#color">COLOR</a> to <a href="#surface">SURFACE</a>. </p><h5>Parameters </h5>
<ul><li><code>X0</code><code>Y0</code> are the start X/Y coordinates of the line, of <code>INTEGER</code>. </li>
<li><code>X1</code><code>Y1</code> are the end X/Y coordinates of the line, of <code>INTEGER</code>. </li>
<li><code>:AA</code> determines if the line is to be drawn using antialiasing. <STRONG>NOTE</STRONG>: Supported only in <code>LISPBUILDER-SDL-GFX</code>, otherwise ignored. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the line color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:CLIPPING</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave <code>CLIPPING</code> as <code>T</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
<li><code>:AA</code> not supported in <STRONG>LISPBUILDER-SDL</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-LINE-* -->
<!-- Entry for DRAW-PIE -->
<p><br>[Function]<br><a class=none name='draw-pie'><b>draw-pie</b> <i>p1 rad start end <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-pie-*">DRAW-PIE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the <a href="#point">POINT</a> coordinates at the center of the pie. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-PIE -->
<!-- Entry for DRAW-PIE-* -->
<p><br>[Function]<br><a class=none name='draw-pie-*'><b>draw-pie-*</b> <i>x y rad start end <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draws a pie of <a href="#color">COLOR</a> to the <a href="#surface">SURFACE</a>. Use <a href="#draw-filled-pie-*">DRAW-FILLED-PIE-*</a> to draw a filled pie. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> specify the center coordinate of the pie, of type <code>INTEGER</code>. </li>
<li><code>RAD</code> is the pie radius, of type <code>INTEGER</code>. </li>
<li><code>START</code> is the pie start, of type <code>INTEGER</code>. </li>
<li><code>END</code> is the pie end, of type <code>INTEGER</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the pixel color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-PIE-* -->
<!-- Entry for DRAW-PIXEL -->
<p><br>[Function]<br><a class=none name='draw-pixel'><b>draw-pixel</b> <i>point <tt>&amp;key</tt> clipping surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-pixel-*">DRAW-PIXEL-*</a>. </p><h5>Parameters </h5>
<ul><li><code>POINT</code> is the <a href="#point">POINT</a> coordinates of the pixel. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-PIXEL -->
<!-- Entry for DRAW-PIXEL-* -->
<p><br>[Function]<br><a class=none name='draw-pixel-*'><b>draw-pixel-*</b> <i>x y <tt>&amp;key</tt> clipping surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a single pixel of <a href="#color">COLOR</a> to the <a href="#surface">SURFACE</a> at the specified <code>X</code> and <code>Y</code> coordiates. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> specify the coordinates of the pixel, and are of type <code>INTEGER</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the pixel color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:CLIPPING</code> when left as the default value <code>T</code> will ensure that the pixel is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave <code>CLIPPING</code> as <code>T</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-PIXEL-* -->
<!-- Entry for DRAW-POLYGON -->
<p><br>[Function]<br><a class=none name='draw-polygon'><b>draw-polygon</b> <i>vertices <tt>&amp;key</tt> surface color clipping aa</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw the circumference of a polygon of <a href="#color">COLOR</a> to <a href="#surface">SURFACE</a> using the vertices in <code>POINTS</code>. Use <a href="#draw-filled-polygon-*">DRAW-FILLED-POLYGON-*</a> to draw a filled polygon. </p><h5>Parameters </h5>
<ul><li><code>:POINTS</code> is the list of vertices for the polygon. <code>POINTS</code> is a list of <code>POINT</code>s. </li>
<li><code>:AA</code> determines if the line is to be drawn using antialiasing. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the pixel color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:CLIPPING</code> when left as the default value <code>T</code> will ensure that the pixel is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave <code>CLIPPING</code> as <code>T</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
<li><code>:AA</code> ignored in <STRONG>LISPBUILDER-SDL</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-POLYGON -->
<!-- Entry for DRAW-RECTANGLE -->
<p><br>[Function]<br><a class=none name='draw-rectangle'><b>draw-rectangle</b> <i>rect <tt>&amp;key</tt> clipping surface color alpha</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-rectangle-*">DRAW-RECTANGLE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>RECT</code> is <a href="#rectangle">RECTANGLE</a>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-RECTANGLE -->
<!-- Entry for DRAW-RECTANGLE-* -->
<p><br>[Function]<br><a class=none name='draw-rectangle-*'><b>draw-rectangle-*</b> <i>x y w h <tt>&amp;key</tt> clipping surface color alpha</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a rectangle outline of <a href="#color">COLOR</a> to <a href="#surface">SURFACE</a>. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> are the <code>INTEGER</code> coordinates of the top-left corner of the rectangle. </li>
<li><code>W</code> and <code>H</code> are the width and height of the rectangle, of type <code>INTEGER</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the line color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:ALPHA</code> when between <code>0</code> and <code>255</code> is used as the alpha transparency value when blitting the rectangle onto <code>SURFACE</code>. <EM>Note:</EM> An intermediate surface is created, the rectangle is drawn onto this intermediate surface and then this surface is blitted to <code>SURFACE</code>. </li>
<li><code>:CLIPPING</code> is <code>NIL</code> The default is <code>NIL</code> as the SDL library will perform the necessary clipping automatically. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-RECTANGLE-* -->
<!-- Entry for DRAW-SHAPE -->
<p><br>[Function]<br><a class=none name='draw-shape'><b>draw-shape</b> <i>vertices <tt>&amp;key</tt> clipping surface color style</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a polygon of <a href="#color">COLOR</a> to <a href="#surface">SURFACE</a> using <code>VERTICES</code>. </p><h5>Parameters </h5>
<ul><li><code>VERTICES</code> is a list of vertices, of <code>POINT</code></li>
<li><code>STYLE</code> describes the line style used to draw the polygon and may be one of <code>:SOLID</code>, <code>:DASH</code>, or <code>:POINTS</code>. Use <code>:SOLID</code> to draw a single continuous line through the specified waypoints. Use <code>:DASH</code> to draw a line between alternate waypoint pairs. Use <code>:POINTS</code> to draw a single pixel at each waypoint. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the line color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:CLIPPING</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave <code>CLIPPING</code> as <code>T</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-SHAPE (LIST (SDL:POINT :X 60 :Y 40)
(SDL:POINT :X 160 :Y 10)
(SDL:POINT :X 170 :Y 150)
(SDL:POINT :X 60 :Y 150)))
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-SHAPE -->
<!-- Entry for DRAW-STRING-SHADED -->
<p><br>[Function]<br><a class=none name='draw-string-shaded'><b>draw-string-shaded</b> <i>string p1 fg-color bg-color <tt>&amp;key</tt> justify surface font</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-string-shaded-*">DRAW-STRING-SHADED-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the <code>X</code> and <code>Y</code> coordinates to render the text, of type <code>SDL:POINT</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-STRING-SHADED -->
<!-- Entry for DRAW-STRING-SHADED-* -->
<p><br>[Function]<br><a class=none name='draw-string-shaded-*'><b>draw-string-shaded-*</b> <i>string x y fg-color bg-color <tt>&amp;key</tt> justify surface font</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw text <code>STRING</code> at location <code>X</code><code>Y</code> using font <code>FONT</code> with text color <code>FG-COLOR</code> and background color <code>BG-COLOR</code> onto surface <code>SURFACE</code>. The surface background is filled with <code>BG-COLOR</code> so the surface cannot be keyed over other surfaces. </p><ul><li><code>STRING</code> is the text to render. </li>
<li><code>X</code> and <code>Y</code> are the <code>X</code> and <code>Y</code> coordinates, as <code>INTEGERS</code>. </li>
<li><code>FG-COLOR</code> color is the text color, of type <code>COLOR</code></li>
<li><code>BG-COLOR</code> color is the background color used to fill the surface <code>SURFACE</code>, of type <code>COLOR</code></li>
<li><code>FONT</code> is the font face used to render the text. Of type <code>FONT</code>. Bound to <code>*DEFAULT-FONT*</code> if unspecified. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL-SURFACE</code>. Bound to <code>*DEFAULT-SURFACE*</code> if unspecified. </li>
</ul><h5>Returns </h5>
<ul><li>Returns the surface <code>SURFACE</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-STRING-SHADED-* &amp;quot;Hello World!&amp;quot; 0 0 F-COLOR B-COLOR :SURFACE A-SURFACE)
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-STRING-SHADED-* -->
<!-- Entry for DRAW-STRING-SOLID -->
<p><br>[Function]<br><a class=none name='draw-string-solid'><b>draw-string-solid</b> <i>string p1 <tt>&amp;key</tt> justify surface font color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-string-solid-*">DRAW-STRING-SOLID-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the <code>X</code> and <code>X</code> coordinates to render the text, of type <code>POINT</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-STRING-SOLID -->
<!-- Entry for DRAW-STRING-SOLID-* -->
<p><br>[Function]<br><a class=none name='draw-string-solid-*'><b>draw-string-solid-*</b> <i>string x y <tt>&amp;key</tt> justify surface font color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw text <code>STRING</code> at location <code>X</code><code>Y</code> using font <code>FONT</code> with color <code>COLOR</code> onto surface <code>SURFACE</code>. The text is keyed onto <code>SURFACE</code>. </p><h5>Parameters </h5>
<ul><li><code>STRING</code> is the text to render. </li>
<li><code>X</code> and <code>Y</code> are the <code>X</code> and <code>Y</code> position coordinates, as <code>INTEGERS</code>. </li>
<li><code>FONT</code> is the font face used to render the string. Of type <code>FONT</code>. Bound to <code>*DEFAULT-FONT*</code> if unspecified. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL-SURFACE</code>. Bound to <code>*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> color is the text color, of type <code>COLOR</code>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns the surface <code>SURFACE</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-STRING-SOLID-* &amp;quot;Hello World!&amp;quot; 0 0 :SURFACE A-SURFACE :COLOR A-COLOR)
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-STRING-SOLID-* -->
<!-- Entry for DRAW-SURFACE -->
<p><br>[Function]<br><a class=none name='draw-surface'><b>draw-surface</b> <i>src <tt>&amp;key</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#blit-surface">BLIT-SURFACE</a></p>
</blockquote>
<!-- End of entry for DRAW-SURFACE -->
<!-- Entry for DRAW-SURFACE-AT -->
<p><br>[Function]<br><a class=none name='draw-surface-at'><b>draw-surface-at</b> <i>src point <tt>&amp;key</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draws the source surface to the destination surface at position POINT. See <a href="#blit-surface">BLIT-SURFACE</a>. </p>
</blockquote>
<!-- End of entry for DRAW-SURFACE-AT -->
<!-- Entry for DRAW-SURFACE-AT-* -->
<p><br>[Function]<br><a class=none name='draw-surface-at-*'><b>draw-surface-at-*</b> <i>src x y <tt>&amp;key</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draws the source surface to the destination surface at position X and Y. See <a href="#blit-surface">BLIT-SURFACE</a></p>
</blockquote>
<!-- End of entry for DRAW-SURFACE-AT-* -->
<!-- Entry for DRAW-TRIGON -->
<p><br>[Function]<br><a class=none name='draw-trigon'><b>draw-trigon</b> <i>p1 p2 p3 <tt>&amp;key</tt> surface color clipping aa</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw the outline of a trigon or triangle, of <a href="#color">COLOR</a> to <a href="#surface">SURFACE</a>. Use <a href="#draw-filled-trigon-*">DRAW-FILLED-TRIGON-*</a> to draw a filled trigon. </p><h5>Parameters </h5>
<ul><li><code>P1</code>, <code>P2</code> and <code>P3</code> specify the vertices of the trigon, of type <code>SDL:POINT</code>. </li>
<li><code>:AA</code> determines if the line is to be drawn using antialiasing. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the pixel color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:CLIPPING</code> when left as the default value <code>T</code> will ensure that the pixel is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave <code>CLIPPING</code> as <code>T</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
<li><code>:AA</code> ignored in <STRONG>LISPBUILDER-SDL</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-TRIGON -->
<!-- Entry for DRAW-VLINE -->
<p><br>[Function]<br><a class=none name='draw-vline'><b>draw-vline</b> <i>x y0 y1 <tt>&amp;key</tt> surface color clipping template</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a vertical line of <a href="#color">COLOR</a> from <code>Y0</code> to <code>Y1</code> through <code>X</code> onto <a href="#surface">SURFACE</a>. </p><h5>Parameters </h5>
<ul><li><code>X</code> is the horizontal <code>INTEGER</code> coordinate that the vertical line must intersect. </li>
<li><code>Y0</code> and <code>Y1</code> are the vertical start and end points of the line, of <code>INTEGER</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the line color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:CLIPPING</code> is <code>NIL</code> The default is <code>NIL</code> as the SDL library will perform the necessary clipping automatically. </li>
<li><code>:TEMPLATE</code> specifies an optional <a href="#rectangle">RECTANGLE</a> to fill the surface. Will not free <code>TEMPLATE</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for DRAW-VLINE -->
<!-- Entry for ENABLE-ALPHA -->
<p><br>[Function]<br><a class=none name='enable-alpha'><b>enable-alpha</b> <i>value <tt>&amp;key</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Enable surface alpha blending for when <code>T</code>. Disable surface alpha blending when <code>NIL</code>. A <code>SURFACE</code> need not have a pixel alpha component (RGBA) to use surface alpha blending. </p>
</blockquote>
<!-- End of entry for ENABLE-ALPHA -->
<!-- Entry for ENABLE-COLOR-KEY -->
<p><br>[Function]<br><a class=none name='enable-color-key'><b>enable-color-key</b> <i>value <tt>&amp;key</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Enables color keying when <code>T</code>. Disable color keying when <code>NIL</code></p>
</blockquote>
<!-- End of entry for ENABLE-COLOR-KEY -->
<!-- Entry for ENABLE-KEY-REPEAT -->
<p><br>[Function]<br><a class=none name='enable-key-repeat'><b>enable-key-repeat</b> <i>delay interval</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Enables the keyboard repeat rate. DELAY specifies how long the key must be pressed before it begins repeating, it then repeats at the speed specified by INTERVAL. Both DELAY and INTERVAL are expressed in milliseconds. Setting DELAY or INTERVAL to NIL will set the default values of SDL-DEFAULT-REPEAT-DELAY and SDL-DEFAULT-REPEAT-INTERVAL respectively. </p>
</blockquote>
<!-- End of entry for ENABLE-KEY-REPEAT -->
<!-- Entry for ENABLE-KEY-REPEAT-P -->
<p><br>[Function]<br><a class=none name='enable-key-repeat-p'><b>enable-key-repeat-p</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the current keyboard DELAY and INTERVAL repeat rate in milliseconds as (VALUES DELAY INTERVAL). </p>
</blockquote>
<!-- End of entry for ENABLE-KEY-REPEAT-P -->
<!-- Entry for ENABLE-RLE-ACCEL -->
<p><br>[Generic function]<br><a class=none name='enable-rle-accel'><b>enable-rle-accel</b> <i>value <tt>&amp;key</tt></i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for ENABLE-RLE-ACCEL -->
<!-- Entry for ENABLE-RLE-ACCEL -->
<p><br>[Method]<br><a class=none><b>enable-rle-accel</b> <i>value <tt>&amp;key</tt></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Enables RLE blit acceleration when <code>T</code>, disables RLE acceleration when <code>NIL</code>. RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i.e., pixels that match the key color). </p>
</blockquote>
<!-- End of entry for ENABLE-RLE-ACCEL -->
<!-- Entry for ENABLE-UNICODE -->
<p><br>[Function]<br><a class=none name='enable-unicode'><b>enable-unicode</b> <i>state</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Unicode translation is enabled with STATE is T, and disabled when STATE is NIL. To obtain the character codes corresponding to received keyboard events, Unicode translation must first be turned on using this function. The translation incurs a slight overhead for each keyboard event and is therefore disabled by default. For each subsequently received key down event, the unicode member of the SDL_keysym structure will then contain the corresponding character code, or zero for keysyms that do not correspond to any character code. Note that only key press events will be translated, not release events. Returns the previous unicode translation state. </p>
</blockquote>
<!-- End of entry for ENABLE-UNICODE -->
<!-- Entry for ENABLE-UNICODE-P -->
<p><br>[Function]<br><a class=none name='enable-unicode-p'><b>enable-unicode-p</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Queries the current state of Unicode keyboard translation. Returns T if enabled, NIL if disabled. </p>
</blockquote>
<!-- End of entry for ENABLE-UNICODE-P -->
<!-- Entry for FILL-SURFACE -->
<p><br>[Function]<br><a class=none name='fill-surface'><b>fill-surface</b> <i>color <tt>&amp;key</tt> template surface update clipping</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Fills surface with the specified <code>COLOR</code>. <code>:TEMPLATE</code> accepts a <code>RECTANGLE</code> defining the fill bounds. <code>The surface is updated when </code>:UPDATE` </p>
</blockquote>
<!-- End of entry for FILL-SURFACE -->
<!-- Entry for FILL-SURFACE-* -->
<p><br>[Function]<br><a class=none name='fill-surface-*'><b>fill-surface-*</b> <i>r g b <tt>&amp;key</tt> a template surface update clipping</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Fill the surface with the specified color <code>R</code><code>G</code><code>B</code><code>:A</code><code>A</code>. See <a href="#fill-surface">FILL-SURFACE</a>. </p>
</blockquote>
<!-- End of entry for FILL-SURFACE-* -->
<!-- Entry for FLOOD-FILL -->
<p><br>[Function]<br><a class=none name='flood-fill'><b>flood-fill</b> <i>point <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#flood-fill-*">FLOOD-FILL-*</a>. </p><h5>Parameters </h5>
<ul><li>POINT is the position to state the fill, of type <code>POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for FLOOD-FILL -->
<!-- Entry for FLOOD-FILL-* -->
<p><br>[Function]<br><a class=none name='flood-fill-*'><b>flood-fill-*</b> <i>x y <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Performs a flood fill of surface <code>SURFACE</code> with color <code>COLOR</code>. The fill starts at the position specified by the <code>X</code> and <code>Y</code> coordinates. Uses a stack based flood fill that does a lot of consing because it uses PUSH/POP as the stack. This function is fast. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> are <code>INTEGER</code> coordinates. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the fill color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
</ul>
</blockquote>
<!-- End of entry for FLOOD-FILL-* -->
<!-- Entry for FLOOD-FILL-STACK -->
<p><br>[Function]<br><a class=none name='flood-fill-stack'><b>flood-fill-stack</b> <i>point <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#flood-fill-stack-*">FLOOD-FILL-STACK-*</a>. </p><h5>Parameters </h5>
<ul><li>POINT is the position to state the fill, of type <code>POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for FLOOD-FILL-STACK -->
<!-- Entry for FLOOD-FILL-STACK-* -->
<p><br>[Function]<br><a class=none name='flood-fill-stack-*'><b>flood-fill-stack-*</b> <i>x y <tt>&amp;key</tt> surface color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#flood-fill-*">FLOOD-FILL-*</a>. </p><p><code>FLOOD-FILL-STACK-*</code> is maintains an internal array-based stack. </p><p><EM>Note</EM>: More of an experiment to see if an array would be faster than a bunch of consing. The timing of both functions indicates they run at the same speed. With compiler declarations it may have better results. Another disadvantage to this is it preallocates the stack, chewing up quite a bit of ram. </p>
</blockquote>
<!-- End of entry for FLOOD-FILL-STACK-* -->
<!-- Entry for FP -->
<p><br>[Generic accessor]<br><a class=none name='fp'><b>fp</b> <i>foreign-object</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>fp</b> <i>rectangle-array</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the foreign pointer in FOREIGN-OBJECT </p>
</blockquote>
<!-- End of entry for FP -->
<!-- Entry for FRAME-RATE -->
<p><br>[Accessor]<br><a class=none name='frame-rate'><b>frame-rate</b> <i></i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>frame-rate</b> <i></i><tt>)</tt> <i>rate</i><tt>)</tt></a>
<blockquote><br>
<p>Manage the target frame rate for the game loop. <code>RATE</code>&gt;<code>0</code> will lock the game loop to the specified frame rate, and calculate the average frame rate over a number of frames. <code>RATE</code> = <code>0</code> will unlock the frame rate, and calculate the average frame rate over a number of frames. <code>RATE</code>&lt;<code>0</code> will unlock the frame rate. The average frane rate is not calculated. </p><p>See <a href="#with-events">WITH-EVENTS</a>, and <a href="#average-fps">AVERAGE-FPS</a>. </p>
</blockquote>
<!-- End of entry for FRAME-RATE -->
<!-- Entry for FREE -->
<p><br>[Generic function]<br><a class=none name='free'><b>free</b> <i>foreign-object</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>The general explicit cleanup method for the FOREIGN-OBJECT wrapper class. Objects that subclass FOREIGN-OBJECT should specify an :AFTER method on FREE to clean up any additional fields, if necessary. </p>
</blockquote>
<!-- End of entry for FREE -->
<!-- Entry for FREE-CACHED-SURFACE -->
<p><br>[Generic function]<br><a class=none name='free-cached-surface'><b>free-cached-surface</b> <i>font</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FREE-CACHED-SURFACE -->
<!-- Entry for FREE-CACHED-SURFACE -->
<p><br>[Method]<br><a class=none><b>free-cached-surface</b> <i>(font sdl-font)</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FREE-CACHED-SURFACE -->
<!-- Entry for G -->
<p><br>[Generic accessor]<br><a class=none name='g'><b>g</b> <i>color</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>g</b> <i>color</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the green color component the object. </p>
</blockquote>
<!-- End of entry for G -->
<!-- Entry for GET-CLIP-RECT -->
<p><br>[Function]<br><a class=none name='get-clip-rect'><b>get-clip-rect</b> <i><tt>&amp;key</tt> surface rectangle</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the clipping <a href="#rectangle">RECTANGLE</a>. </p>
</blockquote>
<!-- End of entry for GET-CLIP-RECT -->
<!-- Entry for GET-KEY-STATE -->
<p><br>[Function]<br><a class=none name='get-key-state'><b>get-key-state</b> <i>key</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the current keypress state of the key KEY. Returns T if the SDL-KEY is pressed, returns NIL if SDL-KEY is not pressed. Note: Use SDL_PumpEvents to update the state array. Note: This function gives you the current state after all events have been processed, so if a key or button has been pressed and released before you process events, then the pressed state will never show up in the getstate calls. Note: This function doesn&#039;t take into account whether shift has been pressed or not. For example: (GET-KEY-STATE :SDL-KEY-F1) </p>
</blockquote>
<!-- End of entry for GET-KEY-STATE -->
<!-- Entry for GET-NATIVE-WINDOW -->
<p><br>[Function]<br><a class=none name='get-native-window'><b>get-native-window</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a foreign pointer to the native SDL display window. </p>
</blockquote>
<!-- End of entry for GET-NATIVE-WINDOW -->
<!-- Entry for GET-POINT -->
<p><br>[Generic function]<br><a class=none name='get-point'><b>get-point</b> <i>object</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code> and <code>Y</code> coordinates of object <code>OBJ</code> as a <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for GET-POINT -->
<!-- Entry for GET-POSITION -->
<p><br>[Generic function]<br><a class=none name='get-position'><b>get-position</b> <i>object</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#get-POINT">GET-POINT</a></p>
</blockquote>
<!-- End of entry for GET-POSITION -->
<!-- Entry for GET-RECTANGLE -->
<p><br>[Generic function]<br><a class=none name='get-rectangle'><b>get-rectangle</b> <i>obj</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the rectangle <code>RECTANGLE</code>. </p>
</blockquote>
<!-- End of entry for GET-RECTANGLE -->
<!-- Entry for GET-SURFACE-RECT -->
<p><br>[Function]<br><a class=none name='get-surface-rect'><b>get-surface-rect</b> <i><tt>&amp;key</tt> surface rectangle</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for GET-SURFACE-RECT -->
<!-- Entry for HEIGHT -->
<p><br>[Generic accessor]<br><a class=none name='height'><b>height</b> <i>obj</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>height</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the height of the object, as an <code>INTEGER</code>. When <code>OBJ</code> is a <a href="#font">FONT</a>, use the cached <a href="#surface">SURFACE</a>. </p>
</blockquote>
<!-- End of entry for HEIGHT -->
<!-- Entry for IMAGE-P -->
<p><br>[Generic function]<br><a class=none name='image-p'><b>image-p</b> <i>source image-type</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> when the image type in <code>SOURCE</code> is of <code>IMAGE-TYPE</code>. Returns <code>NIL</code> otherwise. Attempts to detect the image type using the <EM>magic number</EM> contained in the image if one is available. <code>NIL</code> is always returned for images of type <code>TGA</code> as a <code>TGA</code> image does not contain a <EM>magic number</EM>. <code>IMAGE-TYPE</code> must be one of <code>:BMP</code>, <code>:GIF</code>, <code>:JPG</code>, <code>:LBM</code>, <code>:PCX</code>, <code>:PNG</code>, <code>:PNM</code>, <code>:TIF</code>, <code>:XCF</code>, <code>:XPM</code> or <code>:XV</code>. </p><h5>Example </h5>
<pre><code>(RWOPS-P SOURCE :IMAGE-TYPE :BMP)
(IMAGE-P &amp;quot;image.bmp&amp;quot; :IMAGE-TYPE :BMP)
</code></pre><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-IMAGE</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for IMAGE-P -->
<!-- Entry for IMAGE-TYPE-OF -->
<p><br>[Generic function]<br><a class=none name='image-type-of'><b>image-type-of</b> <i>source</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the type of image in source <code>SOURCE</code>. Attempts to detect the image type using the <EM>magic number</EM> contained in the image if one is available. Returns one of <code>:BMP</code>, <code>:GIF</code>, <code>:JPG</code>, <code>:LBM</code>, <code>:PCX</code>, <code>:PNG</code>, <code>:PNM</code>, <code>:TIF</code>, <code>:XCF</code>, <code>:XPM</code> or <code>:XV</code>, if the image type can be determined. Returns <code>NIL</code> if the image cannot be determined (The <EM>magic number</EM> is not supported or the <EM>magic number</EM> is not found). <code>NIL</code> is always returned for images of type <code>TGA</code> as a <code>TGA</code> image does not contain a <EM>magic number</EM>. </p><h5>Example </h5>
<pre><code>(IMAGE-TYPE-OF SOURCE)
(IMAGE-TYPE-OF &amp;quot;image.bmp&amp;quot;)
</code></pre><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-IMAGE</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for IMAGE-TYPE-OF -->
<!-- Entry for INIT-SDL -->
<p><br>[Function]<br><a class=none name='init-sdl'><b>init-sdl</b> <i><tt>&amp;optional</tt> init</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Initalizes the SDL library when the <code>OPTIONAL</code> parameter <code>INIT</code> is <code>T</code>, or the value returned by <a href="#sdl-init-on-startup">SDL-INIT-ON-STARTUP</a> is <code>T</code>. </p>
</blockquote>
<!-- End of entry for INIT-SDL -->
<!-- Entry for INIT-SUB-SYSTEMS -->
<p><br>[Function]<br><a class=none name='init-sub-systems'><b>init-sub-systems</b> <i><tt>&amp;optional</tt> flags</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Initializes the SDL subsystems specified in <code>FLAGS</code>. <code>FLAGS</code> is an <code>INTEGER</code> bitmask containing the logior of zero or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code> and <code>SDL-INIT-NOPARACHUTE</code>. </p><p><code>INIT-SUB-SYSTEMS</code> can be called only after SDL is succesfully initialized by <a href="#init-sdl">INIT-SDL</a>. </p>
</blockquote>
<!-- End of entry for INIT-SUB-SYSTEMS -->
<!-- Entry for INITIALISE-DEFAULT-FONT -->
<p><br>[Function]<br><a class=none name='initialise-default-font'><b>initialise-default-font</b> <i><tt>&amp;optional</tt> font-definition</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a new <a href="#bitmap-font">BITMAP-FONT</a> initialized from <code>FONT-DEFINITION</code> data, or <code>NIL</code> if the font cannot be created. <code>FONT-DEFINITION</code> is set to <code>*font-8x8*</code> if unspecified. Binds the symbol <code>*DEFAULT-FONT*</code> to the new font to be used as the default for subsequent font rendering or drawing operations. </p><h5>Packages </h5>
<ul><li>Aslo supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for INITIALISE-DEFAULT-FONT -->
<!-- Entry for INITIALISE-FONT -->
<p><br>[Function]<br><a class=none name='initialise-font'><b>initialise-font</b> <i>font-definition</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a new <a href="#bitmap-font">BITMAP-FONT</a> initialized from <code>FONT-DEFINITION</code> data, or <code>NIL</code> if the font cannot be created. <code>FONT-DEFINITION</code> must be one of the following built-in fonts: <code>*FONT-10X20*</code>, <code>*FONT-5X7*</code>, <code>*FONT-5X8*</code>, <code>*FONT-6X10*</code>, <code>*FONT-6X12*</code>, <code>*FONT-6X13*</code>, <code>*FONT-6X13B*</code>, <code>*FONT-6X13O*</code>, <code>*FONT-6X9*</code>, <code>*FONT-7X13*</code>, <code>*FONT-7X13B*</code>, <code>*FONT-7X13O*</code>, <code>*FONT-7X14*</code>, <code>*FONT-7X14B*</code>, <code>*FONT-8X13*</code>, <code>*FONT-8X13B*</code>, <code>*FONT-8X13O*</code>, <code>*FONT-8X8*</code>, <code>*FONT-9X15*</code>, <code>*FONT-9X15B*</code>, <code>*FONT-9X18*</code> OR <code>*FONT-9X18B*</code>. </p><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for INITIALISE-FONT -->
<!-- Entry for INITIALIZE-ON-STARTUP -->
<p><br>[Function]<br><a class=none name='initialize-on-startup'><b>initialize-on-startup</b> <i><tt>&amp;rest</tt> flags</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets the SDL subsystems that must be initialized in subsequent calls to <a href="#init-sub-systems">INIT-SUB-SYSTEMS</a>. </p><h5>Parameters </h5>
<ul><li><code>FLAGS</code> may be one or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code> and <code>SDL-INIT-NOPARACHUTE</code>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns an INTEGER bitmask of the SDL subsystems in <code>FLAGS</code>. </li>
</ul><h5>Example </h5>
<pre><code>(INITIALIZE-ON-STARTUP SDL:SDL-INIT-VIDEO SDL:SDL-INIT-CDROM)
</code></pre>
</blockquote>
<!-- End of entry for INITIALIZE-ON-STARTUP -->
<!-- Entry for INITIALIZED-SUB-SYSTEMS-P -->
<p><br>[Function]<br><a class=none name='initialized-sub-systems-p'><b>initialized-sub-systems-p</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a list of the initialized SDL subsystems. </p>
</blockquote>
<!-- End of entry for INITIALIZED-SUB-SYSTEMS-P -->
<!-- Entry for IS-VALID-PTR -->
<p><br>[Function]<br><a class=none name='is-valid-ptr'><b>is-valid-ptr</b> <i>pointer</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns T if pointer is not NULL and is a valid CFFI pointer to a foreign object. </p>
</blockquote>
<!-- End of entry for IS-VALID-PTR -->
<!-- Entry for KEY-REPEAT-DELAY -->
<p><br>[Function]<br><a class=none name='key-repeat-delay'><b>key-repeat-delay</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the current key repeat delay, in milliseconds. </p>
</blockquote>
<!-- End of entry for KEY-REPEAT-DELAY -->
<!-- Entry for KEY-REPEAT-INTERVAL -->
<p><br>[Function]<br><a class=none name='key-repeat-interval'><b>key-repeat-interval</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the current key repeat interval, in milliseconds. </p>
</blockquote>
<!-- End of entry for KEY-REPEAT-INTERVAL -->
<!-- Entry for KEY= -->
<p><br>[Function]<br><a class=none name='key='><b>key=</b> <i>key1 key2</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for KEY= -->
<!-- Entry for LIST-MODES -->
<p><br>[Function]<br><a class=none name='list-modes'><b>list-modes</b> <i>flags <tt>&amp;optional</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a LIST of vectors sorted largest to smallest that contains the width and height dimensions of the screen that will support the pixel format of the specified surface <code>SURFACE</code> and video flags <code>FLAGS</code>. <code>LIST-MODES</code> must be called after SDL is initialised using <a href="#init-sdl">INIT-SDL</a> or <a href="#with-init">WITH-INIT</a>. </p><h5>Parameters </h5>
<ul><li><code>FLAGS</code> is a bitmasked logior of one or more of the following; <a href="#sdl-sw-surface">SDL-SW-SURFACE</a>, <a href="#sdl-hw-surface">SDL-HW-SURFACE</a>, <a href="#sdl-async-blit">SDL-ASYNC-BLIT</a>, <a href="#sdl-any-format">SDL-ANY-FORMAT</a>, <a href="#sdl-hw-palette">SDL-HW-PALETTE</a>, <a href="#sdl-doublebuf">SDL-DOUBLEBUF</a>, <a href="#sdl-fullscreen">SDL-FULLSCREEN</a>, <a href="#sdl-opengl">SDL-OPENGL</a>, <a href="#sdl-resizable">SDL-RESIZABLE</a> and <a href="#sdl-no-frame">SDL-NO-FRAME</a>. </li>
<li><code>SURFACE</code> A surface of type <a href="#sdl-surface]">SDL-SURFACE</a>, or <code>NIL</code>. WHEN <code>NIL</code>, the pixel format will be that returned by <a href="#sdl-get-video-info]">SDL-GET-VIDEO-INFO</a>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns a list of <code>VECTOR</code>s of display dimensions, sorted largest to smallest, that will support the pixel format of surface <code>SURFACE</code>; for example <code>(#(1024 768) #(640 480) #(512 384) #(320 240))</code>. Returns <code>NIL</code> if there are no dimensions available for a particular pixel format. Returns <code>T</code> if any dimension will support the pixel format and video flags. </li>
</ul><h5>Example </h5>
<pre><code>(LIST-MODES &amp;#039;(SDL-HW-SURFACE SDL-FULLSCREEN))
</code></pre>
</blockquote>
<!-- End of entry for LIST-MODES -->
<!-- Entry for LIST-SUB-SYSTEMS -->
<p><br>[Function]<br><a class=none name='list-sub-systems'><b>list-sub-systems</b> <i>flag</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a list of SDL subsystems that are specified in <code>FLAGS</code>. </p><p><code>FLAGS</code> is an <code>INTEGER</code> bitmask containing the logior of zero or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code> and <code>SDL-INIT-NOPARACHUTE</code>. </p>
</blockquote>
<!-- End of entry for LIST-SUB-SYSTEMS -->
<!-- Entry for LOAD-IMAGE -->
<p><br>[Generic function]<br><a class=none name='load-image'><b>load-image</b> <i>source <tt>&amp;key</tt> color-key alpha image-type force free-rwops color-key-at</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Creates and returns a new <code>SURFACE</code> from the image in <code>SOURCE</code>, or returns <code>NIL</code> if <code>SOURCE</code> does not contain a valid image or the image type cannot be determined. </p><p>The <EM>magic number</EM> if present is be used to determine the image type. To load an image when the <EM>magic number</EM> is unavailable (image formats such as <code>TGA</code> do not contain a <EM>magic number</EM>), specify the image type using <code>:IMAGE-TYPE</code>. All non-magicable image formats, such as <code>TGA</code>, must be specified using <code>IMAGE-TYPE</code>. To load a TGA image use <code>:IMAGE-TYPE :TGA</code></p><h5>Parameters </h5>
<ul><li><code>SOURCE</code> is an image. </li>
<li><code>COLOR-KEY</code> sets the color key, and turns on color keying. </li>
<li>&#039;COLOR-KEY-AT&#039; uses the pixel color at <code>POINT</code> x/y as the color key, and turns on color keying. </li>
<li><code>ALPHA</code> sets the transparency level for the surface, and turns on alpha blending. Must be in the range 0-255, where 255 is opaque and 0 is transparent. </li>
<li><code>IMAGE-TYPE</code> specifies the image type. May be <code>:BMP</code>, <code>:GIF</code>, <code>:JPG</code>, <code>:LBM</code>, <code>:PCX</code>, <code>:PNG</code>, <code>:PNM</code>, <code>:TGA</code>, <code>:TIF</code>, <code>:XCF</code>, <code>:XPM</code> or <code>:XV</code>. The image type is determined using the <EM>magic number</EM> when present in the image if <code>NIL</code>. If the <EM>magic number</EM> is available and does not match <code>IMAGE-TYPE</code>, then <code>IMAGE-TYPE</code> is ignored. </li>
<li><code>FORCE</code> when <code>T</code> will ignore any <EM>magic number</EM> present in the image and load an image as <code>:IMAGE-TYPE</code>. Images of type <code>TGA</code> must be loaded using <code>:FORCE T</code>. </li>
<li><code>FREE-RWOPS</code> will free a RWOPS passed as a parameter in <code>SOURCE</code>. Default is <code>T</code></li>
</ul><h5>Example </h5>
<ul><li>To load a <code>BMP</code> image using the <EM>magic number</EM></li>
(LOAD-IMAGE &amp;quot;image.bmp&amp;quot;)
(LOAD-IMAGE &amp;quot;image.tga&amp;quot; :IMAGE-TYPE :TGA)
(LOAD-IMAGE &amp;quot;image.bmp&amp;quot; :IMAGE-TYPE :BMP :FORCE T)
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-IMAGE</STRONG></li>
<li><STRONG>LISPBUILDER-SDL</STRONG> only supports <code>BMP</code> images. Any alpha channel present in the source image is ignored. The new <code>SURFACE</code> is created as an <code>RGB</code> surface, not <code>RGBA</code>. </li>
<li><STRONG>LISPBUILDER-SDL-IMAGE</STRONG> supports the following image formats, <code>BMP</code>, <code>GIF</code>, <code>JPG</code>, <code>LBM</code>, <code>PCX</code>, <code>PNG</code>, <code>PNM</code>, <code>TIF</code>, <code>XCF</code>, <code>XPM</code>, <code>XV</code>. <code>BMP</code> and <code>TGA</code>. Alpha channels are supported. The new <code>SURFACE</code> is created as <code>RGB</code> or <code>RGBA</code> as appropriate. </li>
<li><code>:IMAGE-TYPE</code> and <code>:FORCE</code> are ignored for <STRONG>LISPBUILDER-SDL</STRONG>. </li>
</ul>
</blockquote>
<!-- End of entry for LOAD-IMAGE -->
<!-- Entry for MAP-COLOR -->
<p><br>[Generic function]<br><a class=none name='map-color'><b>map-color</b> <i>color <tt>&amp;optional</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Maps <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a> to the pixel format of <a href="#surface">SURFACE</a> and returns the pixel value that best approximates the color value of the surface. If the surface has a palette (8-bit) the index of the closest matching color in the palette will be returned. If the surface has an alpha component it will be returned as all <code>1</code> bits (fully opaque). If the surface color depth is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format). </p>
</blockquote>
<!-- End of entry for MAP-COLOR -->
<!-- Entry for MAP-COLOR-* -->
<p><br>[Generic function]<br><a class=none name='map-color-*'><b>map-color-*</b> <i>r g b a <tt>&amp;optional</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Maps the color specified by the <code>R</code>, <code>G</code>, <code>B</code>, and <code>A</code> color components to the pixel format of <a href="#surface">SURFACE</a> and returns the pixel value that best approximates the color value of the surface. If <code>A</code> is not <code>NIL</code> then the color is assumed to contain an alpha component. See <a href="#map-color">MAP-COLOR</a> for more details. </p>
</blockquote>
<!-- End of entry for MAP-COLOR-* -->
<!-- Entry for NUM-JOYSTICKS -->
<p><br>[Function]<br><a class=none name='num-joysticks'><b>num-joysticks</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for NUM-JOYSTICKS -->
<!-- Entry for PACK-COLOR -->
<p><br>[Generic function]<br><a class=none name='pack-color'><b>pack-color</b> <i>color</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Packs <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a> into a four byte <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for PACK-COLOR -->
<!-- Entry for PIXEL-ALPHA-ENABLED-P -->
<p><br>[Generic function]<br><a class=none name='pixel-alpha-enabled-p'><b>pixel-alpha-enabled-p</b> <i>surface</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for PIXEL-ALPHA-ENABLED-P -->
<!-- Entry for PIXEL-ALPHA-ENABLED-P -->
<p><br>[Method]<br><a class=none><b>pixel-alpha-enabled-p</b> <i>(surface sdl-surface)</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if a pixel alpha component (RGBA) is available, or <code>NIL</code> if unavailable (RGB). <EM>Note</EM>: The pixel alpha component differs from the surface alpha component which is retrieved using <a href="#alpha-enabled-p">ALPHA-ENABLED-P</a>. </p>
</blockquote>
<!-- End of entry for PIXEL-ALPHA-ENABLED-P -->
<!-- Entry for POINT -->
<p><br>[Function]<br><a class=none name='point'><b>point</b> <i><tt>&amp;key</tt> x y</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Creates a new <code>POINT</code> set to the specified horizontal <code>X</code> and vertical <code>Y</code> coordinate. </p>
</blockquote>
<!-- End of entry for POINT -->
<!-- Entry for POINT-* -->
<p><br>[Generic function]<br><a class=none name='point-*'><b>point-*</b> <i>point</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code> and <code>Y</code> coordinates of the object as a spread. The <code>RESULT</code> is <code>(VALUES X Y)</code></p>
</blockquote>
<!-- End of entry for POINT-* -->
<!-- Entry for POSITION-* -->
<p><br>[Generic function]<br><a class=none name='position-*'><b>position-*</b> <i>obj</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#point-*">POINT-*</a></p>
</blockquote>
<!-- End of entry for POSITION-* -->
<!-- Entry for PUSH-QUIT-EVENT -->
<p><br>[Function]<br><a class=none name='push-quit-event'><b>push-quit-event</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Pushes a new <code>SDL_Event</code> of type <code>:SDL-QUIT-EVENT</code> onto the event queue. </p>
</blockquote>
<!-- End of entry for PUSH-QUIT-EVENT -->
<!-- Entry for PUSH-USER-EVENT -->
<p><br>[Function]<br><a class=none name='push-user-event'><b>push-user-event</b> <i><tt>&amp;key</tt> code data1 data2</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Pushes a new <code>SDL_Event</code> of type <code>:SDL-USER-EVENT</code> onto the event queue. </p>
</blockquote>
<!-- End of entry for PUSH-USER-EVENT -->
<!-- Entry for QUERY-CURSOR -->
<p><br>[Function]<br><a class=none name='query-cursor'><b>query-cursor</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Queries the current state of the cursor. Returns <code>T</code> if the cursor is enabled and shown on the display. Returns <code>NIL</code> if the cursor is disabled and hidden. </p>
</blockquote>
<!-- End of entry for QUERY-CURSOR -->
<!-- Entry for QUIT-ON-EXIT -->
<p><br>[Function]<br><a class=none name='quit-on-exit'><b>quit-on-exit</b> <i><tt>&amp;rest</tt> flags</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets one or more SDL subsystems that must be uninitialized in subsequent calls to <a href="#quit-sub-systems">QUIT-SUB-SYSTEMS</a>. </p><h5>Parameters </h5>
<ul><li><code>FLAGS</code> may be one or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code>, <code>SDL-INIT-NOPARACHUTE</code>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns an INTEGER bitmask of the SDL subsystems in <code>FLAGS</code>. </li>
</ul><h5>Example </h5>
<pre><code>(QUIT-ON-EXIT SDL:SDL-INIT-VIDEO SDL:SDL-INIT-CDROM)
</code></pre>
</blockquote>
<!-- End of entry for QUIT-ON-EXIT -->
<!-- Entry for QUIT-SDL -->
<p><br>[Function]<br><a class=none name='quit-sdl'><b>quit-sdl</b> <i><tt>&amp;optional</tt> quit</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Uninitalizes the SDL library when the <code>OPTIONAL</code> parameter <code>QUIT</code> is <code>T</code>, or the value returned by <a href="#sdl-quit-on-exit">SDL-QUIT-ON-EXIT</a> is <code>T</code>. </p>
</blockquote>
<!-- End of entry for QUIT-SDL -->
<!-- Entry for QUIT-SUB-SYSTEMS -->
<p><br>[Function]<br><a class=none name='quit-sub-systems'><b>quit-sub-systems</b> <i><tt>&amp;optional</tt> flags</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Uninitializes the SDL subsystems specified in the <code>INTEGER</code> bitmask <code>FLAGS</code>. <code>FLAGS</code> contains the logior of zero or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code>, <code>SDL-INIT-NOPARACHUTE</code>. </p><p><code>QUIT-SUB-SYSTEMS</code> can be called only after SDL is successfully intialized using <a href="#init-sdl">INIT-SDL</a>. </p>
</blockquote>
<!-- End of entry for QUIT-SUB-SYSTEMS -->
<!-- Entry for R -->
<p><br>[Generic accessor]<br><a class=none name='r'><b>r</b> <i>color</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>r</b> <i>color</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the red color component of the object. </p>
</blockquote>
<!-- End of entry for R -->
<!-- Entry for RANDOM+1 -->
<p><br>[Function]<br><a class=none name='random+1'><b>random+1</b> <i>rnd</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a random number in the range 0 &gt; num &lt;= rnd. </p>
</blockquote>
<!-- End of entry for RANDOM+1 -->
<!-- Entry for RANDOM-RECTANGLE -->
<p><br>[Function]<br><a class=none name='random-rectangle'><b>random-rectangle</b> <i>bound-w bound-h <tt>&amp;optional</tt> rectangle</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Creates and return s a new <code>RECTANGLE</code> of random x, y width and height within the specified bounds of width <code>BOUND-W</code> and height <code>BOUND-H</code>. <code>RECTANGLE</code> if unset will force the creation of a new <code>RECTANGLE</code> object. <code>RECTANGLE</code> if set will be modified with the coordinates. </p>
</blockquote>
<!-- End of entry for RANDOM-RECTANGLE -->
<!-- Entry for READ-PIXEL -->
<p><br>[Function]<br><a class=none name='read-pixel'><b>read-pixel</b> <i>point <tt>&amp;key</tt> clipping surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#read-pixel-*">READ-PIXEL-*</a>. </p><h5>Parameters </h5>
<ul><li><code>POINT</code> is the <a href="#point">POINT</a> coordinates of the pixel. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for READ-PIXEL -->
<!-- Entry for READ-PIXEL-* -->
<p><br>[Function]<br><a class=none name='read-pixel-*'><b>read-pixel-*</b> <i>x y <tt>&amp;key</tt> clipping surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Read the <a href="#color">COLOR</a> of the pixel at <code>X</code> and <code>Y</code> coordiates from <a href="#surface">SURFACE</a>. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> specify the coordinates of the pixel, and are of type <code>INTEGER</code>. </li>
<li><code>:SURFACE</code> is the target <a href="#surface">SURFACE</a>. </li>
<li><code>:COLOR</code> is the pixel color, of <a href="#color">COLOR</a> or <a href="#color-a">COLOR-A</a>. </li>
<li><code>:CLIPPING</code> when left as the default value <code>T</code> will ensure that the pixel is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is slower, but safer to leave <code>CLIPPING</code> as <code>T</code>. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for READ-PIXEL-* -->
<!-- Entry for RECTANGLE -->
<p><br>[Standard class]<br><a class=none name='rectangle'><b>rectangle</b></a>
<blockquote><br>
<p>A <code>RECTANGLE</code> object manages the foreign SDL_Rect object. Free using <a href="#free">FREE</a>. </p>
</blockquote>
<!-- End of entry for RECTANGLE -->
<!-- Entry for RECTANGLE -->
<p><br>[Function]<br><a class=none name='rectangle'><b>rectangle</b> <i><tt>&amp;key</tt> x y w h fp</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Creates a new <code>RECTANGLE</code> from the specified <code>X</code>, <code>Y</code>, width <code>W</code> and height <code>H</code>. If <code>FP&amp;#039; is </code>NIL<code> then a foreign SDL_Rect is created. If </code>FP<code> is a pointer to a foreign SDL_Rect object then </code>FP` is used. </p>
</blockquote>
<!-- End of entry for RECTANGLE -->
<!-- Entry for RECTANGLE-* -->
<p><br>[Generic function]<br><a class=none name='rectangle-*'><b>rectangle-*</b> <i>obj</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> coordinates of the object as a spread. The <code>RESULT</code> is <code>(VALUES X Y WIDTH HEIGHT)</code></p>
</blockquote>
<!-- End of entry for RECTANGLE-* -->
<!-- Entry for RECTANGLE-FROM-EDGES -->
<p><br>[Function]<br><a class=none name='rectangle-from-edges'><b>rectangle-from-edges</b> <i>p1 p2 <tt>&amp;optional</tt> rectangle</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#rectangle-from-edges-*">RECTANGLE-FROM-EDGES-*</a>. </p><ul><li><code>P1</code> and <code>P2</code> are <code>POINTS</code> that specify the bounds of the <code>RECTANGLE</code>. <code>P1</code> specifies the top left coordinate. <code>P2</code> specifies the lower right coordinate. </li>
</ul>
</blockquote>
<!-- End of entry for RECTANGLE-FROM-EDGES -->
<!-- Entry for RECTANGLE-FROM-EDGES-* -->
<p><br>[Function]<br><a class=none name='rectangle-from-edges-*'><b>rectangle-from-edges-*</b> <i>x1 y1 x2 y2 <tt>&amp;optional</tt> rectangle</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a new <code>RECTANGLE</code> using the bounds specified by the <code>INTEGERS</code><code>X1</code>, <code>X2</code>, <code>Y1</code> and <code>Y2</code>. The coordinates of the rectangle are X = X1, Y = Y1, WIDTH = (- X2 X1), HEIGHT = (- Y2 Y1) </p><h5>Parameters </h5>
<ul><li><code>X1</code>, <code>Y1</code> specify the top left coordinate as <code>INTEGERS</code>. </li>
<li><code>X2</code>, <code>Y2</code> specify the bottom right coordinate as <code>INTEGERS</code>. </li>
<li><code>RECTANGLE</code> if unset will force the creation of a new <code>RECTANGLE</code> object. <code>RECTANGLE</code> if set will be modified with the coordinates. </li>
</ul>
</blockquote>
<!-- End of entry for RECTANGLE-FROM-EDGES-* -->
<!-- Entry for RECTANGLE-FROM-MIDPOINT-* -->
<p><br>[Function]<br><a class=none name='rectangle-from-midpoint-*'><b>rectangle-from-midpoint-*</b> <i>x y w h <tt>&amp;optional</tt> rectangle</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a <code>RECTANGLE</code> of width <code>W</code> and height <code>H</code> with the rectangle mid-point at coordinates <code>X</code> and <code>Y</code>. <code>RECTANGLE</code> if unset will force the creation of a new <code>RECTANGLE</code> object. <code>RECTANGLE</code> if set will be modified with the coordinates. </p>
</blockquote>
<!-- End of entry for RECTANGLE-FROM-MIDPOINT-* -->
<!-- Entry for RENDER-STRING-SHADED -->
<p><br>[Function]<br><a class=none name='render-string-shaded'><b>render-string-shaded</b> <i>string fg-color bg-color <tt>&amp;key</tt> font free cache</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Render the string <code>STRING</code> using font <code>FONT</code> with text color <code>FG-COLOR</code> and background color <code>BG-COLOR</code> to a new <code>SURFACE</code>. The dimensions of the new surface are height == <code>FONT</code> height, and width == <code>FONT</code> width * <code>STRING</code> length. The surface background is filled with <code>BG-COLOR</code> so the surface cannot be keyed over other surfaces. Use <code>:CACHE T</code> to cache the new surface in the <code>FONT</code> object. When <code>:FREE T</code> any exisiting cached surface in <code>FONT</code> is automatically freed. When <code>:FREE NIL</code> the caller is responsible for freeing any existing cached surface in <code>FONT</code>. </p><h5>Parameters </h5>
<ul><li><code>STRING</code> is the text to render. </li>
<li><code>FONT</code> is the font face used to render the <code>STRING</code>. Of type <code>FONT</code>. Bound to <code>*DEFAULT-FONT*</code> if unspecified. </li>
<li><code>FG-COLOR</code> color is the text color, of type <code>COLOR</code></li>
<li><code>BG-COLOR</code> color is the background color used to fill the surface, of type <code>COLOR</code></li>
<li><code>FREE</code> when <code>T</code> will free any exisiting cached surface in <code>FONT</code>. </li>
<li><code>CACHE</code> when <code>T</code> will cache the newly created SURFACE in <code>FONT</code>. Any cached surface can be accessed using <a href="#cached-surface">CACHED-SURFACE</a> and can be blitted to a target surface using <a href="#draw-font">DRAW-FONT</a>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns a new cached surface <code>SDL-SURFACE</code>. </li>
</ul><h5>Example </h5>
<pre><code>(RENDER-STRING-SHADED &amp;quot;Hello World!&amp;quot; F-COLOR B-COLOR)
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for RENDER-STRING-SHADED -->
<!-- Entry for RENDER-STRING-SOLID -->
<p><br>[Function]<br><a class=none name='render-string-solid'><b>render-string-solid</b> <i>string <tt>&amp;key</tt> font color free cache</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Render the string <code>STRING</code> using font <code>FONT</code> with text color <code>COLOR</code> to a new <code>SURFACE</code>. The dimensions of the new surface are height == <code>FONT</code> height, and width == <code>FONT</code> width * <code>STRING</code> length. The surface background is transparent and therefore can be keyed over other surfaces. Use <code>:CACHE T</code> to cache the new surface in the <code>FONT</code> object. When <code>:FREE T</code> any exisiting cached surface in <code>FONT</code> is automatically freed. When <code>:FREE NIL</code> the caller is responsible for freeing any existing cached surface in <code>FONT</code>. </p><h5>Parameters </h5>
<ul><li><code>STRING</code> is the text to render. </li>
<li><code>FONT</code> is the font face used to render the <code>STRING</code>. Of type <code>FONT</code>. Bound to <code>*DEFAULT-FONT*</code> if unspecified. </li>
<li><code>COLOR</code> color is the text color, of type <code>COLOR</code>. </li>
<li><code>FREE</code> when <code>T</code> will free any exisitng cached surface in <code>FONT</code>. </li>
<li><code>CACHE</code> when <code>T</code> will cache the newly created SURFACE in <code>FONT</code>. Any cached surface can be accessed using <a href="#cached-surface">CACHED-SURFACE</a> and can be blitted to a target surface using <a href="#draw-font">DRAW-FONT</a>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns a new cached surface <code>SDL-SURFACE</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-STRING-SOLID &amp;quot;Hello World!&amp;quot; :COLOR A-COLOR)
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for RENDER-STRING-SOLID -->
<!-- Entry for RETURN-SUB-SYSTEMS-OF-STATUS -->
<p><br>[Function]<br><a class=none name='return-sub-systems-of-status'><b>return-sub-systems-of-status</b> <i>flags status</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the status <code>STATUS</code> of the the specified SDL subsystems in <code>FLAGS</code> as an INTEGER bitmask. </p><h5>Parameters </h5>
<ul><li><code>FLAGS</code> may contain a logior of zero or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code>, <code>SDL-INIT-NOPARACHUTE</code>. </li>
<li><code>STATUS</code> when <code>T</code> determines the status of initialised subsystems. <code>STATUS</code> when <code>NIL</code>, determines the status of uninitialised subsystems. </li>
</ul><h5>Returns </h5>
<ul><li>Returns an INTEGER bitmask of the SDL subsystems in <code>FLAGS</code> that are initialised when <code>STATUS</code> is <code>T</code> or uninitialised when <code>STATUS</code> is <code>NIL</code>. </li>
</ul>
</blockquote>
<!-- End of entry for RETURN-SUB-SYSTEMS-OF-STATUS -->
<!-- Entry for RLE-ACCEL-ENABLED-P -->
<p><br>[Generic accessor]<br><a class=none name='rle-accel-enabled-p'><b>rle-accel-enabled-p</b> <i>surface</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>rle-accel-enabled-p</b> <i>surface</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for RLE-ACCEL-ENABLED-P -->
<!-- Entry for RLE-ACCEL-ENABLED-P -->
<p><br>[Specialized accessor]<br><a class=none><b>rle-accel-enabled-p</b> <i>(surface sdl-surface)</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>rle-accel-enabled-p</b> <i>(surface sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for RLE-ACCEL-ENABLED-P -->
<!-- Entry for ROTATE-SURFACE -->
<p><br>[Function]<br><a class=none name='rotate-surface'><b>rotate-surface</b> <i>degrees <tt>&amp;key</tt> surface free zoom smooth</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a new <a href="#surface">SURFACE</a> rotated to <code>DEGREES</code>. </p><h5>Parameters </h5>
<ul><li><code>DEGREES</code> is the rotation in degrees. </li>
<li><code>:SURFACE</code> is the surface to rotate <a href="#surface">SURFACE</a>. </li>
<li><code>:FREE</code> when <code>T</code> will free <code>SURFACE</code>. </li>
<li><code>:ZOOM</code> is the scaling factor. </li>
<li><code>:SMOOTH</code> when <code>T</code> will anti-aliase the new surface. </li>
</ul><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
<li><STRONG>LISPBUILDER-SDL</STRONG> supports rotations of only <code>0</code>, <code>90</code>, <code>180</code>, or <code>270</code> degrees. <STRONG>LISPBUILDER-SDL-GFX</STRONG> supports any rotation. </li>
<li><STRONG>LISPBUILDER-SDL</STRONG> ignores <code>:SMOOTH</code>. <STRONG>LISPBUILDER-SDL-GFX</STRONG> supports <code>:SMOOTH</code>. </li>
<li><STRONG>LISPBUILDER-SDL</STRONG> ignores <code>:ZOOM</code>. <STRONG>LISPBUILDER-SDL-GFX</STRONG> supports <code>:ZOOM</code>. </li>
<li><STRONG>LISPBUILDER-SDL-GFX</STRONG> ignores <code>:FREE</code>. </li>
</ul>
</blockquote>
<!-- End of entry for ROTATE-SURFACE -->
<!-- Entry for ROTATE-SURFACE-XY -->
<p><br>[Function]<br><a class=none name='rotate-surface-xy'><b>rotate-surface-xy</b> <i>degrees <tt>&amp;key</tt> surface free zoomx zoomy smooth</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a new <a href="#surface">SURFACE</a> rotated to <code>DEGREES</code>. </p><h5>Parameters </h5>
<ul><li><code>DEGREES</code> is the rotation in degrees. </li>
<li><code>:SURFACE</code> is the surface to rotate <a href="#surface">SURFACE</a>. </li>
<li><code>:FREE</code> when <code>T</code> will free <code>SURFACE</code>. </li>
<li><code>:ZOOMX</code> and <code>ZOOMY</code> are the the scaling factors. A negative scaling factor will flip the corresponding axis. <STRONG>Note</STRONG>: Flipping is only supported with anti-aliasing turned off. </li>
<li><code>:SMOOTH</code> when <code>T</code> will anti-aliase the new surface. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
<li><STRONG>LISPBUILDER-SDL-GFX</STRONG> ignores <code>:FREE</code>. </li>
</ul>
</blockquote>
<!-- End of entry for ROTATE-SURFACE-XY -->
<!-- Entry for RWOPS -->
<p><br>[Standard class]<br><a class=none name='rwops'><b>rwops</b></a>
<blockquote><br>
<p>A wrapper around a foreign SDL_RWops object. Free using <a href="#free">FREE</a>. </p>
</blockquote>
<!-- End of entry for RWOPS -->
<!-- Entry for SAVE-IMAGE -->
<p><br>[Function]<br><a class=none name='save-image'><b>save-image</b> <i>surface filename</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Saves the <code>SURFACE</code> as a <code>BMP</code> image to a file at location <code>FILENAME</code>. </p>
</blockquote>
<!-- End of entry for SAVE-IMAGE -->
<!-- Entry for SDL-ANY-FORMAT -->
<p><br>[Constant]<br><a class=none name='sdl-any-format'><b>sdl-any-format</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Causes SDL to return a <a href="#display-surface">DISPLAY-SURFACE</a> of any pixel depth if the requested pixel depth is unavailable. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that the surface was created with <code>SDL-ANY-FORMAT</code>. </li>
</ul><p>Normally, if a <a href="#display-surface">DISPLAY-SURFACE</a> of the requested bits-per-pixel (bpp) is not available, SDL will emulate one with a shadow surface. Passing <code>SDL-ANY-FORMAT</code> prevents this and causes SDL to use the <a href="#display-surface">DISPLAY-SURFACE</a> surface, regardless of its pixel depth. </p>
</blockquote>
<!-- End of entry for SDL-ANY-FORMAT -->
<!-- Entry for SDL-ASYNC-BLIT -->
<p><br>[Constant]<br><a class=none name='sdl-async-blit'><b>sdl-async-blit</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Enables the use of asynchronous updates of the <a href="#display-surface">DISPLAY-SURFACE</a>. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates if the surface uses asynchronous blits when possible. </li>
</ul><p>Asynchronous blits usually slows down blitting on single CPU machines, but may provide a speed increase on SMP systems. </p>
</blockquote>
<!-- End of entry for SDL-ASYNC-BLIT -->
<!-- Entry for SDL-DOUBLEBUF -->
<p><br>[Constant]<br><a class=none name='sdl-doublebuf'><b>sdl-doublebuf</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Enable hardware double buffering; only valid with <a href="#sdl-hw-surface">SDL-HW-SURFACE</a>. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; Indicages that the surface is double buffered. </li>
</ul><p>Calling <a href="#sdl-flip">SDL-FLIP</a> will flip the buffers and update the screen. All drawing will take place on the surface that is not displayed at the moment. If double buffering could not be enabled then <a href="#sdl-flip">SDL-FLIP</a> will just perform a <a href="#sdl-update-rect">SDL-UPDATE-RECT</a> on the entire screen. </p>
</blockquote>
<!-- End of entry for SDL-DOUBLEBUF -->
<!-- Entry for SDL-FULLSCREEN -->
<p><br>[Constant]<br><a class=none name='sdl-fullscreen'><b>sdl-fullscreen</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; SDL will attempt to use a fullscreen mode. If a hardware resolution change is not possible (for whatever reason), the next higher resolution will be used and the display window centered on a black background. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that the surface is full-screen. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-FULLSCREEN -->
<!-- Entry for SDL-GET-TICKS -->
<p><br>[Function]<br><a class=none name='sdl-get-ticks'><b>sdl-get-ticks</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-GET-TICKS -->
<!-- Entry for SDL-HW-ACCEL -->
<p><br>[Constant]<br><a class=none name='sdl-hw-accel'><b>sdl-hw-accel</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a> and <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a> and <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that surface blitting will use hardware acceloration. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-HW-ACCEL -->
<!-- Entry for SDL-HW-PALETTE -->
<p><br>[Constant]<br><a class=none name='sdl-hw-palette'><b>sdl-hw-palette</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a> and <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Gives SDL exclusive palette access to <a href="#display-surface">DISPLAY-SURFACE</a>. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that the surface has an exclusive palette. </li>
</ul><p>Without this flag you may not always get the the colors you request with <a href="#sdl-set-colors">SDL-SET-COLORS</a> or <a href="#sdl-set-palette">SDL-SET-PALETTE</a>. </p>
</blockquote>
<!-- End of entry for SDL-HW-PALETTE -->
<!-- Entry for SDL-HW-SURFACE -->
<p><br>[Constant]<br><a class=none name='sdl-hw-surface'><b>sdl-hw-surface</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a> and <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a> or <a href="#create-surface">CREATE-SURFACE</a>; Create the <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a> in video memory. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates if the surface is stored in video memory. </li>
</ul><p>This will allow SDL to take advantage of Video-&gt;Video blits (which are often accelerated). </p>
</blockquote>
<!-- End of entry for SDL-HW-SURFACE -->
<!-- Entry for SDL-INIT-AUDIO -->
<p><br>[Constant]<br><a class=none name='sdl-init-audio'><b>sdl-init-audio</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-AUDIO -->
<!-- Entry for SDL-INIT-CDROM -->
<p><br>[Constant]<br><a class=none name='sdl-init-cdrom'><b>sdl-init-cdrom</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-CDROM -->
<!-- Entry for SDL-INIT-EVENTTHREAD -->
<p><br>[Constant]<br><a class=none name='sdl-init-eventthread'><b>sdl-init-eventthread</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-EVENTTHREAD -->
<!-- Entry for SDL-INIT-EVERYTHING -->
<p><br>[Constant]<br><a class=none name='sdl-init-everything'><b>sdl-init-everything</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-EVERYTHING -->
<!-- Entry for SDL-INIT-JOYSTICK -->
<p><br>[Constant]<br><a class=none name='sdl-init-joystick'><b>sdl-init-joystick</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-JOYSTICK -->
<!-- Entry for SDL-INIT-NOPARACHUTE -->
<p><br>[Constant]<br><a class=none name='sdl-init-noparachute'><b>sdl-init-noparachute</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-NOPARACHUTE -->
<!-- Entry for SDL-INIT-ON-STARTUP -->
<p><br>[Function]<br><a class=none name='sdl-init-on-startup'><b>sdl-init-on-startup</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if the SDL library must be initialised in <a href="#init-sdl">INIT-SDL</a>, or <a href="#with-init">WITH-INIT</a>. Returns <code>NIL</code> otherwise. </p>
</blockquote>
<!-- End of entry for SDL-INIT-ON-STARTUP -->
<!-- Entry for SDL-INIT-TIMER -->
<p><br>[Constant]<br><a class=none name='sdl-init-timer'><b>sdl-init-timer</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-TIMER -->
<!-- Entry for SDL-INIT-VIDEO -->
<p><br>[Constant]<br><a class=none name='sdl-init-video'><b>sdl-init-video</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-VIDEO -->
<!-- Entry for SDL-IYUV-OVERLAY -->
<p><br>[Constant]<br><a class=none name='sdl-iyuv-overlay'><b>sdl-iyuv-overlay</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-IYUV-OVERLAY -->
<!-- Entry for SDL-JOYSTICK-NAME -->
<p><br>[Function]<br><a class=none name='sdl-joystick-name'><b>sdl-joystick-name</b> <i>device-index</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-JOYSTICK-NAME -->
<!-- Entry for SDL-NO-FRAME -->
<p><br>[Constant]<br><a class=none name='sdl-no-frame'><b>sdl-no-frame</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; If possible, <code>SDL-NO-FRAME</code> causes SDL to create a window with no title bar or frame decoration. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; <STRONG></STRONG>Note: Per the SDL documentation, this is not stored in <code>FLAGS</code>. </li>
</ul><p>Fullscreen modes automatically have this flag set. </p>
</blockquote>
<!-- End of entry for SDL-NO-FRAME -->
<!-- Entry for SDL-OPENGL -->
<p><br>[Constant]<br><a class=none name='sdl-opengl'><b>sdl-opengl</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Create an OpenGL rendering context. You should have previously set OpenGL video attributes with <a href="#sdl-gl-set-attribute">SDL-GL-SET-ATTRIBUTE</a>. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that the surface has an OpenGL rendering context. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-OPENGL -->
<!-- Entry for SDL-PRE-ALLOC -->
<p><br>[Constant]<br><a class=none name='sdl-pre-alloc'><b>sdl-pre-alloc</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a>. <ul><li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a>; Indicates that surface uses preallocated memory. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-PRE-ALLOC -->
<!-- Entry for SDL-QUIT-ON-EXIT -->
<p><br>[Function]<br><a class=none name='sdl-quit-on-exit'><b>sdl-quit-on-exit</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if the SDL library must be uninitialised in <a href="#quit-sdl">QUIT-SDL</a>, or <a href="#with-init">WITH-INIT</a>. Returns <code>NIL</code> otherwise. </p>
</blockquote>
<!-- End of entry for SDL-QUIT-ON-EXIT -->
<!-- Entry for SDL-RESIZABLE -->
<p><br>[Constant]<br><a class=none name='sdl-resizable'><b>sdl-resizable</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Create a resizable window. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that the surface is resizable. </li>
</ul><p>When the window is resized by the user a :VIDEO-RESIZE-EVENT event is generated and <a href="#window">WINDOW</a> can be called again with the new size. </p>
</blockquote>
<!-- End of entry for SDL-RESIZABLE -->
<!-- Entry for SDL-RLE-ACCEL -->
<p><br>[Constant]<br><a class=none name='sdl-rle-accel'><b>sdl-rle-accel</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a><ul><li>When passed as a <code>FLAG</code> to <a href="#set-color-key">SET-COLOR-KEY</a>; The surface will be drawn using RLE acceleration when drawn with <a href="#blit-surface">BLIT-SURFACE</a>, and <a href="#draw-surface">DRAW-SURFACE</a>. The surface will actually be encoded for RLE acceleration the first time <a href="#blit-surface">BLIT-SURFACE</a>, <a href="#draw-surface">DRAW-SURFACE</a> or <a href="#convert-surface">CONVERT-SURFACE</a> is called on the surface. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a>; Indicates that colorkey blitting is accelerated with RLE. </li>
</ul><p>RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i.e., pixels that match the key color). The key must be of the same pixel format as the surface, <a href="#map-color">MAP-COLOR</a> is often useful for obtaining an acceptable value. </p>
</blockquote>
<!-- End of entry for SDL-RLE-ACCEL -->
<!-- Entry for SDL-RLE-ACCEL-OK -->
<p><br>[Constant]<br><a class=none name='sdl-rle-accel-ok'><b>sdl-rle-accel-ok</b></a>
<blockquote><br>
<p>Applies to <a href="#surface">SURFACE</a>. </p>
</blockquote>
<!-- End of entry for SDL-RLE-ACCEL-OK -->
<!-- Entry for SDL-SRC-ALPHA -->
<p><br>[Constant]<br><a class=none name='sdl-src-alpha'><b>sdl-src-alpha</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#create-surface">CREATE-SURFACE</a> and <a href="#set-alpha">SET-ALPHA</a>; Turns on alpha-blending for blits from this surface. If <a href="#sdl-hw-surface">SDL-HW-SURFACE</a> is also specified and alpha-blending blits are hardware-accelerated, then the surface will be placed in video memory if possible. If the screen is a hardware surface and alpha-blending blits are hardware-accelerated then the <a href="#sdl-hw-surface">SDL-HW-SURFACE</a> flag will be set. Use <a href="#set-alpha">SET-ALPHA</a> to set or clear this flag after surface creation. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a>; Indicates that surface blitting uses alpha blending. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-SRC-ALPHA -->
<!-- Entry for SDL-SRC-COLOR-KEY -->
<p><br>[Constant]<br><a class=none name='sdl-src-color-key'><b>sdl-src-color-key</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#create-surface">CREATE-SURFACE</a> and <a href="#set-color-key">SET-COLOR-KEY</a>; Turns on color keying for blits from this surface. If <a href="#sdl-hw-surface">SDL-HW-SURFACE</a> is also specified and color keyed blits are hardware-accelerated, then SDL will attempt to place the surface in video memory. If the screen is a hardware surface and color keyed blits are hardware-accelerated then the <a href="#sdl-hw-surface">SDL-HW-SURFACE</a> flag will be set. Use <a href="#set-color-key">SET-COLOR-KEY</a> to set or clear this flag after surface creation. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a>; Indicates that the surface uses colorkey blitting. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-SRC-COLOR-KEY -->
<!-- Entry for SDL-SURFACE -->
<p><br>[Standard class]<br><a class=none name='sdl-surface'><b>sdl-surface</b></a>
<blockquote><br>
<p>A wrapper for the foreign SDL_Surface object. </p>
</blockquote>
<!-- End of entry for SDL-SURFACE -->
<!-- Entry for SDL-SW-SURFACE -->
<p><br>[Constant]<br><a class=none name='sdl-sw-surface'><b>sdl-sw-surface</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a> and <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a> or <a href="#create-surface">CREATE-SURFACE</a>; Create the <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a> in system memory. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates if the surface is stored in system memory. </li>
</ul><p>This improves the performance of pixel level access, however you may not be able to take advantage of some types of hardware blitting. </p>
</blockquote>
<!-- End of entry for SDL-SW-SURFACE -->
<!-- Entry for SDL-UYVY-OVERLAY -->
<p><br>[Constant]<br><a class=none name='sdl-uyvy-overlay'><b>sdl-uyvy-overlay</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-UYVY-OVERLAY -->
<!-- Entry for SDL-WM-GRAB-INPUT -->
<p><br>[Function]<br><a class=none name='sdl-wm-grab-input'><b>sdl-wm-grab-input</b> <i>mode</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-WM-GRAB-INPUT -->
<!-- Entry for SDL-YUY2-OVERLAY -->
<p><br>[Constant]<br><a class=none name='sdl-yuy2-overlay'><b>sdl-yuy2-overlay</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-YUY2-OVERLAY -->
<!-- Entry for SDL-YV12-OVERLAY -->
<p><br>[Constant]<br><a class=none name='sdl-yv12-overlay'><b>sdl-yv12-overlay</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-YV12-OVERLAY -->
<!-- Entry for SDL-YVYU-OVERLAY -->
<p><br>[Constant]<br><a class=none name='sdl-yvyu-overlay'><b>sdl-yvyu-overlay</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-YVYU-OVERLAY -->
<!-- Entry for SET-CELL -->
<p><br>[Function]<br><a class=none name='set-cell'><b>set-cell</b> <i>rectangle <tt>&amp;key</tt> surface index</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets the <code>CELL</code> at <code>INDEX</code> to the bounds of <code>RECTANGLE</code>. <EM>Note:</EM> When <code>SURFACE</code> is the source of a blit, only the area within the cell rectangle is drawn. </p>
</blockquote>
<!-- End of entry for SET-CELL -->
<!-- Entry for SET-CELL-* -->
<p><br>[Function]<br><a class=none name='set-cell-*'><b>set-cell-*</b> <i>x y w h <tt>&amp;key</tt> surface index</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets the <code>CELL</code> at <code>INDEX</code> to a rectangle bounded by <code>X</code>, <code>Y</code>, <code>W</code> and <code>H</code>. <EM>Note:</EM> When <code>SURFACE</code> is the source of a blit, only the area within the cell rectangle is drawn. </p>
</blockquote>
<!-- End of entry for SET-CELL-* -->
<!-- Entry for SET-CLIP-RECT -->
<p><br>[Function]<br><a class=none name='set-clip-rect'><b>set-clip-rect</b> <i>rectangle <tt>&amp;key</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#clip-rect">CLIP-RECT</a>. </p>
</blockquote>
<!-- End of entry for SET-CLIP-RECT -->
<!-- Entry for SET-COLOR -->
<p><br>[Generic function]<br><a class=none name='set-color'><b>set-color</b> <i>dst src</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Copies the <code>RGB/A</code> color components to the destination <code>DST</code> from the source <code>SRC</code>. </p>
</blockquote>
<!-- End of entry for SET-COLOR -->
<!-- Entry for SET-COLOR-* -->
<p><br>[Generic function]<br><a class=none name='set-color-*'><b>set-color-*</b> <i>color <tt>&amp;key</tt> r g b a</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets <code>COLOR</code> to the red <code>R</code>, green <code>G</code>, blue <code>B</code> and alpha <code>A</code> color components. </p>
</blockquote>
<!-- End of entry for SET-COLOR-* -->
<!-- Entry for SET-GL-ATTRIBUTE -->
<p><br>[Function]<br><a class=none name='set-gl-attribute'><b>set-gl-attribute</b> <i>attribute value</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SET-GL-ATTRIBUTE -->
<!-- Entry for SET-POINT -->
<p><br>[Generic function]<br><a class=none name='set-point'><b>set-point</b> <i>dst src</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Copies the <code>X</code> and <code>Y</code> coordinates to the destination <code>DST</code> from the source <code>SRC</code>. </p>
</blockquote>
<!-- End of entry for SET-POINT -->
<!-- Entry for SET-POINT-* -->
<p><br>[Generic function]<br><a class=none name='set-point-*'><b>set-point-*</b> <i>obj <tt>&amp;key</tt> x y</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code> and <code>Y</code> coordinates of the object <code>OBJ</code>. <code>X</code> and <code>Y</code> are <code>KEY</code>word parameters. </p>
</blockquote>
<!-- End of entry for SET-POINT-* -->
<!-- Entry for SET-POSITION -->
<p><br>[Generic function]<br><a class=none name='set-position'><b>set-position</b> <i>dst src</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#set-point">SET-POINT</a></p>
</blockquote>
<!-- End of entry for SET-POSITION -->
<!-- Entry for SET-POSITION-* -->
<p><br>[Generic function]<br><a class=none name='set-position-*'><b>set-position-*</b> <i>obj <tt>&amp;key</tt> x y</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#set-point-*">SET-POINT-*</a></p>
</blockquote>
<!-- End of entry for SET-POSITION-* -->
<!-- Entry for SET-RECTANGLE -->
<p><br>[Generic function]<br><a class=none name='set-rectangle'><b>set-rectangle</b> <i>dst src</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Copies the <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> coordinates to the destination rectangle <code>DST</code> from the source rectangle <code>SRC</code>. </p>
</blockquote>
<!-- End of entry for SET-RECTANGLE -->
<!-- Entry for SET-RECTANGLE-* -->
<p><br>[Generic function]<br><a class=none name='set-rectangle-*'><b>set-rectangle-*</b> <i>rectangle <tt>&amp;key</tt> x y w h</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> coordinates of the rectangle <code>RECTANGLE</code>. <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> are <code>KEY</code>word parameters having default values of <code>0</code> if unspecified. </p>
</blockquote>
<!-- End of entry for SET-RECTANGLE-* -->
<!-- Entry for SET-SURFACE -->
<p><br>[Generic function]<br><a class=none name='set-surface'><b>set-surface</b> <i>surface position</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets the coordinates of the surface SURFACE to <code>POSITION</code>, where position is of type <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for SET-SURFACE -->
<!-- Entry for SET-SURFACE-* -->
<p><br>[Generic function]<br><a class=none name='set-surface-*'><b>set-surface-*</b> <i>surface <tt>&amp;key</tt> x y</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets the coordinates of the surface <code>SURFACE</code>. <code>X</code> and <code>Y</code> are <code>KEY</code>word parameters having default values of <code>0</code> if unspecified. </p>
</blockquote>
<!-- End of entry for SET-SURFACE-* -->
<!-- Entry for SHOW-CURSOR -->
<p><br>[Function]<br><a class=none name='show-cursor'><b>show-cursor</b> <i>state</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Disables the cursor when state is <code>NIL</code>, otherwise enables the cursor. </p>
</blockquote>
<!-- End of entry for SHOW-CURSOR -->
<!-- Entry for SURFACE -->
<p><br>[Standard class]<br><a class=none name='surface'><b>surface</b></a>
<blockquote><br>
<p>This object is garbage collected and the <code>SDL_Surface</code> object freed when out of scope. Free using <a href="#free">FREE</a>. </p>
</blockquote>
<!-- End of entry for SURFACE -->
<!-- Entry for SURFACE-INFO -->
<p><br>[Function]<br><a class=none name='surface-info'><b>surface-info</b> <i>surface <tt>&amp;optional</tt> info</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns information about the SDL surface <code>SURFACE</code>. </p><h5>Parameters </h5>
<ul><li><code>SURFACE</code> is an SDL surface of type <a href="#sdl-surface">SDL-SURFACE</a>. </li>
<li><code>INFO</code> must be one of <code>NIL</code>, <a href="#sdl-sw-surface">SDL-SW-SURFACE</a>, <a href="#sdl-hw-surface">SDL-HW-SURFACE</a>, <a href="#sdl-async-blit">SDL-ASYNC-BLIT</a>, <a href="#sdl-any-format">SDL-ANY-FORMAT</a>, <a href="#sdl-hw-palette">SDL-HW-PALETTE</a>, <a href="#sdl-doublebuf">SDL-DOUBLEBUF</a>, <a href="#sdl-fullscreen">SDL-FULLSCREEN</a>, <a href="#sdl-opengl">SDL-OPENGL</a>, <a href="#sdl-resizable">SDL-RESIZABLE</a><a href="#sdl-hw-accel">SDL-HW-ACCEL</a>, <a href="#sdl-src-color-key">SDL-SRC-COLOR-KEY</a>, <a href="#sdl-rle-accel">SDL-RLE-ACCEL</a>, <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a> or <a href="#sdl-pre-alloc">SDL-PRE-ALLOC</a>. </li>
</ul><h5>Returns </h5>
<p><code>INFO</code> when <code>NIL</code> will return a list of all enabled surface flags. Otherwise will return <code>INFO</code> as <code>T</code> or <code>NIL</code> if supported by the surface. </p><h5>Example </h5>
<pre><code>(SURFACE-INFO A-SURFACE &amp;#039;(SDL-HW-SURFACE SDL-HW-PALETTE SDL-HW-ACCELL))
</code></pre>
</blockquote>
<!-- End of entry for SURFACE-INFO -->
<!-- Entry for TIME-SCALE -->
<p><br>[Function]<br><a class=none name='time-scale'><b>time-scale</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for TIME-SCALE -->
<!-- Entry for TO-DEGREE -->
<p><br>[Function]<br><a class=none name='to-degree'><b>to-degree</b> <i>radian</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Converts radians to degrees. </p>
</blockquote>
<!-- End of entry for TO-DEGREE -->
<!-- Entry for TO-RADIAN -->
<p><br>[Function]<br><a class=none name='to-radian'><b>to-radian</b> <i>degree</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Converts degrees to radians. </p>
</blockquote>
<!-- End of entry for TO-RADIAN -->
<!-- Entry for UPDATE-DISPLAY -->
<p><br>[Function]<br><a class=none name='update-display'><b>update-display</b> <i><tt>&amp;optional</tt> surface</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>When <a href="#opengl-context">OPENGL-CONTEXT</a> is <code>NIL</code>; <code>UPDATE-DISPLAY</code> will flip the SDL video buffers and update the screen <code>SURFACE</code> if <code>SDL-HW-SURFACE</code> is set in <a href="#window">WINDOW</a>. If double buffering is not enabled then SDL will perform an <a href="#sdl-update-rect">SDL-UPDATE-RECT</a> on the entire screen. </p><p>When <a href="#opengl-context">OPENGL-CONTEXT</a> is <code>T</code>; <code>UPDATE-DISPLAY</code> will call <a href="#sdl-gl-swap-buffers">SDL-GL-SWAP-BUFFERS</a> to update the OpenGL display context. </p><p><code>SURFACE</code> is bound to <code>*DEFAULT-DISPLAY*</code> if unspecified. </p>
</blockquote>
<!-- End of entry for UPDATE-DISPLAY -->
<!-- Entry for UPDATE-SURFACE -->
<p><br>[Function]<br><a class=none name='update-surface'><b>update-surface</b> <i>surface <tt>&amp;optional</tt> template</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Updates the surface </p>
</blockquote>
<!-- End of entry for UPDATE-SURFACE -->
<!-- Entry for UPDATE-SURFACE-* -->
<p><br>[Function]<br><a class=none name='update-surface-*'><b>update-surface-*</b> <i>surface x y w h</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>See <a href="#update-surface">UPDATE-SURFACE</a>. </p>
</blockquote>
<!-- End of entry for UPDATE-SURFACE-* -->
<!-- Entry for VIDEO-DIMENSIONS -->
<p><br>[Function]<br><a class=none name='video-dimensions'><b>video-dimensions</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the best video dimensions if called before a window is created, using <a href="#window">WINDOW</a>. Returns the current video dimensions if called after a window is created. Must be called after SDL is initialized using <a href="#init-sdl">INIT-SDL</a> or <a href="#with-init">WITH-INIT</a></p>
</blockquote>
<!-- End of entry for VIDEO-DIMENSIONS -->
<!-- Entry for VIDEO-DRIVER-NAME -->
<p><br>[Function]<br><a class=none name='video-driver-name'><b>video-driver-name</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the driver name of the initialised video driver. The driver name is a <code>STRING</code> containing a one-word identifier like &quot;x11&quot; or &quot;windib&quot;. Returns &#039;NIL&#039; if the video driver is not already initialised with <a href="#init-sdl">INIT-SDL</a> or <a href="#with-init">WITH-INIT</a>. </p><h5>Example </h5>
<pre><code>(sdl:with-init ()
(sdl:video-driver-name))
&amp;gt;&amp;gt; &amp;quot;windib&amp;quot;
</code></pre>
</blockquote>
<!-- End of entry for VIDEO-DRIVER-NAME -->
<!-- Entry for VIDEO-INFO -->
<p><br>[Function]<br><a class=none name='video-info'><b>video-info</b> <i><tt>&amp;optional</tt> info</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns information about the video hardware. <code>GET-VIDEO-INFO</code> must be called after SDL is initialised using <a href="#init-sdl">INIT-SDL</a> or <a href="#with-init">WITH-INIT</a>. If <code>GET-VIDEO-INFO</code> is called before <a href="#window">WINDOW</a>, the information returned is of the <EM>best</EM> video mode. If <code>GET-VIDEO-INFO</code> is called after <a href="#window">WINDOW</a>, the information returned is of the <EM>current</EM> video mode. </p><h5>Parameters </h5>
<ul><li><code>INFO</code> can be one of <code>:HW-AVAILABLE</code>, <code>:WM-AVAILABLE</code>, <code>:BLIT-HW</code>, <code>:BLIT-HW-CC</code>, <code>:BLIT-HW-A</code>, <code>:BLIT-SW</code>, <code>:BLIT-SW-CC</code>, <code>:BLIT-SW-A</code>or <code>:BLIT-FILL</code>. If <code>NIL</code>, returns a list of all supported video flags. </li>
</ul><h5>Example </h5>
<pre><code>(video-info :HW-AVAILABLE)
</code></pre>
</blockquote>
<!-- End of entry for VIDEO-INFO -->
<!-- Entry for VIDEO-MEMORY -->
<p><br>[Function]<br><a class=none name='video-memory'><b>video-memory</b> <i></i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns the amount of video memory of the graphics hardware. Must be called after SDL is initialized using <a href="#init-sdl">INIT-SDL</a> or <a href="#with-init">WITH-INIT</a>. </p>
</blockquote>
<!-- End of entry for VIDEO-MEMORY -->
<!-- Entry for WIDTH -->
<p><br>[Generic accessor]<br><a class=none name='width'><b>width</b> <i>obj</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>width</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the width of the object, as an <code>INTEGER</code>. When <code>OBJ</code> is a <a href="#font">FONT</a>, use the cached <a href="#surface">SURFACE</a>. </p>
</blockquote>
<!-- End of entry for WIDTH -->
<!-- Entry for WINDOW -->
<p><br>[Function]<br><a class=none name='window'><b>window</b> <i>width height <tt>&amp;key</tt> bpp flags title-caption icon-caption</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Creates a new SDL window of pixel width <code>WIDTH</code> and height <code>HEIGHT</code> using SDL_SetVideoMode. </p><p>Use <code>SDL-SW-SURFACE</code> if you plan on doing per-pixel manipulations, or blit surfaces with alpha channels, and require a high framerate. When you use hardware surfaces like <code>SDL-HW-SURFACE</code>, SDL copies the surfaces from video memory to system memory when you lock them, and back when you unlock them. This can cause a major performance hit. (Be aware that you may request a hardware surface, but receive a software surface. Many platforms can only provide a hardware surface when using <code>SDL-FULL-SCREEN.) </code>SDL-HW-SURFACE` is best used when the surfaces you&#039;ll be blitting can also be stored in video memory. </p><p><EM>Note:</EM> To control the position on the screen when creating a windowed surface, set the environment variables <code>SDL_VIDEO_CENTERED=center</code> or <code>SDL_VIDEO_WINDOW_POS=x,y</code>. These may be set using <a href="#sdl-put-env">SDL-PUT-ENV</a>. </p><h5>Parameters </h5>
<ul><li><code>WIDTH</code> the pixel width of the window, of type <code>INTEGER</code>. </li>
<li><code>HEIGHT</code> the pixel height of the window, of type <code>INTEGER</code>. If <code>WIDTH</code> and <code>HEIGHT</code> are both <code>0</code>, then the width and height of the current video mode is used (or the desktop mode, if no mode has been set). </li>
<li><code>BPP</code> the number of bits per pixel. Defaults to <code>0</code> which is the current display bits per pixel. <EM>Note:</EM> A <code>BPP</code> of <code>24</code> uses the packed representation of 3 bytes/pixel. For the more common 4 bytes/pixel mode, use a <code>BPP</code> of 32. </li>
<li><code>FLAGS</code> is a bitmasked logior of one or more of the following; <a href="#sdl-sw-surface">SDL-SW-SURFACE</a>, <a href="#sdl-hw-surface">SDL-HW-SURFACE</a>, <a href="#sdl-async-blit">SDL-ASYNC-BLIT</a>, <a href="#sdl-any-format">SDL-ANY-FORMAT</a>, <a href="#sdl-hw-palette">SDL-HW-PALETTE</a>, <a href="#sdl-doublebuf">SDL-DOUBLEBUF</a>, <a href="#sdl-fullscreen">SDL-FULLSCREEN</a>, <a href="#sdl-opengl">SDL-OPENGL</a>, <a href="#sdl-resizable">SDL-RESIZABLE</a> and <a href="#SDL-NO-FRAME">SDL-NO-FRAME</a>. </li>
<li><code>TITLE-CAPTION</code> is the title that appears in the Window title bar, of type <code>STRING</code>. </li>
<li><code>ICON-CAPTION</code> is the title that appears when the Window is minimized, of type <code>STRING</code>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns a new <code>DISPLAY-SURFACE</code> if successful, <code>NIL</code> if unsuccessful. Whatever flags SDL_SetVideoMode could satisfy are set in the flags member of <code>SURFACE</code>. The <code>SURFACE</code> returned is freed by SDL and should never be freed by the caller. This rule includes consecutive calls to <code>WINDOW</code> (i.e. upon resize or resolution change) - any existing surface will be released automatically by SDL. </li>
</ul><h5>Example </h5>
<pre><code>(WINDOW 320 240 :TITLE-CAPTION &amp;quot;Random-Rects&amp;quot; :ICON-CAPTION &amp;quot;Random-Rects&amp;quot;
:FLAGS &amp;#039;(SDL-DOUBLEBUF SDL-FULLSCREEN))
</code></pre>
</blockquote>
<!-- End of entry for WINDOW -->
<!-- Entry for WITH-BEZIER -->
<p><br>[Macro]<br><a class=none name='with-bezier'><b>with-bezier</b> <i>(<tt>&amp;optional</tt> style segments) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a bezier curve of <code>*DEFAULT-COLOR*</code> to <code>*DEFAULT-SURFACE*</code>. The shape of the Bezier curve is defined by control points. A control point is a vertex containing an X and Y coordinate pair. </p><p>The number of segments <code>SEGENTS</code> used to draw the Bezier curve defaults to 10. The greater the number of segments, the smoother the Bezier curve. </p><h5>Local Methods </h5>
<p>A vertex may be added using: </p><ul><li><code>ADD-VERTEX</code> which accepts an <code>POINT</code>, or </li>
<li><code>ADD-VERTEX-*</code> which is the x/y spread version </li>
</ul><p><code>ADD-VERTEX</code> and <code>ADD-VERTEX-*</code> are valid only within the scop of <code>WITH-BEZIER</code>. </p><h5>Parameters </h5>
<ul><li><code>STYLE</code> is one of <code>:SOLID</code>, <code>:DASH</code>, or <code>:POINTS</code>. When <code>STYLE</code> is <code>:SOLID</code>, a single continuous line is drawn through the specified waypoints. When <code>STYLE</code> is <code>:DASH</code>, a line is drawn to alternate waypoint pairs. When <code>STYLE</code> is <code>:POINTS</code>, a single point is drawn at each waypoint. </li>
<li><code>SEGMENTS</code> is the number of segments used to draw the Bezier curve. Default is 20 segments if unspecified. The greater the number of segments, the smoother the curve. </li>
</ul><h5>Example </h5>
<pre><code>(SDL:WITH-COLOR (COL (SDL:COLOR))
(WITH-BEZIER ()
(ADD-VERTEX-* 60 40)
(ADD-VERTEX-* 160 10)
(ADD-VERTEX-* 170 150)
(ADD-VERTEX-* 60 150)))
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for WITH-BEZIER -->
<!-- Entry for WITH-COLOR -->
<p><br>[Macro]<br><a class=none name='with-color'><b>with-color</b> <i>(var <tt>&amp;optional</tt> color free) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>A convience macro that binds <code>*DEFAULT-COLOR*</code> to <code>VAR</code> within the scope of <code>WITH-COLOR</code>. <code>VAR</code> is set to <code>COLOR</code> when <code>COLOR</code> is not <code>NIL</code>.<code>VAR</code> must be of type <a href="#color">COLOR</a>, or <a href="#color-a">COLOR-A</a>. <code>VAR</code> is freed using <a href="#free">FREE</a> when <code>FREE</code> is <code>T</code>. </p>
</blockquote>
<!-- End of entry for WITH-COLOR -->
<!-- Entry for WITH-CURVE -->
<p><br>[Macro]<br><a class=none name='with-curve'><b>with-curve</b> <i>(<tt>&amp;optional</tt> style segments) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a Cattmul-Rom spline of <code>*DEFAULT-COLOR*</code> to <code>*DEFAULT-SURFACE*</code>. The shape of the curve is defined by waypoints. A waypoint is a vertex containing an X and Y coordinate pair. </p><h5>Local Methods </h5>
<p>A vertex may be added using: </p><ul><li><code>ADD-VERTEX</code> which accepts an <code>SDL:POINT</code>, or </li>
<li><code>ADD-VERTEX-*</code> which is the x/y spread version </li>
</ul><p><code>ADD-VERTEX</code> and <code>ADD-VERTEX-*</code> are valid only within the scope of <code>WITH-CURVE</code>. </p><h5>Parameters </h5>
<ul><li><code>STYLE</code> describes the line style used to draw the curve and may be one of <code>:SOLID</code>, <code>:DASH</code>, or <code>:POINTS</code>. Use <code>:SOLID</code> to draw a single continuous line through the specified waypoints. Use <code>:DASH</code> to draw a line between alternate waypoint pairs. Use <code>:POINTS</code> to draw a single pixel at each waypoint. </li>
<li><code>SEGMENTS</code> is the number of segments used to draw the Catmull-Rom spline. Default is 20 segments if unspecified. The greater the number of segments, the smoother the spline. </li>
</ul><h5>Example </h5>
<pre><code>(SDL:WITH-COLOR (COL (SDL:COLOR))
(WITH-CURVE (:SOLID 30)
(ADD-VERTEX-* 60 40)
(ADD-VERTEX-* 160 10)
(ADD-VERTEX-* 170 150)
(ADD-VERTEX-* 60 150)))
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for WITH-CURVE -->
<!-- Entry for WITH-DEFAULT-FONT -->
<p><br>[Macro]<br><a class=none name='with-default-font'><b>with-default-font</b> <i>(font) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets <code>*DEFAULT-FONT*</code> to <code>FONT</code> within the scope of <code>WITH-DEFAULT-FONT</code>. </p><h5>Example </h5>
<pre><code>(WITH-DEFAULT-FONT (new-font)
(DRAW-CHARACTER-SHADED-* &amp;quot;Hello World!&amp;quot; 0 0 F-COLOR B-COLOR))
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for WITH-DEFAULT-FONT -->
<!-- Entry for WITH-EVENTS -->
<p><br>[Macro]<br><a class=none name='with-events'><b>with-events</b> <i>(<tt>&amp;optional</tt> type) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p><code>WITH-EVENTS</code> is a convenience macro for managing the main game loop. It processes incoming SDL events and limits the game loop to the specified number of frames per second. </p><p>Both the <a href="#sdl-poll-event">SDL-POLL-EVENT</a> and <a href="#sdl-wait-event">SDL-WAIT-EVENT</a> event mechanisms are supported by specifying the <code>TYPE</code> as <code>:POLL</code> or <code>:WAIT</code> respectively. </p><p><EM>NOTE:</EM><code>WITH-EVENTS</code> must be called in the same thread used to set the video mode. </p><h5>Example </h5>
<pre><code>(SDL:WITH-EVENTS (:POLL)
(:QUIT-EVENT () T)
(:KEY-DOWN-EVENT (:KEY KEY)
(WHEN (SDL:KEY= KEY :SDL-KEY-ESCAPE)
(SDL:PUSH-QUIT-EVENT)))
(:VIDEO-EXPOSE-EVENT () (SDL:UPDATE-DISPLAY))))))
</code></pre><h5>Frame Rate Limiting </h5>
<p>The frame rate is specified using <a href="#frame-rate">FRAME-RATE</a>. For example to set the frame rate to 60 frames per second: </p><pre><code>(SETF (SDL:FRAME-RATE) 60)
</code></pre><h5>Event Syntax </h5>
<p>Events are specified using the format <code>(:EVENT-TYPE (&amp;amp;KEYS KEYS))</code></p><ul><li><code>EVENT-TYPE</code> must be one of the following <code>KEY</code>words; <code>:ACTIVE-EVENT, :KEY-DOWN-EVENT, :KEY-UP-EVENT, :MOUSE-MOTION-EVENT, :MOUSE-BUTTON-DOWN-EVENT, :MOUSE-BUTTON-UP-EVENT, :JOY-AXIS-MOTION-EVENT, :JOY-BUTTON-DOWN-EVENT, :JOY-BUTTON-UP-EVENT, :JOY-HAT-MOTION-EVENT, :JOY-BALL-MOTION-EVENT, :VIDEO-RESIZE-EVENT, :VIDEO-EXPOSE-EVENT, :SYS-WM-EVENT, :QUIT-EVENT, :USER-EVENT</code> or <code>:IDLE</code>. </li>
<li><code>KEYS</code> specify the members of the event to return and are specific to each event type. These are discussed in detail below. </li>
</ul><p><EM>NOTE:</EM><code>:QUIT-EVENT</code> must return <code>T</code> to exit the <code>WITH-EVENT</code> macro. </p><p><EM>NOTE:</EM><code>:IDLE</code> is ignored when <code>TYPE</code> is <code>:WAIT</code>. </p><h5>Polling for Events </h5>
<p>When <code>TYPE</code> is <code>:POLL</code>, <code>WITH-EVENTS</code> will continually poll for currently pending events. If no events are available then the game loop is run and the forms in <code>:IDLE</code> are executed. </p><h5>Waiting for Events </h5>
<p>When <code>TYPE</code> is <code>:WAIT</code>, <code>WITH-EVENTS</code> will sleep indefinitely for the next available event. If no events are available then the game loop is paused. </p><h5>The :IDLE Event </h5>
<pre><code> (:IDLE ()
&amp;amp;BODY BODY)
</code></pre><p>The <code>:IDLE</code> event is special in that it is not generated by SDL. Rather the forms in <code>:IDLE</code> are executed once each game loop after event queue is emptied. <code>:IDLE</code> is ignored when the event mechanism specified by <code>TYPE</code> is <code>:WAIT</code>. </p><h5>Active Event </h5>
<pre><code>(:ACTIVE-EVENT (:GAIN GAIN :STATE STATE)
&amp;amp;BODY BODY)
</code></pre><p>When the mouse leaves or enters the window area an <code>SDL-APP-MOUSE-FOCUS</code> type activation event is generated. If the mouse has entered the window then <code>GAIN</code> will be <code>1</code>, otherwise <code>GAIN</code> will be <code>0</code>. An <code>SDL-APP-INPUT-FOCUS</code> type activation event occurs when the application loses or gains keyboard focus, usually when a different application is made active. Finally, an <code>SDL-APP-ACTIVE</code> type event occurs when the application is either minimised/iconified, <code>GAIN</code> is <code>0</code>, or restored. A single event can have multiple values set in <code>STATE</code>. <EM>Note:</EM> This event does not occur when an application window is first created. </p><ul><li><code>GAIN</code> is <code>0</code> if the event is a loss or <code>1</code> if it is a gain. </li>
<li><code>STATE</code> a bitmask of the following values: <code>SDL-APP-MOUSE-FOCUS</code> if mouse focus was gained or lost, <code>SDL-APP-INPUT-FOCUS</code> if input focus was gained or lost, and <code>SDL-APP-ACTIVE</code> if the application was iconified, <code>GAIN</code> is <code>0</code>, or restored <code>GAIN</code> is <code>1</code>. </li>
</ul><h5>Keyboard Events </h5>
<pre><code>(:KEY-DOWN-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :UNICODE UNICODE)
&amp;amp;BODY BODY)
(:KEY-UP-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :UNICODE UNICODE)
&amp;amp;BODY BODY)
</code></pre><p>A keyboard event generally occurs when a key is released or when a key is pressed. The information on the key that generated the event is stored in <code>KEY</code> and <code>MOD</code>. </p><p>The <code>SDL-CAPS-LOCK</code> and <code>SDL-NUM-LOCK</code> keys are special cases and report an <code>SDL-KEY-DOWN</code> when first pressed, then an <code>SDL-RELEASED</code> when released and pressed again. These keys KEYUP and KEYDOWN events are therefore analogous to the state of the caps lock and num lock LEDs rather than the keys themselves. These special cases are required for compatibility with Sun workstations. </p><p><EM>Note:</EM> Repeating <code>SDL-KEY-DOWN</code> events will occur if key repeat is enabled using <a href="#sdl-enable-key-repeat">SDL-ENABLE-KEY-REPEAT</a>. </p><ul><li><code>STATE</code> is <code>SDL-PRESSED</code> or <code>SDL-RELEASED</code> if the key is pressed or released respectively. </li>
<li><code>SCANCODE</code> is the hardware-dependent scancode returned by the keyboard. </li>
<li><code>KEY</code> is is the SDL-defined value of the key that generated the event. The SDL-defined value for <code>KEY</code> generally takes the following format: <code>:SDL-KEY-0</code> to <code>:SDL-KEY-1</code> for numeric keys. <code>SDL-KEY-a</code> to <code>SDL-KEY-z</code> for alpha keys in the range a-z. Other keys are generally spelled out, for example <code>SDL-KEY-PAGEDOWN</code>, <code>SDL-KEY-F1</code> or <code>SDL-KEY-NUMLOCK</code> . </li>
<li><code>MOD</code> is current state of the keyboard modifiers as explained in SDL_GetModState. One or more of <code>:SDL-KEY-MOD-NONE, :SDL-KEY-MOD-LSHIFT, :SDL-KEY-MOD-RSHIFT, :SDL-KEY-MOD-LCTRL, :SDL-KEY-MOD-RCTRL, :SDL-KEY-MOD-LALT, :SDL-KEY-MOD-RALT, :SDL-KEY-MOD-LMETA, :SDL-KEY-MOD-RMETA, :SDL-KEY-MOD-NUM, :SDL-KEY-MOD-CAPS, :SDL-KEY-MOD-MODE or :SDL-KEY-MOD-RESERVED</code>. </li>
<li><code>UNICODE</code> is the translated character. The unicode field is only used when UNICODE translation is enabled with SDL_EnableUNICODE. If unicode is non-zero then this is the UNICODE character corresponding to the keypress. If the high 9 bits of the character are 0, then this maps to the equivalent ASCII character. </li>
</ul><h5>Mouse Motion Event </h5>
<pre><code>(:MOUSE-MOTION-EVENT (:STATE STATE :X X :Y Y :X-REL X-REL :Y-REL Y-REL)
&amp;amp;BODY BODY)
</code></pre><p>A <code>MOUSE-MOTION-EVENT</code> event occurs when the mouse moves within the application window or when <a href="#SDL-WARP-MOUSE">SDL-WARP-MOUSE</a> is called. Both the absolute <code>X</code> and <code>Y</code> and relative <code>X-REL</code> and <code>Y-REL</code> coordinates are reported along with the current button state <code>STATE</code>. The button state can be interpreted using <a href="#sdl-button">SDL-BUTTON</a>, see <a href="#sdl-get-mouse-state">SDL-GET-MOUSE-STATE</a>. </p><p>If the cursor is hidden using <a href="#sdl-show-cursor">SDL-SHOW-CURSOR</a> and the input is grabbed using <a href="#sdl-wm-grab-input">SDL-WM-GRAB-INPUT</a>, then the mouse will give relative motion events even when the cursor reaches the edge of the screen. This is currently only implemented on Windows and Linux/Unix-alikes. </p><ul><li><code>STATE</code> is the current button state. </li>
<li><code>X</code> is the <code>X</code> coordinates of the mouse </li>
<li><code>Y</code> is the <code>Y</code> coordinates of the mouse </li>
<li><code>X-REL</code> is the relative motion in the <code>X</code> direction </li>
<li><code>Y-REL</code> is the relative motion in the <code>Y</code> direction </li>
</ul><h5>Mouse Button Events </h5>
<pre><code> (:MOUSE-BUTTON-DOWN-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y)
&amp;amp;BODY BODY)
(:MOUSE-BUTTON-UP-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y)
&amp;amp;BODY BODY)
</code></pre><p>When a mouse button press or release is detected the number of the button pressed (from 1 to 255, with 1 usually being the left button and 2 the right) is placed into <code>BUTTON</code>, the position of the mouse when this event occured is stored in the <code>X</code> and the <code>Y</code> fields. </p><p>Mouse wheel events are reported as buttons 4 (up) and 5 (down). Two events are generated i.e. a <code>SDL-MOUSE-BUTTON-DOWN</code> followed by a <code>SDL-MOUSE-BUTTON-UP</code> event. </p><ul><li><code>BUTTON</code> is the mouse button index which is one of <code>SDL-BUTTON-LEFT</code>, <code>SDL-BUTTON-MIDDLE</code>, <code>SDL-BUTTON-RIGHT</code>, <code>SDL-BUTTON-WHEELUP</code> or <code>SDL-BUTTON-WHEELDOWN</code>. </li>
<li><code>STATE</code> is the state of the button which is <code>SDL-PRESSED</code> or <code>SDL-RELEASED</code>. </li>
<li><code>X</code> is the <code>X</code> coordinates of the mouse at press/release time. </li>
<li><code>Y</code> is the <code>Y</code> coordinates of the mouse at press/release time. </li>
</ul><h5>Joystick Motion Event </h5>
<pre><code>(:JOY-AXIS-MOTION-EVENT (:WHICH WHICH :AXIS AXIS :VALUE VALUE)
&amp;amp;BODY BODY)
</code></pre><p>A JOY-AXIS-MOTION-EVENT event occurs whenever a user moves an axis on the joystick. </p><ul><li><code>WHICH</code> is the joystick device index. The index of the joystick that reported the event. </li>
<li><code>AXIS</code> is the joystick axis index </li>
<li><code>VALUE</code> is the current position of the axis (range: -32768 to 32767) </li>
</ul><h5>Joystick Button Events </h5>
<pre><code>(:JOY-BUTTON-DOWN-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE)
&amp;amp;BODY BODY)
(:JOY-BUTTON-UP-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE)
&amp;amp;BODY BODY)
</code></pre><p>A <code>JOY-BUTTON-DOWN-EVENT</code> or <code>JOY-BUTTON-DOWN-EVENT</code> event occurs whenever a user presses or releases a button on a joystick. </p><ul><li><code>WHICH</code> is the index of the joystick that reported the event. </li>
<li><code>BUTTON</code> is the button pressed that caused the event. </li>
<li><code>STATE</code> is the current state of the button and is either <code>SDL-PRESSED</code> or <code>SDL-RELEASED</code>. </li>
</ul><h5>Joystick Hat Motion Event </h5>
<pre><code> (:JOY-HAT-MOTION-EVENT (:WHICH WHICH :HAT HAT :VALUE VALUE)
&amp;amp;BODY BODY)
</code></pre><p>A <code>JOY-HAT-MOTION-EVENT</code> event occurs when ever a user moves a hat on the joystick. </p><ul><li><code>WHICH</code> is the index of the joystick that reported the event. </li>
<li><code>HAT</code> is the index of the hat that generated the event. </li>
<li><code>VALUE</code> is the current position of the hat, a bitwise OR&#039;d combination of the following values <code>SDL-HAT-CENTERED</code>, <code>SDL-HAT-UP</code>, <code>SDL-HAT-RIGHT</code>, <code>SDL-HAT-DOWN</code>, <code>SDL-HAT-LEFT</code>, <code>SDL-HAT-RIGHT-UP</code>, <code>SDL-HAT-RIGHT-DOWN</code>, <code>SDL-HAT-LEFT-UP</code> and <code>SDL-HAT-LEFT-DOWN</code>. </li>
</ul><h5>Joystick Ball Motion Event </h5>
<pre><code>(:JOY-BALL-MOTION-EVENT (:WHICH WHICH :BALL BALL :X-REL X-REL :Y-REL Y-REL)
&amp;amp;BODY BODY)
</code></pre><p>A <code>JOY-BALL-MOTION-EVENT</code> event occurs when a user moves a trackball on the joystick. Trackballs only return relative motion. </p><ul><li><code>WHICH</code> is the index of the joystick that reported the event. </li>
<li><code>BALL</code> is the index of the trackball that generated the event. </li>
<li><code>X-REL</code> is the change in <code>X</code> position of the ball since it was last polled (last cycle of the event loop). </li>
<li><code>Y-REL</code> is the change in <code>Y</code> position of the ball since it was last polled (last cycle of the event loop). </li>
</ul><h5>Quit Event </h5>
<pre><code>(:QUIT-EVENT ()
&amp;amp;BODY BODY)
</code></pre><p>If <code>QUIT-EVENT</code> is filtered or ignored then it is impossible for the user to close the window. If <code>QUIT-EVENT</code> is accepted and returns <code>T</code> then the application window will be closed. <EM>Note:</EM> Screen updates will continue to report success even though the application is no longer visible. If <code>QUIT-EVENT</code> is accepted and returns <code>NIL</code> then the application window will <STRONG>not</STRONG> be closed. <a href="#sdl_quit-requested">SDL_QUIT-REQUESTED</a> will return non-zero if a <code>QUIT-EVENT</code> event is pending. </p><h5>SDL Window Resize Event </h5>
<pre><code>(:VIDEO-RESIZE-EVENT (:W W :H H)
...)
</code></pre><p>When <code>SDL-RESIZABLE</code> is passed as a flag to <a href="#window">WINDOW</a>, the user is allowed to resize the application window. When the window is resized a <code>VIDEO-RESIZE-EVENT</code> event is reported, with the new window width and height values stored in <code>W</code> and <code>H</code> respectively. When an <code>VIDEO-RESIZE-EVENT</code> event is recieved the window should be resized to the new dimensions using <a href="#window">WINDOW</a>. </p><ul><li><code>W</code> is the window width as an <code>INTEGER</code>. </li>
<li><code>H</code> is the window height as an INTERGER`. </li>
</ul><h5>SDL Window Expose Event </h5>
<pre><code>(:VIDEO-EXPOSE-EVENT ()
...)
</code></pre><p><code>VIDEO-EXPOSE-EVENT</code> is triggered when the screen has been modified outside of the application, usually by the window manager, and needs to be redrawn. </p><h5>System Window Events </h5>
<pre><code>(:SYS-WM-EVENT ()
...)
</code></pre><p>The system window manager event contains a pointer to system-specific information about unknown window manager events. If this event is enabled using <a href="#sdl-event-state">SDL-EVENT-STATE</a>, it will be generated whenever unhandled events are received from the window manager. This can be used, for example, to implement cut-and-paste in your application. If you want to obtain system-specific information about the window manager, you can fill in the version member of a <code>SDL-SYS-WM-INFO</code> structure using <a href="#sdl-version">SDL-VERSION</a>, and pass it to the function: <a href="#sdl-get-wm-info">SDL-GET-WM-INFO</a></p><h5>User </h5>
<pre><code>(:USER-EVENT (:TYPE TYPE :CODE CODE :DATA1 DATA1 :DATA2 DATA2)
...)
</code></pre><p><code>USER-EVENT</code> is unique in that it is created by the user not SDL. <code>USER-EVENT</code> can be pushed onto the event queue using <a href="#push-user-event">PUSH-USER-EVENT</a>. The contents of the event are completely up to the programmer. </p><ul><li><code>TYPE</code> is a value from <code>SDL-USER-EVENT to </code>(- SDL-NUM-EVENTS 1)` inclusive. </li>
<li><code>CODE</code> is a user defined event code </li>
<li><code>DATA1</code> is a user defined data pointer </li>
<li><code>DATA2</code> is a user defined data pointer </li>
</ul><h5>Syntax </h5>
<pre><code>(WITH-EVENTS (TYPE)
(:ACTIVE-EVENT (:GAIN GAIN :STATE STATE)
... )
(:KEY-DOWN-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :UNICODE UNICODE)
... )
(:KEY-UP-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :UNICODE UNICODE)
...)
(:MOUSE-MOTION-EVENT (:STATE STATE :X X :Y Y :X-REL X-REL :Y-REL Y-REL)
...)
(:MOUSE-BUTTON-DOWN-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y)
...)
(:MOUSE-BUTTON-UP-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y)
...)
(:JOY-AXIS-MOTION-EVENT (:WHICH WHICH :AXIS AXIS :VALUE VALUE)
...)
(:JOY-BUTTON-DOWN-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE)
...)
(:JOY-BUTTON-UP-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE)
...)
(:JOY-HAT-MOTION-EVENT (:WHICH WHICH :HAT HAT :VALUE VALUE)
...)
(:JOY-BALL-MOTION-EVENT (:WHICH WHICH :BALL BALL :X-REL X-REL :Y-REL Y-REL)
...)
(:VIDEO-RESIZE-EVENT (:W W :H H)
...)
(:VIDEO-EXPOSE-EVENT ()
...)
(:SYS-WM-EVENT ()
...)
(:USER-EVENT (:TYPE TYPE :CODE CODE :DATA1 DATA1 :DATA2 DATA2)
...)
(:QUIT-EVENT ()
...
T)
(:IDLE ()
... ))
</code></pre>
</blockquote>
<!-- End of entry for WITH-EVENTS -->
<!-- Entry for WITH-FONT -->
<p><br>[Macro]<br><a class=none name='with-font'><b>with-font</b> <i>(font font-definition) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Sets <code>*DEFAULT-FONT*</code> to a new <a href="#bitmap-font">BITMAP-FONT</a> in <code>FONT</code> within the scope of <code>WITH-FONT</code>. Frees <code>FONT</code> when <code>WITH-FONT</code> goes out of scope. </p><h5>Example </h5>
<pre><code>(WITH-FONT (new-font *font-8x8*)
(DRAW-CHARACTER-SHADED-* &amp;quot;Hello World!&amp;quot; 0 0 F-COLOR B-COLOR))
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for WITH-FONT -->
<!-- Entry for WITH-FOREIGN-COLOR-COPY -->
<p><br>[Macro]<br><a class=none name='with-foreign-color-copy'><b>with-foreign-color-copy</b> <i>(struct color) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Creates and assigns a new foreign <code>SDL_Color</code> to <code>STRUCT</code>. Then copies the color components from <code>COLOR</code> into <code>STRUCT</code>. <code>STRUCT</code> is free&#039;d when out of scope. </p>
</blockquote>
<!-- End of entry for WITH-FOREIGN-COLOR-COPY -->
<!-- Entry for WITH-INIT -->
<p><br>[Macro]<br><a class=none name='with-init'><b>with-init</b> <i>flags declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p><code>WITH-INIT</code> is a convenience macro that will attempt to initialise the SDL library and SDL subsystems prior to executing the forms in <code>BODY</code>. Upon exit <code>WITH-INIT</code> will uninitialize the SDL library and SDL subsystems. </p><p>The lispbuilder-sdl initialization routines are somewhat complicated by the fact that a Lisp development environment will load a foreign library once but then initialise and uninitialise the library multiple times. A C/C++ development environment will open and then close a library after each execution, freeing all resources left hanging by incomplete or buggy uninitialise functions. C libraries may therefore frequently core dump in a Lisp environment when resources are not feed properly prior to the library being reinitialized. </p><p>LISPBUILDER-SDL provides functionality affording the programmer a finer granularity of control of the initialisation/uninitialisation of foreign libraries. The fuctions that provide these capabilities are as follows: </p><ul><li><a href="#initialize-on-startup">INITIALIZE-ON-STARTUP</a></li>
<li><a href="#quit-on-exit">QUIT-ON-EXIT</a></li>
<li><a href="#list-sub-systems">LIST-SUB-SYSTEMS</a></li>
<li><a href="#return-sub-systems-of-status">RETURN-SUB-SYSTEMS-OF-STATUS</a></li>
<li><a href="#init-sub-systems">INIT-SUB-SYSTEMS</a></li>
<li><a href="#quit-sub-systems">QUIT-SUB-SYSTEMS</a></li>
<li><a href="#init-sdl">INIT-SDL</a></li>
<li><a href="#quit-sdl">QUIT-SDL</a></li>
</ul><h5>Defaults </h5>
<ul><li>By default <code>WITH-INIT</code> will only initialise the <code>SDL-INIT-VIDEO</code> SDL subsystem. Additional SDL subsystems can be initialized by calling <a href="#initialize-on-startup">INITIALIZE-ON-STARTUP</a>. </li>
<li>By default <code>WITH-INIT</code> will only uninitialise the <code>SDL-INIT-VIDEO</code> SDL subsystem. Additional SDL subsystems can be uninitialized by calling <a href="#quit-on-exit">QUIT-ON-EXIT</a>. </li>
</ul><h6>Initialisation/Uninitialisation of the SDL library </h6>
<p>The SDL library is initialised only: </p><ul><li>If the library is not yet already initialized, or </li>
<li><a href="#sdl-init-on-startup">SDL-INIT-ON-STARTUP</a> is <code>T</code>. </li>
</ul><p>The SDL library is uninitialised only: </p><ul><li>When <a href="#sdl-quit-on-exit">SDL-QUIT-ON-EXIT</a> is <code>T</code>. </li>
</ul><h6>Initialisation/Uninitialisation of external libraries </h6>
<p>Hooks are provided to allow external libraries to be initialized or uninitialised automatically following the initialisation or uninitialisation of the SDL library. </p><p>To initialise an external library, push a function that initialises the external library onto <code>*EXTERNAL-INIT-ON-STARTUP*</code>. The function must take no arguments. For example: </p><pre><code>(defun init-ttf ()
(if (is-init)
t
(sdl-ttf-cffi::ttf-init)))
(pushnew &amp;#039;init-ttf sdl:*external-init-on-startup*)
</code></pre><p>To uninitialise an external library, push a function that uninitialises the external library onto <code>*EXTERNAL-QUIT-ON-EXIT*</code>. The function must take no arguments. For example: </p><pre><code>(defun quit-ttf ()
(if (is-init)
(sdl-ttf-cffi::ttf-quit)))
(pushnew &amp;#039;quit-ttf sdl:*external-quit-on-exit*)
</code></pre><h5>Parameters </h5>
<ul><li><code>FLAGS</code> may be one or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code> and <code>SDL-INIT-NOPARACHUTE</code>. <EM>Note</EM>: When <code>FLAGS</code> is set by <code>WITH-INIT</code>, subsequent calls to <a href="#initialize-on-startup">INITIALIZE-ON-STARTUP</a> and <a href="#quit-on-exit">QUIT-ON-EXIT</a> are ignored. <code>WITH-INIT</code> will only initialize and uninitialize the subsytems specified in <code>FLAGS</code>. </li>
</ul><h5>Example </h5>
<pre><code>(with-init (SDL-INIT-VIDEO SDL-INIT-CDROM SDL-INIT-AUDIO)
....)
(with-init ()
(INITIALIZE-ON-STARTUP SDL-INIT-VIDEO SDL-INIT-CDROM SDL-INIT-AUDIO)
(QUIT-ON-EXIT SDL-INIT-VIDEO SDL-INIT-CDROM SDL-INIT-AUDIO)
....)
</code></pre>
</blockquote>
<!-- End of entry for WITH-INIT -->
<!-- Entry for WITH-LOCKED-SURFACE -->
<p><br>[Macro]<br><a class=none name='with-locked-surface'><b>with-locked-surface</b> <i>(var <tt>&amp;optional</tt> surface) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for WITH-LOCKED-SURFACE -->
<!-- Entry for WITH-LOCKED-SURFACES -->
<p><br>[Macro]<br><a class=none name='with-locked-surfaces'><b>with-locked-surfaces</b> <i>bindings <tt>&amp;rest</tt> body</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for WITH-LOCKED-SURFACES -->
<!-- Entry for WITH-POINT -->
<p><br>[Macro]<br><a class=none name='with-point'><b>with-point</b> <i>(var <tt>&amp;optional</tt> point) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>A convenience macro that binds <code>*DEFAULT-POINT*</code> to <code>VAR</code> within the scope of <code>WITH-POINT</code>. <code>VAR</code> must be of type <code>POINT</code>. If <code>POINT</code> is not <code>NIL</code>, then <code>VAR is set to </code>POINT`. </p>
</blockquote>
<!-- End of entry for WITH-POINT -->
<!-- Entry for WITH-RECTANGLE -->
<p><br>[Macro]<br><a class=none name='with-rectangle'><b>with-rectangle</b> <i>(var <tt>&amp;optional</tt> rectangle free) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>A convenience macro that binds <code>*DEFAULT-RECTANGLE*</code> to <code>VAR</code> within the scope of <code>WITH-RECTANGLE</code>. <code>VAR</code> must be of type <code>RECTANGLE</code>. <code>VAR</code> is set to <code>RECTANGLE</code> when <code>RECTANGLE</code> is not <code>NIL</code>. <code>VAR</code> is freed when <code>FREE</code> is <code>T</code>. </p><h5>Example </h5>
<pre><code>(WITH-RECTANGLE (a-rect (RECTANGLE :x 0 :y 0 :w 100 :h 100))
...)
</code></pre>
</blockquote>
<!-- End of entry for WITH-RECTANGLE -->
<!-- Entry for WITH-RECTANGLES -->
<p><br>[Macro]<br><a class=none name='with-rectangles'><b>with-rectangles</b> <i>bindings declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>A convenience macro that binds multiple rectangles as per <a href="#with-rectangle">WITH-RECTANGLE</a>. </p><h5>Example </h5>
<pre><code>(WITH-RECTANGLES ((a-rect (RECTANGLE :x 0 :y 0 :w 100 :h 100))
((b-rect (RECTANGLE :x 0 :y 100 :w 100 :h 100))
((c-rect (RECTANGLE :x 0 :y 200 :w 100 :h 100)))
...)
</code></pre>
</blockquote>
<!-- End of entry for WITH-RECTANGLES -->
<!-- Entry for WITH-SHAPE -->
<p><br>[Macro]<br><a class=none name='with-shape'><b>with-shape</b> <i>(<tt>&amp;optional</tt> style) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Draw a polygon of <code>*DEFAULT-COLOR*</code> to <code>*DEFAULT-SURFACE*</code>. </p><h5>Local Methods </h5>
<p>A vertex may be added using: </p><ul><li><code>ADD-VERTEX</code> which accepts an <code>SDL:POINT</code>, or </li>
<li><code>ADD-VERTEX-*</code> which is the x/y spread version </li>
</ul><p>ADD-VERTEX and ADD-VERTEX-* are valid only within the scop of WITH-SHAPE. </p><h5>Parameters </h5>
<ul><li><code>STYLE</code> describes the line style used to draw the shape and may be one of <code>:SOLID</code>, <code>:DASH</code>, or <code>:POINTS</code>. Use <code>:SOLID</code> to draw a single continuous line through the specified waypoints. Use <code>:DASH</code> to draw a line between alternate waypoint pairs. Use <code>:POINTS</code> to draw a single pixel at each waypoint. </li>
</ul><h5>Example </h5>
<pre><code>(SDL:WITH-COLOR (COL (SDL:COLOR))
(WITH-SHAPE (:POINTS)
(ADD-VERTEX-* 60 40)
(ADD-VERTEX-* 160 10)
(ADD-VERTEX-* 170 150)
(ADD-VERTEX-* 60 150)))
</code></pre><h5>Packages </h5>
<ul><li>Also supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
</ul>
</blockquote>
<!-- End of entry for WITH-SHAPE -->
<!-- Entry for WITH-SURFACE -->
<p><br>[Macro]<br><a class=none name='with-surface'><b>with-surface</b> <i>(var <tt>&amp;optional</tt> surface free) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for WITH-SURFACE -->
<!-- Entry for WITH-SURFACE-SLOTS -->
<p><br>[Macro]<br><a class=none name='with-surface-slots'><b>with-surface-slots</b> <i>(var <tt>&amp;optional</tt> surface) declaration* statement*</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for WITH-SURFACE-SLOTS -->
<!-- Entry for WITH-SURFACES -->
<p><br>[Macro]<br><a class=none name='with-surfaces'><b>with-surfaces</b> <i>bindings <tt>&amp;rest</tt> body</i> =&gt; <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for WITH-SURFACES -->
<!-- Entry for WITHIN-RANGE -->
<p><br>[Function]<br><a class=none name='within-range'><b>within-range</b> <i>p1 p2 distance</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns true <code>T</code>, if the distance between the <code>POINT</code>s <code>P1</code><code>P2</code> is &lt;= the distance <code>DISTANCE</code>. </p>
</blockquote>
<!-- End of entry for WITHIN-RANGE -->
<!-- Entry for WITHIN-RANGE-* -->
<p><br>[Function]<br><a class=none name='within-range-*'><b>within-range-*</b> <i>x1 y1 x2 y2 distance</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns true <code>T</code>, if the distance between the coordinates <code>X1</code>, <code>Y1</code> and <code>X2</code>, <code>Y2</code> is &lt;= the distance <code>DISTANCE</code>. </p>
</blockquote>
<!-- End of entry for WITHIN-RANGE-* -->
<!-- Entry for X -->
<p><br>[Generic accessor]<br><a class=none name='x'><b>x</b> <i>obj</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>x</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>X</code> coordinate of the object, as an <code>INTEGER</code>. When <code>OBJ</code> is a <a href="#font">FONT</a>, use the cached <a href="#surface">SURFACE</a>. </p>
</blockquote>
<!-- End of entry for X -->
<!-- Entry for X2 -->
<p><br>[Generic accessor]<br><a class=none name='x2'><b>x2</b> <i>obj</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>x2</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns <code>(+ X WIDTH)</code> of the object, as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for X2 -->
<!-- Entry for Y -->
<p><br>[Generic accessor]<br><a class=none name='y'><b>y</b> <i>obj</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>y</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>Y</code> coordinate of the object, as an <code>INTEGER</code>. When <code>OBJ</code> is a <a href="#font">FONT</a>, use the cached <a href="#surface">SURFACE</a>. </p>
</blockquote>
<!-- End of entry for Y -->
<!-- Entry for Y2 -->
<p><br>[Generic accessor]<br><a class=none name='y2'><b>y2</b> <i>obj</i> =&gt; <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>y2</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns <code>(+ Y HEIGHT)</code> of the object, as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for Y2 -->
<!-- Entry for ZOOM-SURFACE -->
<p><br>[Function]<br><a class=none name='zoom-surface'><b>zoom-surface</b> <i>zoomx zoomy <tt>&amp;key</tt> surface free smooth</i> =&gt; <i>result</i></a>
<blockquote><br>
<p>Returns a new <a href="#surface">SURFACE</a> scaled to <code>ZOOMX</code> and <code>ZOOMY</code>. </p><h5>Parameters </h5>
<ul><li><code>:ZOOMX</code> and <code>ZOOMY</code> are the scaling factors. A negative scaling factor will flip the corresponding axis. <STRONG>Note</STRONG>: Flipping is only supported with anti-aliasing turned off. </li>
<li><code>:SURFACE</code> is the surface to rotate <a href="#surface">SURFACE</a>. </li>
<li><code>:FREE</code> when <code>T</code> will free <code>SURFACE</code>. </li>
<li><code>:SMOOTH</code> when <code>T</code> will anti-aliase the new surface. </li>
</ul><h5>Packages </h5>
<ul><li>Supported in <STRONG>LISPBUILDER-SDL-GFX</STRONG></li>
<li><STRONG>LISPBUILDER-SDL-GFX</STRONG> ignores <code>:FREE</code>. </li>
</ul>
</blockquote>
<!-- End of entry for ZOOM-SURFACE -->
<!-- Entry for (SETF FP) -->
<p><br>[Method]<br><a class=none><tt>(setf (</tt><b>fp</b> <i>(rectangle-array rectangle-array)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for (SETF FP) -->
<!-- Entry for (SETF FP) -->
<p><br>[Method]<br><a class=none><tt>(setf (</tt><b>fp</b> <i>(rectangle-array color-a)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for (SETF FP) -->
<!-- Entry for (SETF FP) -->
<p><br>[Method]<br><a class=none><tt>(setf (</tt><b>fp</b> <i>(rectangle-array color)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for (SETF FP) -->
<br>&nbsp;<br><h3><a class=none name="ack">Acknowledgements</a></h3>
<ul>
<li>
Documentation prepared using:
</li>
<ul>
<li>
Edi Weitz's
<a href="http://weitz.de/documentation-template/">DOCUMENTATION-TEMPLATE</a>.
</li>
<li>
Gary King's
<a href="http://common-lisp.net/project/cl-markdown/">CL-MARKDOWN</a>.
</li>
</ul>
</ul>
<p>
<a href="index.html">BACK</a>
</p>
</body>
</html>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.